]> sjero.net Git - wget/commitdiff
[svn] Enable SYSTEM_FNMATCH only if fnmatch.h is available.
authorhniksic <devnull@localhost>
Tue, 4 Nov 2003 01:09:54 +0000 (17:09 -0800)
committerhniksic <devnull@localhost>
Tue, 4 Nov 2003 01:09:54 +0000 (17:09 -0800)
src/ChangeLog
src/config.h.in
src/sysdep.h

index e507c588a822f2871151f5a4caa5c90a5f623a58..4352716fa08fbd22d794b2cccf5c97f2282eee6f 100644 (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>
 
        * utils.c (xsleep): New function.  Uses nanosleep where available,
index 2ae45ee8d5bd9b95a6161d4fa8933c867668b850..abfbb8d814ab575647292ca8faf3a1076fffb8c1 100644 (file)
@@ -233,6 +233,9 @@ char *alloca ();
 /* Define if you have the <locale.h> header file.  */
 #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.  */
 #undef OS_TYPE
 
index 2c94579501ebb83edcacbca747693f56ca9ed138..e58daf331e5776017ab8eed830f8a695aec68ff5 100644 (file)
@@ -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 <fnmatch.h>