]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix -Wundef warnings in fnmatch.c
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 1 Aug 2014 08:53:38 +0000 (14:23 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 1 Aug 2014 08:53:38 +0000 (14:23 +0530)
Fixes -Wundef warnings for MBSTATE_T and HAVE_STRING_H.  The
HAVE_STRING_H bit is a merge from the gnulib fnmatch.c and the
MBSTATE_T fix has been posted to gnulib for inclusion.

ChangeLog
include/libc-symbols.h
posix/fnmatch.c

index e7b08e4d6cfde4235cf539cdb7d796aa17851a88..2c5d2107f2ae13dd21d4db393ef0b0654e285340 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+       * include/libc-symbols.h (HAVE_MBSTATE_T): Define macro.
+       (HAVE_MBSRTOWCS): Likewise.
+       * posix/fnmatch.c: Include string.h unconditionally.
+
 2014-08-01  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
        * NEWS: Explain the s390 jmp_buf / ucontext_t ABI change
index 03061aed9d9692b5cd1c2ac56f37a31ff6de2f82..d833eb742090efb6f31ca80e82393364d1e68651 100644 (file)
    so it's harmless.  */
 #define HAVE_CONFIG_H  0
 
-/* Define this for the benefit of portable GNU code that wants to check it.
-   Of course, it's never false when building libc!  */
+/* Define these macros for the benefit of portable GNU code that wants to check
+   them.  Of course, STDC_HEADERS is never false when building libc!  */
 #define STDC_HEADERS   1
+#define HAVE_MBSTATE_T 1
+#define HAVE_MBSRTOWCS 1
 
 /* The symbols in all the user (non-_) macros are C symbols.  */
 
index ca95ab4df29e6da30408c4f35d5f64344b9fb80c..c330a122abb5a05d65fff0209af9230f3ad0af47 100644 (file)
 #include <errno.h>
 #include <fnmatch.h>
 #include <ctype.h>
-
-#if HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
 
 #if defined STDC_HEADERS || defined _LIBC
 # include <stdlib.h>