diff options
author | hubertf <hubertf@pkgsrc.org> | 1997-10-24 00:51:00 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1997-10-24 00:51:00 +0000 |
commit | 98bbe5629e30bb92524304811e61bb8c680ec1c4 (patch) | |
tree | f7a52f6e9f7f90a67ebf34c89d75654077dd2566 /misc/cal | |
parent | ed3e65518eaeb9453d19cd544516b272b2ac3b33 (diff) | |
download | pkgsrc-98bbe5629e30bb92524304811e61bb8c680ec1c4.tar.gz |
Update patch to detect Free/NetBSD in one go.
Diffstat (limited to 'misc/cal')
-rw-r--r-- | misc/cal/patches/patch-ab | 73 |
1 files changed, 35 insertions, 38 deletions
diff --git a/misc/cal/patches/patch-ab b/misc/cal/patches/patch-ab index 88ce105c56f..f1524f80e79 100644 --- a/misc/cal/patches/patch-ab +++ b/misc/cal/patches/patch-ab @@ -1,38 +1,35 @@ -*** cal.c.orig Fri Jul 12 04:36:33 1996 ---- cal.c Mon May 12 15:23:51 1997 -*************** -*** 130,135 **** ---- 130,139 ---- - /* Note: Other unix systems may require this next re-define to work. */ - /* I believe that SCO is one such system. Please send in any fixes */ - /* needed to get your system running. */ -+ #ifdef __FreeBSD__ /* Make FreeBSD compatible with stricmp() */ -+ #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ -+ #endif -+ - #ifdef __linux__ /* Make linux compatible with stricmp() */ - #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ - #endif -*************** -*** 1401,1408 **** - strcpy(str, "."); - strcpy(str, file); - if ((fp = fopen(str, mode)) == NULL) { -! /* If still not found then look in a lib directory */ - strcpy(str, "/usr/lib/"); - strcat(str,file); - fp = fopen(str, mode); - } ---- 1405,1416 ---- - strcpy(str, "."); - strcpy(str, file); - if ((fp = fopen(str, mode)) == NULL) { -! /* If still not found then look in config directory */ -! #ifdef PREFIX -! strcpy(str, PREFIX "/etc/cal/"); -! #else - strcpy(str, "/usr/lib/"); -+ #endif - strcat(str,file); - fp = fopen(str, mode); - } +--- cal.c.orig Thu Jul 11 21:36:33 1996 ++++ cal.c Thu Oct 23 14:37:49 1997 +@@ -122,6 +122,7 @@ + #include <ctype.h> + #include <string.h> + #include <sys/types.h> ++#include <sys/param.h> /*NetBSD*/ + + #ifndef max + #define max(a,b) (((a)>(b))?(a):(b)) +@@ -130,6 +131,10 @@ + /* Note: Other unix systems may require this next re-define to work. */ + /* I believe that SCO is one such system. Please send in any fixes */ + /* needed to get your system running. */ ++#if (defined(BSD) && BSD >= 199306) ++#define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ ++#endif ++ + #ifdef __linux__ /* Make linux compatible with stricmp() */ + #define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */ + #endif +@@ -1401,8 +1406,12 @@ + strcpy(str, "."); + strcpy(str, file); + if ((fp = fopen(str, mode)) == NULL) { +- /* If still not found then look in a lib directory */ ++ /* If still not found then look in config directory */ ++#ifdef PREFIX ++ strcpy(str, PREFIX "/etc/cal/"); ++#else + strcpy(str, "/usr/lib/"); ++#endif + strcat(str,file); + fp = fopen(str, mode); + } |