summaryrefslogtreecommitdiffstats
path: root/gl/m4/string_h.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/string_h.m4')
-rw-r--r--gl/m4/string_h.m420
1 files changed, 14 insertions, 6 deletions
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 1977aec..cc5fbbb 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,11 +1,11 @@
1# Configure a GNU-like replacement for <string.h>. 1# Configure a GNU-like replacement for <string.h>.
2 2
3# Copyright (C) 2007-2010 Free Software Foundation, Inc. 3# Copyright (C) 2007-2013 Free Software Foundation, Inc.
4# This file is free software; the Free Software Foundation 4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it, 5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved. 6# with or without modifications, as long as this notice is preserved.
7 7
8# serial 17 8# serial 21
9 9
10# Written by Paul Eggert. 10# Written by Paul Eggert.
11 11
@@ -20,16 +20,16 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY],
20[ 20[
21 AC_REQUIRE([AC_C_RESTRICT]) 21 AC_REQUIRE([AC_C_RESTRICT])
22 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) 22 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
23 gl_CHECK_NEXT_HEADERS([string.h]) 23 gl_NEXT_HEADERS([string.h])
24 24
25 dnl Check for declarations of anything we want to poison if the 25 dnl Check for declarations of anything we want to poison if the
26 dnl corresponding gnulib module is not in use, and which is not 26 dnl corresponding gnulib module is not in use, and which is not
27 dnl guaranteed by C89. 27 dnl guaranteed by C89.
28 gl_WARN_ON_USE_PREPARE([[#include <string.h> 28 gl_WARN_ON_USE_PREPARE([[#include <string.h>
29 ]], 29 ]],
30 [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup 30 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
31 strncat strndup strnlen strpbrk strsep strcasestr strtok_r strsignal 31 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
32 strverscmp]) 32 strerror_r strsignal strverscmp])
33]) 33])
34 34
35AC_DEFUN([gl_STRING_MODULE_INDICATOR], 35AC_DEFUN([gl_STRING_MODULE_INDICATOR],
@@ -43,6 +43,8 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR],
43 43
44AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 44AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
45[ 45[
46 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
47 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
46 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) 48 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
47 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) 49 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
48 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) 50 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
@@ -75,10 +77,13 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
75 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) 77 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
76 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) 78 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
77 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) 79 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
80 GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
78 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) 81 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
79 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) 82 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
80 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) 83 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
81 dnl Assume proper GNU behavior unless another module says otherwise. 84 dnl Assume proper GNU behavior unless another module says otherwise.
85 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
86 HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
82 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) 87 HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR])
83 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) 88 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
84 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) 89 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
@@ -94,6 +99,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
94 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) 99 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
95 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) 100 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
96 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) 101 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
102 HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
97 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) 103 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
98 HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) 104 HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
99 REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) 105 REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
@@ -102,7 +108,9 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
102 REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) 108 REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
103 REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) 109 REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
104 REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) 110 REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
111 REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
105 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) 112 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
113 REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
106 REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) 114 REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
107 REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) 115 REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
108 REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) 116 REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])