From 2ce77368532559c41f09c5cdb1514fde558c9975 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 10 Sep 2003 08:36:22 +0000 Subject: [PATCH] Include fnmatch.h first, to test interface. Include , , unconditionally. (getenv): Remove decl. (fnmatch): Define using a prototype. --- lib/fnmatch.c | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/lib/fnmatch.c b/lib/fnmatch.c index 73dc0e78ec..fe4e502a51 100644 --- a/lib/fnmatch.c +++ b/lib/fnmatch.c @@ -1,5 +1,5 @@ /* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, - 2002 Free Software Foundation, Inc. + 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -45,23 +45,14 @@ char *alloca (); # define __builtin_expect(expr, expected) (expr) #endif -#include -#include #include -#include - -#if HAVE_STRING_H || defined _LIBC -# include -#else -# if HAVE_STRINGS_H -# include -# endif -#endif -#if defined STDC_HEADERS || defined _LIBC -# include -# include -#endif +#include +#include +#include +#include +#include +#include #define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) @@ -178,10 +169,6 @@ extern int fnmatch (const char *pattern, const char *string, int flags); /* Avoid depending on library functions or files whose names are inconsistent. */ -# if !defined _LIBC && !defined getenv && !HAVE_DECL_GETENV -extern char *getenv (); -# endif - # ifndef errno extern int errno; # endif @@ -328,10 +315,7 @@ is_char_class (const wchar_t *wcs) int -fnmatch (pattern, string, flags) - const char *pattern; - const char *string; - int flags; +fnmatch (const char *pattern, const char *string, int flags) { # if HANDLE_MULTIBYTE if (__builtin_expect (MB_CUR_MAX, 1) != 1) -- 2.47.2