summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog21
-rw-r--r--m4/memmem.m43
-rw-r--r--m4/mempcpy.m44
-rw-r--r--m4/memrchr.m43
-rw-r--r--m4/stpcpy.m43
-rw-r--r--m4/stpncpy.m44
-rw-r--r--m4/strcase.m46
-rw-r--r--m4/strcasestr.m43
-rw-r--r--m4/strchrnul.m43
-rw-r--r--m4/strdup.m43
-rw-r--r--m4/string_h.m44
-rw-r--r--m4/strndup.m43
-rw-r--r--m4/strnlen.m45
-rw-r--r--m4/strpbrk.m43
-rw-r--r--m4/strsep.m43
-rw-r--r--m4/strstr.m47
-rw-r--r--m4/strtok_r.m43
17 files changed, 61 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 5b03bf98c0..ee4782fa7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
2007-01-27 Bruno Haible <bruno@clisp.org>
+ * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
+ from gl_HEADER_STRING_H_BODY.
+ (gl_HEADER_STRING_H_BODY): Require it.
+ * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
+ * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
+ * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
+ * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
+ * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
+ * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
+ * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
+ * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
+ * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
+ * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
+ * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
+ * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
+ * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
+ * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
+ * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
+
+2007-01-27 Bruno Haible <bruno@clisp.org>
+
* gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
check_PROGRAMS into noinst_PROGRAMS.
(func_emit_tests_Makefile_am): Likewise. Also don't initialize
diff --git a/m4/memmem.m4 b/m4/memmem.m4
index e4806950f3..e6d40068e4 100644
--- a/m4/memmem.m4
+++ b/m4/memmem.m4
@@ -1,4 +1,4 @@
-# memmem.m4 serial 3
+# memmem.m4 serial 4
dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_MEMMEM],
dnl Persuade glibc <string.h> to declare memmem().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(memmem)
AC_CHECK_DECLS_ONCE(memmem)
if test $ac_cv_have_decl_memmem = no; then
diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4
index efb2eb05b4..e2b39d0826 100644
--- a/m4/mempcpy.m4
+++ b/m4/mempcpy.m4
@@ -1,4 +1,4 @@
-# mempcpy.m4 serial 5
+# mempcpy.m4 serial 6
dnl Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,10 +6,10 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_MEMPCPY],
[
-
dnl Persuade glibc <string.h> to declare mempcpy().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(mempcpy)
if test $ac_cv_func_mempcpy = no; then
HAVE_MEMPCPY=0
diff --git a/m4/memrchr.m4 b/m4/memrchr.m4
index 8d511b0618..69674ff418 100644
--- a/m4/memrchr.m4
+++ b/m4/memrchr.m4
@@ -1,4 +1,4 @@
-# memrchr.m4 serial 6
+# memrchr.m4 serial 7
dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_MEMRCHR],
dnl Persuade glibc <string.h> to declare memrchr().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([memrchr])
if test $ac_cv_have_decl_memrchr = no; then
HAVE_DECL_MEMRCHR=0
diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4
index b64a662506..d42196e3da 100644
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -1,4 +1,4 @@
-# stpcpy.m4 serial 2
+# stpcpy.m4 serial 3
dnl Copyright (C) 2002, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STPCPY],
dnl Persuade glibc <string.h> to declare stpcpy().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(stpcpy)
if test $ac_cv_func_stpcpy = no; then
HAVE_STPCPY=0
diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4
index 8852579369..7e15186caf 100644
--- a/m4/stpncpy.m4
+++ b/m4/stpncpy.m4
@@ -1,4 +1,4 @@
-# stpncpy.m4 serial 5
+# stpncpy.m4 serial 6
dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,8 @@ AC_DEFUN([gl_FUNC_STPNCPY],
dnl Persuade glibc <string.h> to declare stpncpy().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+
dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function
dnl declared in <string.h>. Its side effects are the same as those
dnl of strncpy():
diff --git a/m4/strcase.m4 b/m4/strcase.m4
index bcb969e996..f8275d9af3 100644
--- a/m4/strcase.m4
+++ b/m4/strcase.m4
@@ -1,4 +1,4 @@
-# strcase.m4 serial 5
+# strcase.m4 serial 6
dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,15 +12,17 @@ AC_DEFUN([gl_STRCASE],
AC_DEFUN([gl_FUNC_STRCASECMP],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
dnl No known system has a strcasecmp() function that works correctly in
dnl multibyte locales. Therefore we use our version always.
AC_LIBOBJ(strcasecmp)
- gl_PREREQ_STRCASECMP
REPLACE_STRCASECMP=1
+ gl_PREREQ_STRCASECMP
])
AC_DEFUN([gl_FUNC_STRNCASECMP],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strncasecmp)
if test $ac_cv_func_strncasecmp = no; then
gl_PREREQ_STRNCASECMP
diff --git a/m4/strcasestr.m4 b/m4/strcasestr.m4
index 92a0f1554c..61c348a36e 100644
--- a/m4/strcasestr.m4
+++ b/m4/strcasestr.m4
@@ -1,4 +1,4 @@
-# strcasestr.m4 serial 3
+# strcasestr.m4 serial 4
dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRCASESTR],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
dnl No known system has a strcasestr() function that works correctly in
dnl multibyte locales. Therefore we use our version always.
AC_LIBOBJ(strcasestr)
diff --git a/m4/strchrnul.m4 b/m4/strchrnul.m4
index e778d51c7f..fec2a10d96 100644
--- a/m4/strchrnul.m4
+++ b/m4/strchrnul.m4
@@ -1,4 +1,4 @@
-# strchrnul.m4 serial 4
+# strchrnul.m4 serial 5
dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STRCHRNUL],
dnl Persuade glibc <string.h> to declare strchrnul().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strchrnul)
if test $ac_cv_func_strchrnul = no; then
HAVE_STRCHRNUL=0
diff --git a/m4/strdup.m4 b/m4/strdup.m4
index bb38f25ac4..8796e9e02f 100644
--- a/m4/strdup.m4
+++ b/m4/strdup.m4
@@ -1,4 +1,4 @@
-# strdup.m4 serial 8
+# strdup.m4 serial 9
dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software
dnl Foundation, Inc.
@@ -9,6 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRDUP],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strdup)
AC_CHECK_DECLS_ONCE(strdup)
if test $ac_cv_have_decl_strdup = no; then
diff --git a/m4/string_h.m4 b/m4/string_h.m4
index 9fbdffdde2..84db7a59ba 100644
--- a/m4/string_h.m4
+++ b/m4/string_h.m4
@@ -17,10 +17,14 @@ AC_DEFUN([gl_HEADER_STRING_H],
AC_DEFUN([gl_HEADER_STRING_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
gl_ABSOLUTE_HEADER([string.h])
ABSOLUTE_STRING_H=\"$gl_cv_absolute_string_h\"
AC_SUBST([ABSOLUTE_STRING_H])
+])
+AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+[
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
diff --git a/m4/strndup.m4 b/m4/strndup.m4
index d421caebb1..baa6c03b8c 100644
--- a/m4/strndup.m4
+++ b/m4/strndup.m4
@@ -1,4 +1,4 @@
-# strndup.m4 serial 12
+# strndup.m4 serial 13
dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STRNDUP],
dnl Persuade glibc <string.h> to declare strndup().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([strndup])
if test $ac_cv_have_decl_strndup = no; then
HAVE_DECL_STRNDUP=0
diff --git a/m4/strnlen.m4 b/m4/strnlen.m4
index e722883471..0e2815b90e 100644
--- a/m4/strnlen.m4
+++ b/m4/strnlen.m4
@@ -1,5 +1,5 @@
-# strnlen.m4 serial 7
-dnl Copyright (C) 2002-2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# strnlen.m4 serial 8
+dnl Copyright (C) 2002-2003, 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STRNLEN],
dnl Persuade glibc <string.h> to declare strnlen().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([strnlen])
if test $ac_cv_have_decl_strnlen = no; then
HAVE_DECL_STRNLEN=0
diff --git a/m4/strpbrk.m4 b/m4/strpbrk.m4
index 80f71d49f8..0398d45dbb 100644
--- a/m4/strpbrk.m4
+++ b/m4/strpbrk.m4
@@ -1,4 +1,4 @@
-# strpbrk.m4 serial 3
+# strpbrk.m4 serial 4
dnl Copyright (C) 2002-2003, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRPBRK],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strpbrk)
if test $ac_cv_func_strpbrk = no; then
HAVE_STRPBRK=0
diff --git a/m4/strsep.m4 b/m4/strsep.m4
index a1a624b567..6073adb388 100644
--- a/m4/strsep.m4
+++ b/m4/strsep.m4
@@ -1,4 +1,4 @@
-# strsep.m4 serial 4
+# strsep.m4 serial 5
dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_STRSEP],
dnl Persuade glibc <string.h> to declare strsep().
AC_REQUIRE([AC_GNU_SOURCE])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strsep)
if test $ac_cv_func_strsep = no; then
HAVE_STRSEP=0
diff --git a/m4/strstr.m4 b/m4/strstr.m4
index 3639131c71..97eb0a8bd9 100644
--- a/m4/strstr.m4
+++ b/m4/strstr.m4
@@ -1,16 +1,17 @@
-# strstr.m4 serial 5
-dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+# strstr.m4 serial 6
+dnl Copyright (C) 2002-2003, 2005, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRSTR],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
dnl No known system has a strstr() function that works correctly in
dnl multibyte locales. Therefore we use our version always.
AC_LIBOBJ(strstr)
- gl_PREREQ_STRSTR
REPLACE_STRSTR=1
+ gl_PREREQ_STRSTR
])
# Prerequisites of lib/strstr.c.
diff --git a/m4/strtok_r.m4 b/m4/strtok_r.m4
index c18dc58774..a354aab4ef 100644
--- a/m4/strtok_r.m4
+++ b/m4/strtok_r.m4
@@ -1,4 +1,4 @@
-# strtok_r.m4 serial 4
+# strtok_r.m4 serial 5
dnl Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRTOK_R],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_REPLACE_FUNCS(strtok_r)
AC_CHECK_DECLS_ONCE(strtok_r)
if test $ac_cv_have_decl_strtok_r = no; then