From e00c4b98cefa3f8ca8a488fdd84c2ae131a74305 Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 18 Apr 2009 14:13:13 +0000 Subject: [PATCH] Compile xmlgrep with MSVC 7.1 --- utils/xmlgrep/xml.c | 17 ++++++++++++----- utils/xmlgrep/xml.h | 1 + utils/xmlgrep/xmlgrep.c | 7 ++++++- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/utils/xmlgrep/xml.c b/utils/xmlgrep/xml.c index 2c2b96248..760952e8a 100644 --- a/utils/xmlgrep/xml.c +++ b/utils/xmlgrep/xml.c @@ -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 +# include #else /* !WIN32 */ # include -# include +# include #endif +# include #include #include #include -#include #include #include -#include /* strncasecmp */ +#ifndef _MSC_VER +# include /* strncasecmp */ +#else +# define strncasecmp strnicmp +#endif #ifndef NDEBUG #include #endif diff --git a/utils/xmlgrep/xml.h b/utils/xmlgrep/xml.h index b02296554..d9829d83a 100644 --- a/utils/xmlgrep/xml.h +++ b/utils/xmlgrep/xml.h @@ -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 *); diff --git a/utils/xmlgrep/xmlgrep.c b/utils/xmlgrep/xmlgrep.c index fe4782e0f..532db40dd 100644 --- a/utils/xmlgrep/xmlgrep.c +++ b/utils/xmlgrep/xmlgrep.c @@ -2,7 +2,12 @@ #define _GNU_SOURCE #include -#include +#ifndef _MSC_VER +# include +#else +# define strncasecmp strnicmp +# include +#endif #include #include "xml.h" -- 2.39.5