From: Siddhesh Poyarekar Date: Fri, 1 Aug 2014 08:53:38 +0000 (+0530) Subject: Fix -Wundef warnings in fnmatch.c X-Git-Tag: upstream/2.30~7065 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f3dd810e03661535980e334723666205c693313;p=external%2Fglibc.git Fix -Wundef warnings in fnmatch.c 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. --- diff --git a/ChangeLog b/ChangeLog index e7b08e4..2c5d210 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-08-01 Siddhesh Poyarekar + + * include/libc-symbols.h (HAVE_MBSTATE_T): Define macro. + (HAVE_MBSRTOWCS): Likewise. + * posix/fnmatch.c: Include string.h unconditionally. + 2014-08-01 Stefan Liebler * NEWS: Explain the s390 jmp_buf / ucontext_t ABI change diff --git a/include/libc-symbols.h b/include/libc-symbols.h index 03061ae..d833eb7 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -57,9 +57,11 @@ 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. */ diff --git a/posix/fnmatch.c b/posix/fnmatch.c index ca95ab4..c330a12 100644 --- a/posix/fnmatch.c +++ b/posix/fnmatch.c @@ -28,12 +28,7 @@ #include #include #include - -#if HAVE_STRING_H || defined _LIBC -# include -#else -# include -#endif +#include #if defined STDC_HEADERS || defined _LIBC # include