25845f
commit 3f3dd810e03661535980e334723666205c693313
25845f
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
25845f
Date:   Fri Aug 1 14:23:38 2014 +0530
25845f
25845f
    Fix -Wundef warnings in fnmatch.c
25845f
    
25845f
    Fixes -Wundef warnings for MBSTATE_T and HAVE_STRING_H.  The
25845f
    HAVE_STRING_H bit is a merge from the gnulib fnmatch.c and the
25845f
    MBSTATE_T fix has been posted to gnulib for inclusion.
25845f
25845f
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
25845f
index bf98c33cf3ba9df6..fa0d590b0f072871 100644
25845f
--- a/include/libc-symbols.h
25845f
+++ b/include/libc-symbols.h
25845f
@@ -68,9 +68,11 @@
25845f
    so it's harmless.  */
25845f
 #define HAVE_CONFIG_H	0
25845f
 
25845f
-/* Define this for the benefit of portable GNU code that wants to check it.
25845f
-   Of course, it's never false when building libc!  */
25845f
+/* Define these macros for the benefit of portable GNU code that wants to check
25845f
+   them.  Of course, STDC_HEADERS is never false when building libc!  */
25845f
 #define STDC_HEADERS	1
25845f
+#define HAVE_MBSTATE_T	1
25845f
+#define HAVE_MBSRTOWCS	1
25845f
 
25845f
 /* The symbols in all the user (non-_) macros are C symbols.  */
25845f
 
25845f
diff --git a/posix/fnmatch.c b/posix/fnmatch.c
25845f
index 99ec8c4a0eba49b3..eed12b7b515e390c 100644
25845f
--- a/posix/fnmatch.c
25845f
+++ b/posix/fnmatch.c
25845f
@@ -29,12 +29,7 @@
25845f
 #include <errno.h>
25845f
 #include <fnmatch.h>
25845f
 #include <ctype.h>
25845f
-
25845f
-#if HAVE_STRING_H || defined _LIBC
25845f
-# include <string.h>
25845f
-#else
25845f
-# include <strings.h>
25845f
-#endif
25845f
+#include <string.h>
25845f
 
25845f
 #if defined STDC_HEADERS || defined _LIBC
25845f
 # include <stdlib.h>