From 9af99f3b83199a695bf48fc0f646bdc2aa2013ad Mon Sep 17 00:00:00 2001 From: hniksic Date: Mon, 3 Nov 2003 17:09:54 -0800 Subject: [PATCH] [svn] Enable SYSTEM_FNMATCH only if fnmatch.h is available. --- src/ChangeLog | 4 ++++ src/config.h.in | 3 +++ src/sysdep.h | 23 +++++++++++++---------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e507c588..4352716f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-11-04 Hrvoje Niksic + + * sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true. + 2003-11-03 Hrvoje Niksic * utils.c (xsleep): New function. Uses nanosleep where available, diff --git a/src/config.h.in b/src/config.h.in index 2ae45ee8..abfbb8d8 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -233,6 +233,9 @@ char *alloca (); /* Define if you have the header file. */ #undef HAVE_LOCALE_H +/* Define if you have the header file. */ +#undef HAVE_FNMATCH_H + /* Define to be the name of the operating system. */ #undef OS_TYPE diff --git a/src/sysdep.h b/src/sysdep.h index 2c945795..e58daf33 100644 --- a/src/sysdep.h +++ b/src/sysdep.h @@ -219,16 +219,19 @@ void *memcpy (); # define MAP_FAILED ((void *) -1) #endif -/* Enable system fnmatch only on systems where we know it works: - currently glibc-based systems and Solaris. One could add more, but - fnmatch is not that large, so it might be better to play it - safe. */ -#if defined __GLIBC__ && __GLIBC__ >= 2 -# define SYSTEM_FNMATCH -#endif -#ifdef solaris -# define SYSTEM_FNMATCH -#endif +/* Enable system fnmatch only on systems where fnmatch.h is usable and + which are known to have a non-broken fnmatch implementation. + Currently those include glibc-based systems and Solaris. One could + add more, but fnmatch is not that large, so it might be better to + play it safe. */ +#ifdef HAVE_FNMATCH_H +# if defined __GLIBC__ && __GLIBC__ >= 2 +# define SYSTEM_FNMATCH +# endif +# ifdef solaris +# define SYSTEM_FNMATCH +# endif +#endif /* HAVE_FNMATCH_H */ #ifdef SYSTEM_FNMATCH # include -- 2.39.2