1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A GNU-like <string.h>.
4 
5    Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc.
6 
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3, or (at your option)
10    any later version.
11 
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16 
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, see <https://www.gnu.org/licenses/>.  */
19 
20 #if __GNUC__ >= 3
21 @PRAGMA_SYSTEM_HEADER@
22 #endif
23 @PRAGMA_COLUMNS@
24 
25 #if defined _GL_ALREADY_INCLUDING_STRING_H
26 /* Special invocation convention:
27    - On OS X/NetBSD we have a sequence of nested includes
28        <string.h> -> <strings.h> -> "string.h"
29      In this situation system _chk variants due to -D_FORTIFY_SOURCE
30      might be used after any replacements defined here.  */
31 
32 #@INCLUDE_NEXT@ @NEXT_STRING_H@
33 
34 #else
35 /* Normal invocation convention.  */
36 
37 #ifndef _@GUARD_PREFIX@_STRING_H
38 
39 #define _GL_ALREADY_INCLUDING_STRING_H
40 
41 /* The include_next requires a split double-inclusion guard.  */
42 #@INCLUDE_NEXT@ @NEXT_STRING_H@
43 
44 #undef _GL_ALREADY_INCLUDING_STRING_H
45 
46 #ifndef _@GUARD_PREFIX@_STRING_H
47 #define _@GUARD_PREFIX@_STRING_H
48 
49 /* NetBSD 5.0 mis-defines NULL.  */
50 #include <stddef.h>
51 
52 /* MirBSD defines mbslen as a macro.  */
53 #if @GNULIB_MBSLEN@ && defined __MirBSD__
54 # include <wchar.h>
55 #endif
56 
57 /* The __attribute__ feature is available in gcc versions 2.5 and later.
58    The attribute __pure__ was added in gcc 2.96.  */
59 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
60 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
61 #else
62 # define _GL_ATTRIBUTE_PURE /* empty */
63 #endif
64 
65 /* NetBSD 5.0 declares strsignal in <unistd.h>, not in <string.h>.  */
66 /* But in any case avoid namespace pollution on glibc systems.  */
67 #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
68     && ! defined __GLIBC__
69 # include <unistd.h>
70 #endif
71 
72 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
73 
74 /* The definition of _GL_ARG_NONNULL is copied here.  */
75 
76 /* The definition of _GL_WARN_ON_USE is copied here.  */
77 
78 
79 /* Clear a block of memory.  The compiler will not delete a call to
80    this function, even if the block is dead after the call.  */
81 #if @GNULIB_EXPLICIT_BZERO@
82 # if ! @HAVE_EXPLICIT_BZERO@
83 _GL_FUNCDECL_SYS (explicit_bzero, void,
84                   (void *__dest, size_t __n) _GL_ARG_NONNULL ((1)));
85 # endif
86 _GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n));
87 _GL_CXXALIASWARN (explicit_bzero);
88 #elif defined GNULIB_POSIXCHECK
89 # undef explicit_bzero
90 # if HAVE_RAW_DECL_EXPLICIT_BZERO
91 _GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - "
92                  "use gnulib module explicit_bzero for portability");
93 # endif
94 #endif
95 
96 /* Find the index of the least-significant set bit.  */
97 #if @GNULIB_FFSL@
98 # if !@HAVE_FFSL@
99 _GL_FUNCDECL_SYS (ffsl, int, (long int i));
100 # endif
101 _GL_CXXALIAS_SYS (ffsl, int, (long int i));
102 _GL_CXXALIASWARN (ffsl);
103 #elif defined GNULIB_POSIXCHECK
104 # undef ffsl
105 # if HAVE_RAW_DECL_FFSL
106 _GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module");
107 # endif
108 #endif
109 
110 
111 /* Find the index of the least-significant set bit.  */
112 #if @GNULIB_FFSLL@
113 # if !@HAVE_FFSLL@
114 _GL_FUNCDECL_SYS (ffsll, int, (long long int i));
115 # endif
116 _GL_CXXALIAS_SYS (ffsll, int, (long long int i));
117 _GL_CXXALIASWARN (ffsll);
118 #elif defined GNULIB_POSIXCHECK
119 # undef ffsll
120 # if HAVE_RAW_DECL_FFSLL
121 _GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module");
122 # endif
123 #endif
124 
125 
126 /* Return the first instance of C within N bytes of S, or NULL.  */
127 #if @GNULIB_MEMCHR@
128 # if @REPLACE_MEMCHR@
129 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
130 #   define memchr rpl_memchr
131 #  endif
132 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
133                                   _GL_ATTRIBUTE_PURE
134                                   _GL_ARG_NONNULL ((1)));
135 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
136 # else
137 #  if ! @HAVE_MEMCHR@
138 _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
139                                   _GL_ATTRIBUTE_PURE
140                                   _GL_ARG_NONNULL ((1)));
141 #  endif
142   /* On some systems, this function is defined as an overloaded function:
143        extern "C" { const void * std::memchr (const void *, int, size_t); }
144        extern "C++" { void * std::memchr (void *, int, size_t); }  */
145 _GL_CXXALIAS_SYS_CAST2 (memchr,
146                         void *, (void const *__s, int __c, size_t __n),
147                         void const *, (void const *__s, int __c, size_t __n));
148 # endif
149 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
150      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
151 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
152 _GL_CXXALIASWARN1 (memchr, void const *,
153                    (void const *__s, int __c, size_t __n));
154 # else
155 _GL_CXXALIASWARN (memchr);
156 # endif
157 #elif defined GNULIB_POSIXCHECK
158 # undef memchr
159 /* Assume memchr is always declared.  */
160 _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
161                  "use gnulib module memchr for portability" );
162 #endif
163 
164 /* Return the first occurrence of NEEDLE in HAYSTACK.  */
165 #if @GNULIB_MEMMEM@
166 # if @REPLACE_MEMMEM@
167 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
168 #   define memmem rpl_memmem
169 #  endif
170 _GL_FUNCDECL_RPL (memmem, void *,
171                   (void const *__haystack, size_t __haystack_len,
172                    void const *__needle, size_t __needle_len)
173                   _GL_ATTRIBUTE_PURE
174                   _GL_ARG_NONNULL ((1, 3)));
175 _GL_CXXALIAS_RPL (memmem, void *,
176                   (void const *__haystack, size_t __haystack_len,
177                    void const *__needle, size_t __needle_len));
178 # else
179 #  if ! @HAVE_DECL_MEMMEM@
180 _GL_FUNCDECL_SYS (memmem, void *,
181                   (void const *__haystack, size_t __haystack_len,
182                    void const *__needle, size_t __needle_len)
183                   _GL_ATTRIBUTE_PURE
184                   _GL_ARG_NONNULL ((1, 3)));
185 #  endif
186 _GL_CXXALIAS_SYS (memmem, void *,
187                   (void const *__haystack, size_t __haystack_len,
188                    void const *__needle, size_t __needle_len));
189 # endif
190 _GL_CXXALIASWARN (memmem);
191 #elif defined GNULIB_POSIXCHECK
192 # undef memmem
193 # if HAVE_RAW_DECL_MEMMEM
194 _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
195                  "use gnulib module memmem-simple for portability, "
196                  "and module memmem for speed" );
197 # endif
198 #endif
199 
200 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
201    last written byte.  */
202 #if @GNULIB_MEMPCPY@
203 # if ! @HAVE_MEMPCPY@
204 _GL_FUNCDECL_SYS (mempcpy, void *,
205                   (void *restrict __dest, void const *restrict __src,
206                    size_t __n)
207                   _GL_ARG_NONNULL ((1, 2)));
208 # endif
209 _GL_CXXALIAS_SYS (mempcpy, void *,
210                   (void *restrict __dest, void const *restrict __src,
211                    size_t __n));
212 _GL_CXXALIASWARN (mempcpy);
213 #elif defined GNULIB_POSIXCHECK
214 # undef mempcpy
215 # if HAVE_RAW_DECL_MEMPCPY
216 _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
217                  "use gnulib module mempcpy for portability");
218 # endif
219 #endif
220 
221 /* Search backwards through a block for a byte (specified as an int).  */
222 #if @GNULIB_MEMRCHR@
223 # if ! @HAVE_DECL_MEMRCHR@
224 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
225                                    _GL_ATTRIBUTE_PURE
226                                    _GL_ARG_NONNULL ((1)));
227 # endif
228   /* On some systems, this function is defined as an overloaded function:
229        extern "C++" { const void * std::memrchr (const void *, int, size_t); }
230        extern "C++" { void * std::memrchr (void *, int, size_t); }  */
231 _GL_CXXALIAS_SYS_CAST2 (memrchr,
232                         void *, (void const *, int, size_t),
233                         void const *, (void const *, int, size_t));
234 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
235      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
236 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
237 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
238 # else
239 _GL_CXXALIASWARN (memrchr);
240 # endif
241 #elif defined GNULIB_POSIXCHECK
242 # undef memrchr
243 # if HAVE_RAW_DECL_MEMRCHR
244 _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
245                  "use gnulib module memrchr for portability");
246 # endif
247 #endif
248 
249 /* Find the first occurrence of C in S.  More efficient than
250    memchr(S,C,N), at the expense of undefined behavior if C does not
251    occur within N bytes.  */
252 #if @GNULIB_RAWMEMCHR@
253 # if ! @HAVE_RAWMEMCHR@
254 _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
255                                      _GL_ATTRIBUTE_PURE
256                                      _GL_ARG_NONNULL ((1)));
257 # endif
258   /* On some systems, this function is defined as an overloaded function:
259        extern "C++" { const void * std::rawmemchr (const void *, int); }
260        extern "C++" { void * std::rawmemchr (void *, int); }  */
261 _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
262                         void *, (void const *__s, int __c_in),
263                         void const *, (void const *__s, int __c_in));
264 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
265      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
266 _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
267 _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
268 # else
269 _GL_CXXALIASWARN (rawmemchr);
270 # endif
271 #elif defined GNULIB_POSIXCHECK
272 # undef rawmemchr
273 # if HAVE_RAW_DECL_RAWMEMCHR
274 _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
275                  "use gnulib module rawmemchr for portability");
276 # endif
277 #endif
278 
279 /* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
280 #if @GNULIB_STPCPY@
281 # if ! @HAVE_STPCPY@
282 _GL_FUNCDECL_SYS (stpcpy, char *,
283                   (char *restrict __dst, char const *restrict __src)
284                   _GL_ARG_NONNULL ((1, 2)));
285 # endif
286 _GL_CXXALIAS_SYS (stpcpy, char *,
287                   (char *restrict __dst, char const *restrict __src));
288 _GL_CXXALIASWARN (stpcpy);
289 #elif defined GNULIB_POSIXCHECK
290 # undef stpcpy
291 # if HAVE_RAW_DECL_STPCPY
292 _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
293                  "use gnulib module stpcpy for portability");
294 # endif
295 #endif
296 
297 /* Copy no more than N bytes of SRC to DST, returning a pointer past the
298    last non-NUL byte written into DST.  */
299 #if @GNULIB_STPNCPY@
300 # if @REPLACE_STPNCPY@
301 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
302 #   undef stpncpy
303 #   define stpncpy rpl_stpncpy
304 #  endif
305 _GL_FUNCDECL_RPL (stpncpy, char *,
306                   (char *restrict __dst, char const *restrict __src,
307                    size_t __n)
308                   _GL_ARG_NONNULL ((1, 2)));
309 _GL_CXXALIAS_RPL (stpncpy, char *,
310                   (char *restrict __dst, char const *restrict __src,
311                    size_t __n));
312 # else
313 #  if ! @HAVE_STPNCPY@
314 _GL_FUNCDECL_SYS (stpncpy, char *,
315                   (char *restrict __dst, char const *restrict __src,
316                    size_t __n)
317                   _GL_ARG_NONNULL ((1, 2)));
318 #  endif
319 _GL_CXXALIAS_SYS (stpncpy, char *,
320                   (char *restrict __dst, char const *restrict __src,
321                    size_t __n));
322 # endif
323 _GL_CXXALIASWARN (stpncpy);
324 #elif defined GNULIB_POSIXCHECK
325 # undef stpncpy
326 # if HAVE_RAW_DECL_STPNCPY
327 _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
328                  "use gnulib module stpncpy for portability");
329 # endif
330 #endif
331 
332 #if defined GNULIB_POSIXCHECK
333 /* strchr() does not work with multibyte strings if the locale encoding is
334    GB18030 and the character to be searched is a digit.  */
335 # undef strchr
336 /* Assume strchr is always declared.  */
337 _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
338                  "in some multibyte locales - "
339                  "use mbschr if you care about internationalization");
340 #endif
341 
342 /* Find the first occurrence of C in S or the final NUL byte.  */
343 #if @GNULIB_STRCHRNUL@
344 # if @REPLACE_STRCHRNUL@
345 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
346 #   define strchrnul rpl_strchrnul
347 #  endif
348 _GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in)
349                                      _GL_ATTRIBUTE_PURE
350                                      _GL_ARG_NONNULL ((1)));
351 _GL_CXXALIAS_RPL (strchrnul, char *,
352                   (const char *str, int ch));
353 # else
354 #  if ! @HAVE_STRCHRNUL@
355 _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
356                                      _GL_ATTRIBUTE_PURE
357                                      _GL_ARG_NONNULL ((1)));
358 #  endif
359   /* On some systems, this function is defined as an overloaded function:
360        extern "C++" { const char * std::strchrnul (const char *, int); }
361        extern "C++" { char * std::strchrnul (char *, int); }  */
362 _GL_CXXALIAS_SYS_CAST2 (strchrnul,
363                         char *, (char const *__s, int __c_in),
364                         char const *, (char const *__s, int __c_in));
365 # endif
366 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
367      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
368 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
369 _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
370 # else
371 _GL_CXXALIASWARN (strchrnul);
372 # endif
373 #elif defined GNULIB_POSIXCHECK
374 # undef strchrnul
375 # if HAVE_RAW_DECL_STRCHRNUL
376 _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
377                  "use gnulib module strchrnul for portability");
378 # endif
379 #endif
380 
381 /* Duplicate S, returning an identical malloc'd string.  */
382 #if @GNULIB_STRDUP@
383 # if @REPLACE_STRDUP@
384 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
385 #   undef strdup
386 #   define strdup rpl_strdup
387 #  endif
388 _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
389 _GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
390 # else
391 #  if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
392     /* strdup exists as a function and as a macro.  Get rid of the macro.  */
393 #   undef strdup
394 #  endif
395 #  if !(@HAVE_DECL_STRDUP@ || defined strdup)
396 _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
397 #  endif
398 _GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
399 # endif
400 _GL_CXXALIASWARN (strdup);
401 #elif defined GNULIB_POSIXCHECK
402 # undef strdup
403 # if HAVE_RAW_DECL_STRDUP
404 _GL_WARN_ON_USE (strdup, "strdup is unportable - "
405                  "use gnulib module strdup for portability");
406 # endif
407 #endif
408 
409 /* Append no more than N characters from SRC onto DEST.  */
410 #if @GNULIB_STRNCAT@
411 # if @REPLACE_STRNCAT@
412 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
413 #   undef strncat
414 #   define strncat rpl_strncat
415 #  endif
416 _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
417                                    _GL_ARG_NONNULL ((1, 2)));
418 _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
419 # else
420 _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
421 # endif
422 _GL_CXXALIASWARN (strncat);
423 #elif defined GNULIB_POSIXCHECK
424 # undef strncat
425 # if HAVE_RAW_DECL_STRNCAT
426 _GL_WARN_ON_USE (strncat, "strncat is unportable - "
427                  "use gnulib module strncat for portability");
428 # endif
429 #endif
430 
431 /* Return a newly allocated copy of at most N bytes of STRING.  */
432 #if @GNULIB_STRNDUP@
433 # if @REPLACE_STRNDUP@
434 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
435 #   undef strndup
436 #   define strndup rpl_strndup
437 #  endif
438 _GL_FUNCDECL_RPL (strndup, char *, (char const *__s, size_t __n)
439                                    _GL_ARG_NONNULL ((1)));
440 _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
441 # else
442 #  if ! @HAVE_DECL_STRNDUP@
443 _GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n)
444                                    _GL_ARG_NONNULL ((1)));
445 #  endif
446 _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
447 # endif
448 _GL_CXXALIASWARN (strndup);
449 #elif defined GNULIB_POSIXCHECK
450 # undef strndup
451 # if HAVE_RAW_DECL_STRNDUP
452 _GL_WARN_ON_USE (strndup, "strndup is unportable - "
453                  "use gnulib module strndup for portability");
454 # endif
455 #endif
456 
457 /* Find the length (number of bytes) of STRING, but scan at most
458    MAXLEN bytes.  If no '\0' terminator is found in that many bytes,
459    return MAXLEN.  */
460 #if @GNULIB_STRNLEN@
461 # if @REPLACE_STRNLEN@
462 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
463 #   undef strnlen
464 #   define strnlen rpl_strnlen
465 #  endif
466 _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)
467                                    _GL_ATTRIBUTE_PURE
468                                    _GL_ARG_NONNULL ((1)));
469 _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen));
470 # else
471 #  if ! @HAVE_DECL_STRNLEN@
472 _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)
473                                    _GL_ATTRIBUTE_PURE
474                                    _GL_ARG_NONNULL ((1)));
475 #  endif
476 _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen));
477 # endif
478 _GL_CXXALIASWARN (strnlen);
479 #elif defined GNULIB_POSIXCHECK
480 # undef strnlen
481 # if HAVE_RAW_DECL_STRNLEN
482 _GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
483                  "use gnulib module strnlen for portability");
484 # endif
485 #endif
486 
487 #if defined GNULIB_POSIXCHECK
488 /* strcspn() assumes the second argument is a list of single-byte characters.
489    Even in this simple case, it does not work with multibyte strings if the
490    locale encoding is GB18030 and one of the characters to be searched is a
491    digit.  */
492 # undef strcspn
493 /* Assume strcspn is always declared.  */
494 _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
495                  "in multibyte locales - "
496                  "use mbscspn if you care about internationalization");
497 #endif
498 
499 /* Find the first occurrence in S of any character in ACCEPT.  */
500 #if @GNULIB_STRPBRK@
501 # if ! @HAVE_STRPBRK@
502 _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
503                                    _GL_ATTRIBUTE_PURE
504                                    _GL_ARG_NONNULL ((1, 2)));
505 # endif
506   /* On some systems, this function is defined as an overloaded function:
507        extern "C" { const char * strpbrk (const char *, const char *); }
508        extern "C++" { char * strpbrk (char *, const char *); }  */
509 _GL_CXXALIAS_SYS_CAST2 (strpbrk,
510                         char *, (char const *__s, char const *__accept),
511                         const char *, (char const *__s, char const *__accept));
512 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
513      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
514 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
515 _GL_CXXALIASWARN1 (strpbrk, char const *,
516                    (char const *__s, char const *__accept));
517 # else
518 _GL_CXXALIASWARN (strpbrk);
519 # endif
520 # if defined GNULIB_POSIXCHECK
521 /* strpbrk() assumes the second argument is a list of single-byte characters.
522    Even in this simple case, it does not work with multibyte strings if the
523    locale encoding is GB18030 and one of the characters to be searched is a
524    digit.  */
525 #  undef strpbrk
526 _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
527                  "in multibyte locales - "
528                  "use mbspbrk if you care about internationalization");
529 # endif
530 #elif defined GNULIB_POSIXCHECK
531 # undef strpbrk
532 # if HAVE_RAW_DECL_STRPBRK
533 _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
534                  "use gnulib module strpbrk for portability");
535 # endif
536 #endif
537 
538 #if defined GNULIB_POSIXCHECK
539 /* strspn() assumes the second argument is a list of single-byte characters.
540    Even in this simple case, it cannot work with multibyte strings.  */
541 # undef strspn
542 /* Assume strspn is always declared.  */
543 _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
544                  "in multibyte locales - "
545                  "use mbsspn if you care about internationalization");
546 #endif
547 
548 #if defined GNULIB_POSIXCHECK
549 /* strrchr() does not work with multibyte strings if the locale encoding is
550    GB18030 and the character to be searched is a digit.  */
551 # undef strrchr
552 /* Assume strrchr is always declared.  */
553 _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
554                  "in some multibyte locales - "
555                  "use mbsrchr if you care about internationalization");
556 #endif
557 
558 /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
559    If one is found, overwrite it with a NUL, and advance *STRINGP
560    to point to the next char after it.  Otherwise, set *STRINGP to NULL.
561    If *STRINGP was already NULL, nothing happens.
562    Return the old value of *STRINGP.
563 
564    This is a variant of strtok() that is multithread-safe and supports
565    empty fields.
566 
567    Caveat: It modifies the original string.
568    Caveat: These functions cannot be used on constant strings.
569    Caveat: The identity of the delimiting character is lost.
570    Caveat: It doesn't work with multibyte strings unless all of the delimiter
571            characters are ASCII characters < 0x30.
572 
573    See also strtok_r().  */
574 #if @GNULIB_STRSEP@
575 # if ! @HAVE_STRSEP@
576 _GL_FUNCDECL_SYS (strsep, char *,
577                   (char **restrict __stringp, char const *restrict __delim)
578                   _GL_ARG_NONNULL ((1, 2)));
579 # endif
580 _GL_CXXALIAS_SYS (strsep, char *,
581                   (char **restrict __stringp, char const *restrict __delim));
582 _GL_CXXALIASWARN (strsep);
583 # if defined GNULIB_POSIXCHECK
584 #  undef strsep
585 _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
586                  "in multibyte locales - "
587                  "use mbssep if you care about internationalization");
588 # endif
589 #elif defined GNULIB_POSIXCHECK
590 # undef strsep
591 # if HAVE_RAW_DECL_STRSEP
592 _GL_WARN_ON_USE (strsep, "strsep is unportable - "
593                  "use gnulib module strsep for portability");
594 # endif
595 #endif
596 
597 #if @GNULIB_STRSTR@
598 # if @REPLACE_STRSTR@
599 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
600 #   define strstr rpl_strstr
601 #  endif
602 _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
603                                   _GL_ATTRIBUTE_PURE
604                                   _GL_ARG_NONNULL ((1, 2)));
605 _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
606 # else
607   /* On some systems, this function is defined as an overloaded function:
608        extern "C++" { const char * strstr (const char *, const char *); }
609        extern "C++" { char * strstr (char *, const char *); }  */
610 _GL_CXXALIAS_SYS_CAST2 (strstr,
611                         char *, (const char *haystack, const char *needle),
612                         const char *, (const char *haystack, const char *needle));
613 # endif
614 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
615      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
616 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
617 _GL_CXXALIASWARN1 (strstr, const char *,
618                    (const char *haystack, const char *needle));
619 # else
620 _GL_CXXALIASWARN (strstr);
621 # endif
622 #elif defined GNULIB_POSIXCHECK
623 /* strstr() does not work with multibyte strings if the locale encoding is
624    different from UTF-8:
625    POSIX says that it operates on "strings", and "string" in POSIX is defined
626    as a sequence of bytes, not of characters.  */
627 # undef strstr
628 /* Assume strstr is always declared.  */
629 _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
630                  "work correctly on character strings in most "
631                  "multibyte locales - "
632                  "use mbsstr if you care about internationalization, "
633                  "or use strstr if you care about speed");
634 #endif
635 
636 /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
637    comparison.  */
638 #if @GNULIB_STRCASESTR@
639 # if @REPLACE_STRCASESTR@
640 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
641 #   define strcasestr rpl_strcasestr
642 #  endif
643 _GL_FUNCDECL_RPL (strcasestr, char *,
644                   (const char *haystack, const char *needle)
645                   _GL_ATTRIBUTE_PURE
646                   _GL_ARG_NONNULL ((1, 2)));
647 _GL_CXXALIAS_RPL (strcasestr, char *,
648                   (const char *haystack, const char *needle));
649 # else
650 #  if ! @HAVE_STRCASESTR@
651 _GL_FUNCDECL_SYS (strcasestr, char *,
652                   (const char *haystack, const char *needle)
653                   _GL_ATTRIBUTE_PURE
654                   _GL_ARG_NONNULL ((1, 2)));
655 #  endif
656   /* On some systems, this function is defined as an overloaded function:
657        extern "C++" { const char * strcasestr (const char *, const char *); }
658        extern "C++" { char * strcasestr (char *, const char *); }  */
659 _GL_CXXALIAS_SYS_CAST2 (strcasestr,
660                         char *, (const char *haystack, const char *needle),
661                         const char *, (const char *haystack, const char *needle));
662 # endif
663 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
664      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
665 _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
666 _GL_CXXALIASWARN1 (strcasestr, const char *,
667                    (const char *haystack, const char *needle));
668 # else
669 _GL_CXXALIASWARN (strcasestr);
670 # endif
671 #elif defined GNULIB_POSIXCHECK
672 /* strcasestr() does not work with multibyte strings:
673    It is a glibc extension, and glibc implements it only for unibyte
674    locales.  */
675 # undef strcasestr
676 # if HAVE_RAW_DECL_STRCASESTR
677 _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
678                  "strings in multibyte locales - "
679                  "use mbscasestr if you care about "
680                  "internationalization, or use c-strcasestr if you want "
681                  "a locale independent function");
682 # endif
683 #endif
684 
685 /* Parse S into tokens separated by characters in DELIM.
686    If S is NULL, the saved pointer in SAVE_PTR is used as
687    the next starting point.  For example:
688         char s[] = "-abc-=-def";
689         char *sp;
690         x = strtok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
691         x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
692         x = strtok_r(NULL, "=", &sp);   // x = NULL
693                 // s = "abc\0-def\0"
694 
695    This is a variant of strtok() that is multithread-safe.
696 
697    For the POSIX documentation for this function, see:
698    http://www.opengroup.org/susv3xsh/strtok.html
699 
700    Caveat: It modifies the original string.
701    Caveat: These functions cannot be used on constant strings.
702    Caveat: The identity of the delimiting character is lost.
703    Caveat: It doesn't work with multibyte strings unless all of the delimiter
704            characters are ASCII characters < 0x30.
705 
706    See also strsep().  */
707 #if @GNULIB_STRTOK_R@
708 # if @REPLACE_STRTOK_R@
709 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
710 #   undef strtok_r
711 #   define strtok_r rpl_strtok_r
712 #  endif
713 _GL_FUNCDECL_RPL (strtok_r, char *,
714                   (char *restrict s, char const *restrict delim,
715                    char **restrict save_ptr)
716                   _GL_ARG_NONNULL ((2, 3)));
717 _GL_CXXALIAS_RPL (strtok_r, char *,
718                   (char *restrict s, char const *restrict delim,
719                    char **restrict save_ptr));
720 # else
721 #  if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
722 #   undef strtok_r
723 #  endif
724 #  if ! @HAVE_DECL_STRTOK_R@
725 _GL_FUNCDECL_SYS (strtok_r, char *,
726                   (char *restrict s, char const *restrict delim,
727                    char **restrict save_ptr)
728                   _GL_ARG_NONNULL ((2, 3)));
729 #  endif
730 _GL_CXXALIAS_SYS (strtok_r, char *,
731                   (char *restrict s, char const *restrict delim,
732                    char **restrict save_ptr));
733 # endif
734 _GL_CXXALIASWARN (strtok_r);
735 # if defined GNULIB_POSIXCHECK
736 _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
737                  "strings in multibyte locales - "
738                  "use mbstok_r if you care about internationalization");
739 # endif
740 #elif defined GNULIB_POSIXCHECK
741 # undef strtok_r
742 # if HAVE_RAW_DECL_STRTOK_R
743 _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
744                  "use gnulib module strtok_r for portability");
745 # endif
746 #endif
747 
748 
749 /* The following functions are not specified by POSIX.  They are gnulib
750    extensions.  */
751 
752 #if @GNULIB_MBSLEN@
753 /* Return the number of multibyte characters in the character string STRING.
754    This considers multibyte characters, unlike strlen, which counts bytes.  */
755 # ifdef __MirBSD__  /* MirBSD defines mbslen as a macro.  Override it.  */
756 #  undef mbslen
757 # endif
758 # if @HAVE_MBSLEN@  /* AIX, OSF/1, MirBSD define mbslen already in libc.  */
759 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
760 #   define mbslen rpl_mbslen
761 #  endif
762 _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string)
763                                   _GL_ATTRIBUTE_PURE
764                                   _GL_ARG_NONNULL ((1)));
765 _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
766 # else
767 _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
768                                   _GL_ATTRIBUTE_PURE
769                                   _GL_ARG_NONNULL ((1)));
770 _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
771 # endif
772 _GL_CXXALIASWARN (mbslen);
773 #endif
774 
775 #if @GNULIB_MBSNLEN@
776 /* Return the number of multibyte characters in the character string starting
777    at STRING and ending at STRING + LEN.  */
778 _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
779      _GL_ATTRIBUTE_PURE
780      _GL_ARG_NONNULL ((1));
781 #endif
782 
783 #if @GNULIB_MBSCHR@
784 /* Locate the first single-byte character C in the character string STRING,
785    and return a pointer to it.  Return NULL if C is not found in STRING.
786    Unlike strchr(), this function works correctly in multibyte locales with
787    encodings such as GB18030.  */
788 # if defined __hpux
789 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
790 #   define mbschr rpl_mbschr /* avoid collision with HP-UX function */
791 #  endif
792 _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
793                                   _GL_ATTRIBUTE_PURE
794                                   _GL_ARG_NONNULL ((1)));
795 _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
796 # else
797 _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
798                                   _GL_ATTRIBUTE_PURE
799                                   _GL_ARG_NONNULL ((1)));
800 _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
801 # endif
802 _GL_CXXALIASWARN (mbschr);
803 #endif
804 
805 #if @GNULIB_MBSRCHR@
806 /* Locate the last single-byte character C in the character string STRING,
807    and return a pointer to it.  Return NULL if C is not found in STRING.
808    Unlike strrchr(), this function works correctly in multibyte locales with
809    encodings such as GB18030.  */
810 # if defined __hpux || defined __INTERIX
811 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
812 #   define mbsrchr rpl_mbsrchr /* avoid collision with system function */
813 #  endif
814 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
815                                    _GL_ATTRIBUTE_PURE
816                                    _GL_ARG_NONNULL ((1)));
817 _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
818 # else
819 _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
820                                    _GL_ATTRIBUTE_PURE
821                                    _GL_ARG_NONNULL ((1)));
822 _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
823 # endif
824 _GL_CXXALIASWARN (mbsrchr);
825 #endif
826 
827 #if @GNULIB_MBSSTR@
828 /* Find the first occurrence of the character string NEEDLE in the character
829    string HAYSTACK.  Return NULL if NEEDLE is not found in HAYSTACK.
830    Unlike strstr(), this function works correctly in multibyte locales with
831    encodings different from UTF-8.  */
832 _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
833      _GL_ATTRIBUTE_PURE
834      _GL_ARG_NONNULL ((1, 2));
835 #endif
836 
837 #if @GNULIB_MBSCASECMP@
838 /* Compare the character strings S1 and S2, ignoring case, returning less than,
839    equal to or greater than zero if S1 is lexicographically less than, equal to
840    or greater than S2.
841    Note: This function may, in multibyte locales, return 0 for strings of
842    different lengths!
843    Unlike strcasecmp(), this function works correctly in multibyte locales.  */
844 _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
845      _GL_ATTRIBUTE_PURE
846      _GL_ARG_NONNULL ((1, 2));
847 #endif
848 
849 #if @GNULIB_MBSNCASECMP@
850 /* Compare the initial segment of the character string S1 consisting of at most
851    N characters with the initial segment of the character string S2 consisting
852    of at most N characters, ignoring case, returning less than, equal to or
853    greater than zero if the initial segment of S1 is lexicographically less
854    than, equal to or greater than the initial segment of S2.
855    Note: This function may, in multibyte locales, return 0 for initial segments
856    of different lengths!
857    Unlike strncasecmp(), this function works correctly in multibyte locales.
858    But beware that N is not a byte count but a character count!  */
859 _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
860      _GL_ATTRIBUTE_PURE
861      _GL_ARG_NONNULL ((1, 2));
862 #endif
863 
864 #if @GNULIB_MBSPCASECMP@
865 /* Compare the initial segment of the character string STRING consisting of
866    at most mbslen (PREFIX) characters with the character string PREFIX,
867    ignoring case.  If the two match, return a pointer to the first byte
868    after this prefix in STRING.  Otherwise, return NULL.
869    Note: This function may, in multibyte locales, return non-NULL if STRING
870    is of smaller length than PREFIX!
871    Unlike strncasecmp(), this function works correctly in multibyte
872    locales.  */
873 _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
874      _GL_ATTRIBUTE_PURE
875      _GL_ARG_NONNULL ((1, 2));
876 #endif
877 
878 #if @GNULIB_MBSCASESTR@
879 /* Find the first occurrence of the character string NEEDLE in the character
880    string HAYSTACK, using case-insensitive comparison.
881    Note: This function may, in multibyte locales, return success even if
882    strlen (haystack) < strlen (needle) !
883    Unlike strcasestr(), this function works correctly in multibyte locales.  */
884 _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
885      _GL_ATTRIBUTE_PURE
886      _GL_ARG_NONNULL ((1, 2));
887 #endif
888 
889 #if @GNULIB_MBSCSPN@
890 /* Find the first occurrence in the character string STRING of any character
891    in the character string ACCEPT.  Return the number of bytes from the
892    beginning of the string to this occurrence, or to the end of the string
893    if none exists.
894    Unlike strcspn(), this function works correctly in multibyte locales.  */
895 _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
896      _GL_ATTRIBUTE_PURE
897      _GL_ARG_NONNULL ((1, 2));
898 #endif
899 
900 #if @GNULIB_MBSPBRK@
901 /* Find the first occurrence in the character string STRING of any character
902    in the character string ACCEPT.  Return the pointer to it, or NULL if none
903    exists.
904    Unlike strpbrk(), this function works correctly in multibyte locales.  */
905 # if defined __hpux
906 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
907 #   define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
908 #  endif
909 _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
910                                    _GL_ATTRIBUTE_PURE
911                                    _GL_ARG_NONNULL ((1, 2)));
912 _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
913 # else
914 _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
915                                    _GL_ATTRIBUTE_PURE
916                                    _GL_ARG_NONNULL ((1, 2)));
917 _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
918 # endif
919 _GL_CXXALIASWARN (mbspbrk);
920 #endif
921 
922 #if @GNULIB_MBSSPN@
923 /* Find the first occurrence in the character string STRING of any character
924    not in the character string REJECT.  Return the number of bytes from the
925    beginning of the string to this occurrence, or to the end of the string
926    if none exists.
927    Unlike strspn(), this function works correctly in multibyte locales.  */
928 _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
929      _GL_ATTRIBUTE_PURE
930      _GL_ARG_NONNULL ((1, 2));
931 #endif
932 
933 #if @GNULIB_MBSSEP@
934 /* Search the next delimiter (multibyte character listed in the character
935    string DELIM) starting at the character string *STRINGP.
936    If one is found, overwrite it with a NUL, and advance *STRINGP to point
937    to the next multibyte character after it.  Otherwise, set *STRINGP to NULL.
938    If *STRINGP was already NULL, nothing happens.
939    Return the old value of *STRINGP.
940 
941    This is a variant of mbstok_r() that supports empty fields.
942 
943    Caveat: It modifies the original string.
944    Caveat: These functions cannot be used on constant strings.
945    Caveat: The identity of the delimiting character is lost.
946 
947    See also mbstok_r().  */
948 _GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
949      _GL_ARG_NONNULL ((1, 2));
950 #endif
951 
952 #if @GNULIB_MBSTOK_R@
953 /* Parse the character string STRING into tokens separated by characters in
954    the character string DELIM.
955    If STRING is NULL, the saved pointer in SAVE_PTR is used as
956    the next starting point.  For example:
957         char s[] = "-abc-=-def";
958         char *sp;
959         x = mbstok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
960         x = mbstok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
961         x = mbstok_r(NULL, "=", &sp);   // x = NULL
962                 // s = "abc\0-def\0"
963 
964    Caveat: It modifies the original string.
965    Caveat: These functions cannot be used on constant strings.
966    Caveat: The identity of the delimiting character is lost.
967 
968    See also mbssep().  */
969 _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
970      _GL_ARG_NONNULL ((2, 3));
971 #endif
972 
973 /* Map any int, typically from errno, into an error message.  */
974 #if @GNULIB_STRERROR@
975 # if @REPLACE_STRERROR@
976 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
977 #   undef strerror
978 #   define strerror rpl_strerror
979 #  endif
980 _GL_FUNCDECL_RPL (strerror, char *, (int));
981 _GL_CXXALIAS_RPL (strerror, char *, (int));
982 # else
983 _GL_CXXALIAS_SYS (strerror, char *, (int));
984 # endif
985 _GL_CXXALIASWARN (strerror);
986 #elif defined GNULIB_POSIXCHECK
987 # undef strerror
988 /* Assume strerror is always declared.  */
989 _GL_WARN_ON_USE (strerror, "strerror is unportable - "
990                  "use gnulib module strerror to guarantee non-NULL result");
991 #endif
992 
993 /* Map any int, typically from errno, into an error message.  Multithread-safe.
994    Uses the POSIX declaration, not the glibc declaration.  */
995 #if @GNULIB_STRERROR_R@
996 # if @REPLACE_STRERROR_R@
997 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
998 #   undef strerror_r
999 #   define strerror_r rpl_strerror_r
1000 #  endif
1001 _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
1002                                    _GL_ARG_NONNULL ((2)));
1003 _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
1004 # else
1005 #  if !@HAVE_DECL_STRERROR_R@
1006 _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
1007                                    _GL_ARG_NONNULL ((2)));
1008 #  endif
1009 _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
1010 # endif
1011 # if @HAVE_DECL_STRERROR_R@
1012 _GL_CXXALIASWARN (strerror_r);
1013 # endif
1014 #elif defined GNULIB_POSIXCHECK
1015 # undef strerror_r
1016 # if HAVE_RAW_DECL_STRERROR_R
1017 _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
1018                  "use gnulib module strerror_r-posix for portability");
1019 # endif
1020 #endif
1021 
1022 #if @GNULIB_STRSIGNAL@
1023 # if @REPLACE_STRSIGNAL@
1024 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1025 #   define strsignal rpl_strsignal
1026 #  endif
1027 _GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
1028 _GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
1029 # else
1030 #  if ! @HAVE_DECL_STRSIGNAL@
1031 _GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
1032 #  endif
1033 /* Need to cast, because on Cygwin 1.5.x systems, the return type is
1034    'const char *'.  */
1035 _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
1036 # endif
1037 _GL_CXXALIASWARN (strsignal);
1038 #elif defined GNULIB_POSIXCHECK
1039 # undef strsignal
1040 # if HAVE_RAW_DECL_STRSIGNAL
1041 _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
1042                  "use gnulib module strsignal for portability");
1043 # endif
1044 #endif
1045 
1046 #if @GNULIB_STRVERSCMP@
1047 # if !@HAVE_STRVERSCMP@
1048 _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
1049                                    _GL_ATTRIBUTE_PURE
1050                                    _GL_ARG_NONNULL ((1, 2)));
1051 # endif
1052 _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
1053 _GL_CXXALIASWARN (strverscmp);
1054 #elif defined GNULIB_POSIXCHECK
1055 # undef strverscmp
1056 # if HAVE_RAW_DECL_STRVERSCMP
1057 _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
1058                  "use gnulib module strverscmp for portability");
1059 # endif
1060 #endif
1061 
1062 
1063 #endif /* _@GUARD_PREFIX@_STRING_H */
1064 #endif /* _@GUARD_PREFIX@_STRING_H */
1065 #endif
1066