[svn] Enable SYSTEM_FNMATCH only if fnmatch.h is available.

This commit is contained in:
hniksic 2003-11-03 17:09:54 -08:00
parent 4f74ab0f44
commit 9af99f3b83
3 changed files with 20 additions and 10 deletions

View File

@ -1,3 +1,7 @@
2003-11-04 Hrvoje Niksic <hniksic@xemacs.org>
* sysdep.h: Define SYSTEM_FNMATCH only if HAVE_FNMATCH_H is true.
2003-11-03 Hrvoje Niksic <hniksic@xemacs.org> 2003-11-03 Hrvoje Niksic <hniksic@xemacs.org>
* utils.c (xsleep): New function. Uses nanosleep where available, * utils.c (xsleep): New function. Uses nanosleep where available,

View File

@ -233,6 +233,9 @@ char *alloca ();
/* Define if you have the <locale.h> header file. */ /* Define if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H #undef HAVE_LOCALE_H
/* Define if you have the <fnmatch.h> header file. */
#undef HAVE_FNMATCH_H
/* Define to be the name of the operating system. */ /* Define to be the name of the operating system. */
#undef OS_TYPE #undef OS_TYPE

View File

@ -219,16 +219,19 @@ void *memcpy ();
# define MAP_FAILED ((void *) -1) # define MAP_FAILED ((void *) -1)
#endif #endif
/* Enable system fnmatch only on systems where we know it works: /* Enable system fnmatch only on systems where fnmatch.h is usable and
currently glibc-based systems and Solaris. One could add more, but which are known to have a non-broken fnmatch implementation.
fnmatch is not that large, so it might be better to play it Currently those include glibc-based systems and Solaris. One could
safe. */ add more, but fnmatch is not that large, so it might be better to
#if defined __GLIBC__ && __GLIBC__ >= 2 play it safe. */
#ifdef HAVE_FNMATCH_H
# if defined __GLIBC__ && __GLIBC__ >= 2
# define SYSTEM_FNMATCH # define SYSTEM_FNMATCH
#endif # endif
#ifdef solaris # ifdef solaris
# define SYSTEM_FNMATCH # define SYSTEM_FNMATCH
#endif # endif
#endif /* HAVE_FNMATCH_H */
#ifdef SYSTEM_FNMATCH #ifdef SYSTEM_FNMATCH
# include <fnmatch.h> # include <fnmatch.h>