OSDN Git Service

Avoid a potential macro definition conflict.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Fri, 31 May 2013 12:26:50 +0000 (13:26 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Fri, 31 May 2013 12:26:50 +0000 (13:26 +0100)
ChangeLog
src/pkgbase.h

index 8a6217b..899ad0a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-05-31  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Avoid a potential macro definition conflict.
+
+       * src/pkgbase.h (strcasecmp) [__MINGW32__]: Use string.h definition.
+
 2013-05-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Streamline build-time dependency tracking procedures.
index 696d691..9a48507 100644 (file)
@@ -527,10 +527,14 @@ bool safe_strcmp( strcmp_function strcmp, const char *value, const char *proto )
 # ifndef CASE_INSENSITIVE_FILESYSTEM
 #  define CASE_INSENSITIVE_FILESYSTEM  1
 # endif
+# ifndef __MINGW32__
   /* The preferred name for MS-Windows' case insensitive string
-   * matching function, equivalent to POSIX strcasecmp().
+   * matching function, equivalent to POSIX strcasecmp(); MinGW's
+   * string.h will have established this mapping already, so we
+   * don't introduce a (possibly incompatible) redefinition.
    */
-# define strcasecmp  stricmp
+#  define strcasecmp _stricmp
+# endif
 #else
   /* On other systems, we prefer to adopt case sensitive matching
    * strategies for subsystem and file names.