gnulib: update to 776af40e0
[deliverable/binutils-gdb.git] / gnulib / import / m4 / string_h.m4
CommitLineData
f6ea5628
DJ
1# Configure a GNU-like replacement for <string.h>.
2
9c9d63b1 3# Copyright (C) 2007-2021 Free Software Foundation, Inc.
f6ea5628
DJ
4# This file is free software; the Free Software Foundation
5# gives unlimited permission to copy and/or distribute it,
6# with or without modifications, as long as this notice is preserved.
7
9c9d63b1 8# serial 29
f6ea5628
DJ
9
10# Written by Paul Eggert.
11
12AC_DEFUN([gl_HEADER_STRING_H],
13[
14 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
15 dnl once only, before all statements that occur in other macros.
16 AC_REQUIRE([gl_HEADER_STRING_H_BODY])
17])
18
19AC_DEFUN([gl_HEADER_STRING_H_BODY],
20[
f6ea5628 21 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
770d76d7 22 gl_NEXT_HEADERS([string.h])
f434ba03
PA
23
24 dnl Check for declarations of anything we want to poison if the
25 dnl corresponding gnulib module is not in use, and which is not
26 dnl guaranteed by C89.
27 gl_WARN_ON_USE_PREPARE([[#include <string.h>
28 ]],
770d76d7
PA
29 [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
30 strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
9c9d63b1 31 strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
698be2d8
CB
32
33 AC_REQUIRE([AC_C_RESTRICT])
f6ea5628
DJ
34])
35
36AC_DEFUN([gl_STRING_MODULE_INDICATOR],
37[
38 dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
39 AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
f434ba03
PA
40 gl_MODULE_INDICATOR_SET_VARIABLE([$1])
41 dnl Define it also as a C macro, for the benefit of the unit tests.
42 gl_MODULE_INDICATOR_FOR_TESTS([$1])
f6ea5628
DJ
43])
44
45AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
46[
9c9d63b1
PM
47 GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO])
48 GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL])
49 GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL])
50 GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
51 GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
52 GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
53 GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
54 GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
55 GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
56 GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
57 GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
58 GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
59 GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT])
60 GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
61 GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
62 GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
63 GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
64 GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
65 GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
66 GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
67 GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
68 GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
69 GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
70 GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
71 GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
72 GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
73 GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
74 GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
75 GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
76 GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
77 GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
78 GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
79 GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
80 GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
81 GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
82 GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R])
83 GNULIB_STRERRORNAME_NP=0; AC_SUBST([GNULIB_STRERRORNAME_NP])
84 GNULIB_SIGABBREV_NP=0; AC_SUBST([GNULIB_SIGABBREV_NP])
85 GNULIB_SIGDESCR_NP=0; AC_SUBST([GNULIB_SIGDESCR_NP])
86 GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
87 GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
88 HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
89 dnl Support Microsoft deprecated alias function names by default.
90 GNULIB_MDA_MEMCCPY=1; AC_SUBST([GNULIB_MDA_MEMCCPY])
91 GNULIB_MDA_STRDUP=1; AC_SUBST([GNULIB_MDA_STRDUP])
f6ea5628 92 dnl Assume proper GNU behavior unless another module says otherwise.
c0c3707f 93 HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
770d76d7
PA
94 HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
95 HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
f434ba03
PA
96 HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
97 HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
98 HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
99 HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
100 HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
101 HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
102 HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
103 HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
104 HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
105 HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
106 HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
107 HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
108 HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
109 HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
770d76d7 110 HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
9c9d63b1
PM
111 HAVE_STRERRORNAME_NP=1; AC_SUBST([HAVE_STRERRORNAME_NP])
112 HAVE_SIGABBREV_NP=1; AC_SUBST([HAVE_SIGABBREV_NP])
113 HAVE_SIGDESCR_NP=1; AC_SUBST([HAVE_SIGDESCR_NP])
f434ba03
PA
114 HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
115 HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
9c9d63b1 116 REPLACE_FFSLL=0; AC_SUBST([REPLACE_FFSLL])
f434ba03
PA
117 REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
118 REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
119 REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
c0c3707f 120 REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
f434ba03 121 REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
c0c3707f
CB
122 REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
123 REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
124 REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
f434ba03
PA
125 REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
126 REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
c0c3707f 127 REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
f434ba03 128 REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
770d76d7 129 REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
9c9d63b1 130 REPLACE_STRERRORNAME_NP=0; AC_SUBST([REPLACE_STRERRORNAME_NP])
f434ba03 131 REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
f434ba03 132 UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
f6ea5628 133])
This page took 1.436132 seconds and 4 git commands to generate.