X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffnmatch.c;h=011a145038f8141daa48a63aee9cb498fe56c76e;hb=5e6933eb225721fac1de4a8abf6c0da985ddaa6a;hp=d0cd8cdd790945b301c1ea40cd89bbf9f21039c7;hpb=f48d647b2e16627ef3679f2f694480d35a19ae68;p=gnulib.git diff --git a/lib/fnmatch.c b/lib/fnmatch.c index d0cd8cdd7..011a14503 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -24,37 +24,24 @@ # define _GNU_SOURCE 1 #endif -#ifdef __GNUC__ -# define alloca __builtin_alloca -# define HAVE_ALLOCA 1 -#else -# if defined HAVE_ALLOCA_H || defined _LIBC -# include -# else -# ifdef _AIX - # pragma alloca -# else -# ifndef alloca -char *alloca (); -# endif -# endif -# endif -#endif - #if ! defined __builtin_expect && __GNUC__ < 3 # define __builtin_expect(expr, expected) (expr) #endif #include +#include #include #include #include #include +#include #include #include -#define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) +#define WIDE_CHAR_SUPPORT \ + (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC \ + && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) /* For platform which support the ISO C amendement 1 functionality we support user defined character classes. */ @@ -172,10 +159,6 @@ extern int fnmatch (const char *pattern, const char *string, int flags); /* Avoid depending on library functions or files whose names are inconsistent. */ -# ifndef errno -extern int errno; -# endif - /* Global variable. */ static int posixly_correct;