[svn] Use the system-provided fnmatch by default.

This commit is contained in:
hniksic 2005-06-27 06:27:13 -07:00
parent bb8a5f2eb9
commit b227a44f1a
3 changed files with 12 additions and 17 deletions

View File

@ -1,3 +1,7 @@
2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
* sysdep.h: Use the system-provided fnmatch by default.
2005-06-27 Hrvoje Niksic <hniksic@xemacs.org> 2005-06-27 Hrvoje Niksic <hniksic@xemacs.org>
* http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c. * http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.

View File

@ -1046,11 +1046,9 @@ const unsigned short int __mon_yday[2][13] =
and given a prefix, but many systems out there are still (as of and given a prefix, but many systems out there are still (as of
this writing in 2005) broken and we must cater to them. this writing in 2005) broken and we must cater to them.
Additionally, according to anecdotal evidence and conventional Additionally, according to some conventional, many historical
wisdom I lack courage to challenge, many implementations of fnmatch implementations of fnmatch are buggy and unreliable. If yours is
are notoriously buggy and unreliable. So we use our version by such, undefine SYSTEM_FNMATCH in sysdep.h and tell us about it. */
default, except when compiling under systems where fnmatch is known
to work (currently on GNU libc-based systems and Solaris.) */
#ifndef SYSTEM_FNMATCH #ifndef SYSTEM_FNMATCH

View File

@ -155,19 +155,12 @@ int vsnprintf ();
# define MAP_FAILED ((void *) -1) # define MAP_FAILED ((void *) -1)
#endif #endif
/* Enable system fnmatch only on systems where fnmatch.h is usable and /* Enable system fnmatch only on systems where fnmatch.h is usable.
which are known to have a non-broken fnmatch implementation. If the fnmatch on your system is buggy, undef this symbol and a
Currently those include glibc-based systems and Solaris. One could replacement implementation will be used instead. */
add more, but fnmatch is not that large, so it might be better to
play it safe. */
#ifdef HAVE_WORKING_FNMATCH_H #ifdef HAVE_WORKING_FNMATCH_H
# if defined __GLIBC__ && __GLIBC__ >= 2 # define SYSTEM_FNMATCH
# define SYSTEM_FNMATCH #endif
# endif
# ifdef solaris
# define SYSTEM_FNMATCH
# endif
#endif /* HAVE_WORKING_FNMATCH_H */
#ifdef SYSTEM_FNMATCH #ifdef SYSTEM_FNMATCH
# include <fnmatch.h> # include <fnmatch.h>