35 lines
1.4 KiB
Plaintext
35 lines
1.4 KiB
Plaintext
$NetBSD: patch-ab,v 1.5 2005/01/25 03:37:29 tv Exp $
|
|
|
|
--- cal.c.orig 1996-07-11 15:36:33.000000000 -0400
|
|
+++ cal.c
|
|
@@ -122,6 +122,7 @@ BASIC DATA STRUCTURE:
|
|
#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 @@ BASIC DATA STRUCTURE:
|
|
/* 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) || defined (sun) || defined(__sgi) || defined(__INTERIX)
|
|
+#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,8 @@ FILE *efopen(const char *file, const cha
|
|
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/");
|
|
+ /* If still not found then look in config directory */
|
|
+ strcpy(str, PKG_SYSCONFDIR "/");
|
|
strcat(str,file);
|
|
fp = fopen(str, mode);
|
|
}
|