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