mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Use the system-provided fnmatch by default.
This commit is contained in:
parent
bb8a5f2eb9
commit
b227a44f1a
@ -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>
|
||||
|
||||
* http.c (mktime_from_utc): Renamed to timegm and moved to cmpt.c.
|
||||
|
@ -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
|
||||
this writing in 2005) broken and we must cater to them.
|
||||
|
||||
Additionally, according to anecdotal evidence and conventional
|
||||
wisdom I lack courage to challenge, many implementations of fnmatch
|
||||
are notoriously buggy and unreliable. So we use our version by
|
||||
default, except when compiling under systems where fnmatch is known
|
||||
to work (currently on GNU libc-based systems and Solaris.) */
|
||||
Additionally, according to some conventional, many historical
|
||||
implementations of fnmatch are buggy and unreliable. If yours is
|
||||
such, undefine SYSTEM_FNMATCH in sysdep.h and tell us about it. */
|
||||
|
||||
#ifndef SYSTEM_FNMATCH
|
||||
|
||||
|
17
src/sysdep.h
17
src/sysdep.h
@ -155,19 +155,12 @@ int vsnprintf ();
|
||||
# define MAP_FAILED ((void *) -1)
|
||||
#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. */
|
||||
/* Enable system fnmatch only on systems where fnmatch.h is usable.
|
||||
If the fnmatch on your system is buggy, undef this symbol and a
|
||||
replacement implementation will be used instead. */
|
||||
#ifdef HAVE_WORKING_FNMATCH_H
|
||||
# if defined __GLIBC__ && __GLIBC__ >= 2
|
||||
# define SYSTEM_FNMATCH
|
||||
# endif
|
||||
# ifdef solaris
|
||||
# define SYSTEM_FNMATCH
|
||||
# endif
|
||||
#endif /* HAVE_WORKING_FNMATCH_H */
|
||||
# define SYSTEM_FNMATCH
|
||||
#endif
|
||||
|
||||
#ifdef SYSTEM_FNMATCH
|
||||
# include <fnmatch.h>
|
||||
|
Loading…
Reference in New Issue
Block a user