summaryrefslogtreecommitdiff
path: root/textproc/xerces-c/patches/patch-aj
blob: 6e8a718ad1898e835fcac27dfcc7803e24244ab7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-aj,v 1.1.1.1 2001/01/13 16:38:23 skrll Exp $

--- util/Compilers/GCCDefs.hpp.orig	Sat Sep 30 18:37:28 2000
+++ util/Compilers/GCCDefs.hpp
@@ -130,7 +130,7 @@
 #define XERCES_DEBUG
 #endif
 
-
+#ifndef __NetBSD__
 // ---------------------------------------------------------------------------
 //  Provide some common string ops that are different/notavail on GCC
 // ---------------------------------------------------------------------------
@@ -147,11 +147,19 @@
         return char(toLower + 0x20);
     return toLower;
 }
-
 int stricmp(const char* const str1, const char* const  str2);
 int strnicmp(const char* const str1, const char* const  str2, const unsigned int count);
+#else /* __NetBSD__ */
+#ifndef XML_NETBSD_STRICMP_DEFINED
+#define XML_NETBSD_STRICMP_DEFINED
+#include <strings.h>
+inline int stricmp(const char* const str1, const char* const  str2);
+inline int strnicmp(const char* const str1, const char* const  str2, const unsigned int count);
 
-
+inline int stricmp(const char* const str1, const char* const  str2) { return strcasecmp(str1,str2);}
+inline int strnicmp(const char* const str1, const char* const  str2, const unsigned int count) { return strncasecmp(str1,str2,count);}
+#endif /* XML_NETBSD_STRICMP_DEFINED */
+#endif /* __NetBSD__ */
 
 // ---------------------------------------------------------------------------
 //  The name of the DLL that is built by the GCC version of the system.