]> git.mxchange.org Git - flightgear.git/commitdiff
Compile xmlgrep with MSVC 7.1
authorfredb <fredb>
Sat, 18 Apr 2009 14:13:13 +0000 (14:13 +0000)
committerTim Moore <timoore@redhat.com>
Fri, 1 May 2009 22:44:20 +0000 (00:44 +0200)
utils/xmlgrep/xml.c
utils/xmlgrep/xml.h
utils/xmlgrep/xmlgrep.c

index 2c2b962486b998e41ded91c8d3c0f237f2c2c880..760952e8a5552a4640c408f1d609babaff82a8c6 100644 (file)
@@ -43,21 +43,28 @@ static SIMPLE_UNMMAP un;
 static void *simple_mmap(int, size_t, SIMPLE_UNMMAP *);
 static void simple_unmmap(SIMPLE_UNMMAP *);
 
-#define mmap(a,b,c,d,e,f)      simple_mmap((e), (b), &un)
-#define munmap(a,b)            simple_unmmap(&un)
+# define mmap(a,b,c,d,e,f)     simple_mmap((e), (b), &un)
+# define munmap(a,b)           simple_unmmap(&un)
+
+# include <io.h>
+# include <stdlib.h>
 
 #else  /* !WIN32 */
 # include <sys/mman.h>
-# include <fcntl.h>
+# include <unistd.h>
 #endif
 
+# include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <assert.h>
-#include <unistd.h>
 #include <ctype.h>
 #include <string.h>
-#include <strings.h>   /* strncasecmp */
+#ifndef _MSC_VER
+# include <strings.h>  /* strncasecmp */
+#else
+# define strncasecmp strnicmp
+#endif
 #ifndef NDEBUG
 #include <stdio.h>
 #endif
index b02296554dfc1ed50aa0f6a5775b596d06c2b0f1..d9829d83ae5b8aeb62bdd9bc9e576286ba017100 100644 (file)
@@ -235,6 +235,7 @@ size_t xmlAttributeCopyString(const void *, const char *, const char *, size_t);
  * @return an integer less than, equal to, ro greater than zero if the value
  * of the node is found, respectively, to be less than, to match, or be greater
  * than str
+ */
 int xmlAttributeCompareString(const void *, const char *, const char *);
 
 
index fe4782e0fd607639284c85496bf0996391bca228..532db40ddaa86cf3344547c3f2f74d366f46a85c 100644 (file)
@@ -2,7 +2,12 @@
 
 #define _GNU_SOURCE
 #include <string.h>
-#include <strings.h>
+#ifndef _MSC_VER
+# include <strings.h>
+#else
+# define strncasecmp strnicmp
+# include <stdlib.h>
+#endif
 #include <assert.h>
 
 #include "xml.h"