pkgsrc/graphics/clanlib/patches/patch-ae

39 lines
1.2 KiB
Text

$NetBSD: patch-ae,v 1.3 2000/12/15 03:24:18 garbled Exp $
--- Sources/Core/System/Unix/appconf.cpp.orig Thu Dec 14 18:33:18 2000
+++ Sources/Core/System/Unix/appconf.cpp Thu Dec 14 18:37:38 2000
@@ -59,7 +59,7 @@
# include <windows.h>
#endif // WIN32
-#ifdef __unix__
+#if defined(__unix__) || defined(__NetBSD__)
# include <sys/param.h>
# include <sys/stat.h>
# include <unistd.h>
@@ -165,7 +165,7 @@
#if APPCONF_CASE_SENSITIVE
# define StrCmp(s1,s2) strcmp((s1),(s2))
#else
-# ifdef __unix__
+# if defined(__unix__) || defined(__NetBSD__)
extern "C" int strcasecmp(const char *s1, const char *s2); // it's not ansi
# define StrCmp(s1,s2) strcasecmp((s1),(s2))
# else
@@ -1326,7 +1326,7 @@
// check if file has extension
Bool bNoExt = strchr(m_szFileName, '.') == NULL;
-#ifdef __unix__
+#if defined(__unix__) || defined(__NetBSD__)
strcpy(s_szBuf, "/etc/");
strcat(s_szBuf, m_szFileName);
if ( bNoExt )
@@ -1349,7 +1349,7 @@
{
static char s_szBuf[MAX_PATH];
-#ifdef __unix__
+#if defined(__unix__) || defined(__NetBSD__)
const char *szHome = getenv("HOME");
if ( szHome == NULL ) {
// we're homeless...