Work around problem reported by Steven M. Schweda in
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jun 2007 18:35:17 +0000 (18:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 6 Jun 2007 18:35:17 +0000 (18:35 +0000)
<http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
Tru64 5.1B with the Compaq compiler environment installed declares
an 'isblank' function but does not define it in the C library.
* lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
* lib/regex_internal.h (isblank): Likewise.
* m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
* m4/regex.m4 (gl_PREREQ_REGEX): Likewise.

ChangeLog
lib/fnmatch.c
lib/regex_internal.h
m4/fnmatch.m4
m4/regex.m4

index 5db2619..ce26322 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2007-06-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Work around problem reported by Steven M. Schweda in
+       <http://lists.gnu.org/archive/html/bug-tar/2007-06/msg00002.html>:
+       Tru64 5.1B with the Compaq compiler environment installed declares
+       an 'isblank' function but does not define it in the C library.
+       * lib/fnmatch.c (isblank): Check for HAVE_ISBLANK, too.
+       * lib/regex_internal.h (isblank): Likewise.
+       * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for isblank existence.
+       * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
+
 2007-06-05  Bruno Haible  <bruno@clisp.org>
 
        Fix *printf so that it recognizes non-IEEE numbers on i386, x86_64,
index 02dd365..48bc8b5 100644 (file)
@@ -85,7 +85,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
 #if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU
 
 
-# if ! (defined isblank || HAVE_DECL_ISBLANK)
+# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
 #  define isblank(c) ((c) == ' ' || (c) == '\t')
 # endif
 
index 9bbc6ac..5c07f93 100644 (file)
@@ -48,7 +48,7 @@
 #endif
 
 /* In case that the system doesn't have isblank().  */
-#if !defined _LIBC && !HAVE_DECL_ISBLANK && !defined isblank
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
 # define isblank(ch) ((ch) == ' ' || (ch) == '\t')
 #endif
 
index 3778742..34eb3d9 100644 (file)
@@ -83,7 +83,7 @@ AC_DEFUN([_AC_LIBOBJ_FNMATCH],
 [AC_REQUIRE([AC_FUNC_ALLOCA])dnl
 AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
 AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
-AC_CHECK_FUNCS_ONCE([btowc iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
+AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy])
 AC_CHECK_HEADERS_ONCE([wctype.h])
 AC_LIBOBJ([fnmatch])
 FNMATCH_H=fnmatch.h
index b8d5b1e..c064298 100644 (file)
@@ -206,6 +206,6 @@ AC_DEFUN([gl_PREREQ_REGEX],
 [
   AC_REQUIRE([AC_GNU_SOURCE])
   AC_REQUIRE([AC_C_RESTRICT])
-  AC_CHECK_FUNCS_ONCE([iswctype mbrtowc wcrtomb wcscoll])
+  AC_CHECK_FUNCS_ONCE([isblank iswctype mbrtowc wcrtomb wcscoll])
   AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
 ])