Imported Upstream version 1.3.14
[debian/gzip] / lib / 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-2009 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, write to the Free Software Foundation,
19    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
20
21 #ifndef _GL_STRING_H
22
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26
27 /* The include_next requires a split double-inclusion guard.  */
28 #@INCLUDE_NEXT@ @NEXT_STRING_H@
29
30 #ifndef _GL_STRING_H
31 #define _GL_STRING_H
32
33 /* NetBSD 5.0 mis-defines NULL.  */
34 #include <stddef.h>
35
36 #ifndef __attribute__
37 /* This feature is available in gcc versions 2.5 and later.  */
38 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
39 #  define __attribute__(Spec) /* empty */
40 # endif
41 /* The attribute __pure__ was added in gcc 2.96.  */
42 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
43 #  define __pure__ /* empty */
44 # endif
45 #endif
46
47
48 /* The definition of GL_LINK_WARNING is copied here.  */
49
50
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54
55
56 /* Return the first instance of C within N bytes of S, or NULL.  */
57 #if @GNULIB_MEMCHR@
58 # if @REPLACE_MEMCHR@
59 #  define memchr rpl_memchr
60 extern void *memchr (void const *__s, int __c, size_t __n)
61   __attribute__ ((__pure__));
62 # endif
63 #elif defined GNULIB_POSIXCHECK
64 # undef memchr
65 # define memchr(s,c,n) \
66     (GL_LINK_WARNING ("memchr has platform-specific bugs - " \
67                       "use gnulib module memchr for portability" ), \
68      memchr (s, c, n))
69 #endif
70
71 /* Return the first occurrence of NEEDLE in HAYSTACK.  */
72 #if @GNULIB_MEMMEM@
73 # if @REPLACE_MEMMEM@
74 #  define memmem rpl_memmem
75 # endif
76 # if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@
77 extern void *memmem (void const *__haystack, size_t __haystack_len,
78                      void const *__needle, size_t __needle_len)
79   __attribute__ ((__pure__));
80 # endif
81 #elif defined GNULIB_POSIXCHECK
82 # undef memmem
83 # define memmem(a,al,b,bl) \
84     (GL_LINK_WARNING ("memmem is unportable and often quadratic - " \
85                       "use gnulib module memmem-simple for portability, " \
86                       "and module memmem for speed" ), \
87      memmem (a, al, b, bl))
88 #endif
89
90 /* Copy N bytes of SRC to DEST, return pointer to bytes after the
91    last written byte.  */
92 #if @GNULIB_MEMPCPY@
93 # if ! @HAVE_MEMPCPY@
94 extern void *mempcpy (void *restrict __dest, void const *restrict __src,
95                       size_t __n);
96 # endif
97 #elif defined GNULIB_POSIXCHECK
98 # undef mempcpy
99 # define mempcpy(a,b,n) \
100     (GL_LINK_WARNING ("mempcpy is unportable - " \
101                       "use gnulib module mempcpy for portability"), \
102      mempcpy (a, b, n))
103 #endif
104
105 /* Search backwards through a block for a byte (specified as an int).  */
106 #if @GNULIB_MEMRCHR@
107 # if ! @HAVE_DECL_MEMRCHR@
108 extern void *memrchr (void const *, int, size_t)
109   __attribute__ ((__pure__));
110 # endif
111 #elif defined GNULIB_POSIXCHECK
112 # undef memrchr
113 # define memrchr(a,b,c) \
114     (GL_LINK_WARNING ("memrchr is unportable - " \
115                       "use gnulib module memrchr for portability"), \
116      memrchr (a, b, c))
117 #endif
118
119 /* Find the first occurrence of C in S.  More efficient than
120    memchr(S,C,N), at the expense of undefined behavior if C does not
121    occur within N bytes.  */
122 #if @GNULIB_RAWMEMCHR@
123 # if ! @HAVE_RAWMEMCHR@
124 extern void *rawmemchr (void const *__s, int __c_in)
125   __attribute__ ((__pure__));
126 # endif
127 #elif defined GNULIB_POSIXCHECK
128 # undef rawmemchr
129 # define rawmemchr(a,b) \
130     (GL_LINK_WARNING ("rawmemchr is unportable - " \
131                       "use gnulib module rawmemchr for portability"), \
132      rawmemchr (a, b))
133 #endif
134
135 /* Copy SRC to DST, returning the address of the terminating '\0' in DST.  */
136 #if @GNULIB_STPCPY@
137 # if ! @HAVE_STPCPY@
138 extern char *stpcpy (char *restrict __dst, char const *restrict __src);
139 # endif
140 #elif defined GNULIB_POSIXCHECK
141 # undef stpcpy
142 # define stpcpy(a,b) \
143     (GL_LINK_WARNING ("stpcpy is unportable - " \
144                       "use gnulib module stpcpy for portability"), \
145      stpcpy (a, b))
146 #endif
147
148 /* Copy no more than N bytes of SRC to DST, returning a pointer past the
149    last non-NUL byte written into DST.  */
150 #if @GNULIB_STPNCPY@
151 # if ! @HAVE_STPNCPY@
152 #  define stpncpy gnu_stpncpy
153 extern char *stpncpy (char *restrict __dst, char const *restrict __src,
154                       size_t __n);
155 # endif
156 #elif defined GNULIB_POSIXCHECK
157 # undef stpncpy
158 # define stpncpy(a,b,n) \
159     (GL_LINK_WARNING ("stpncpy is unportable - " \
160                       "use gnulib module stpncpy for portability"), \
161      stpncpy (a, b, n))
162 #endif
163
164 #if defined GNULIB_POSIXCHECK
165 /* strchr() does not work with multibyte strings if the locale encoding is
166    GB18030 and the character to be searched is a digit.  */
167 # undef strchr
168 # define strchr(s,c) \
169     (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
170                       "in some multibyte locales - " \
171                       "use mbschr if you care about internationalization"), \
172      strchr (s, c))
173 #endif
174
175 /* Find the first occurrence of C in S or the final NUL byte.  */
176 #if @GNULIB_STRCHRNUL@
177 # if ! @HAVE_STRCHRNUL@
178 extern char *strchrnul (char const *__s, int __c_in)
179   __attribute__ ((__pure__));
180 # endif
181 #elif defined GNULIB_POSIXCHECK
182 # undef strchrnul
183 # define strchrnul(a,b) \
184     (GL_LINK_WARNING ("strchrnul is unportable - " \
185                       "use gnulib module strchrnul for portability"), \
186      strchrnul (a, b))
187 #endif
188
189 /* Duplicate S, returning an identical malloc'd string.  */
190 #if @GNULIB_STRDUP@
191 # if @REPLACE_STRDUP@
192 #  undef strdup
193 #  define strdup rpl_strdup
194 # endif
195 # if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
196 extern char *strdup (char const *__s);
197 # endif
198 #elif defined GNULIB_POSIXCHECK
199 # undef strdup
200 # define strdup(a) \
201     (GL_LINK_WARNING ("strdup is unportable - " \
202                       "use gnulib module strdup for portability"), \
203      strdup (a))
204 #endif
205
206 /* Return a newly allocated copy of at most N bytes of STRING.  */
207 #if @GNULIB_STRNDUP@
208 # if @REPLACE_STRNDUP@
209 #  undef strndup
210 #  define strndup rpl_strndup
211 # endif
212 # if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
213 extern char *strndup (char const *__string, size_t __n);
214 # endif
215 #elif defined GNULIB_POSIXCHECK
216 # undef strndup
217 # define strndup(a,n) \
218     (GL_LINK_WARNING ("strndup is unportable - " \
219                       "use gnulib module strndup for portability"), \
220      strndup (a, n))
221 #endif
222
223 /* Find the length (number of bytes) of STRING, but scan at most
224    MAXLEN bytes.  If no '\0' terminator is found in that many bytes,
225    return MAXLEN.  */
226 #if @GNULIB_STRNLEN@
227 # if ! @HAVE_DECL_STRNLEN@
228 extern size_t strnlen (char const *__string, size_t __maxlen)
229   __attribute__ ((__pure__));
230 # endif
231 #elif defined GNULIB_POSIXCHECK
232 # undef strnlen
233 # define strnlen(a,n) \
234     (GL_LINK_WARNING ("strnlen is unportable - " \
235                       "use gnulib module strnlen for portability"), \
236      strnlen (a, n))
237 #endif
238
239 #if defined GNULIB_POSIXCHECK
240 /* strcspn() assumes the second argument is a list of single-byte characters.
241    Even in this simple case, it does not work with multibyte strings if the
242    locale encoding is GB18030 and one of the characters to be searched is a
243    digit.  */
244 # undef strcspn
245 # define strcspn(s,a) \
246     (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
247                       "in multibyte locales - " \
248                       "use mbscspn if you care about internationalization"), \
249      strcspn (s, a))
250 #endif
251
252 /* Find the first occurrence in S of any character in ACCEPT.  */
253 #if @GNULIB_STRPBRK@
254 # if ! @HAVE_STRPBRK@
255 extern char *strpbrk (char const *__s, char const *__accept)
256   __attribute__ ((__pure__));
257 # endif
258 # if defined GNULIB_POSIXCHECK
259 /* strpbrk() assumes the second argument is a list of single-byte characters.
260    Even in this simple case, it does not work with multibyte strings if the
261    locale encoding is GB18030 and one of the characters to be searched is a
262    digit.  */
263 #  undef strpbrk
264 #  define strpbrk(s,a) \
265      (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
266                        "in multibyte locales - " \
267                        "use mbspbrk if you care about internationalization"), \
268       strpbrk (s, a))
269 # endif
270 #elif defined GNULIB_POSIXCHECK
271 # undef strpbrk
272 # define strpbrk(s,a) \
273     (GL_LINK_WARNING ("strpbrk is unportable - " \
274                       "use gnulib module strpbrk for portability"), \
275      strpbrk (s, a))
276 #endif
277
278 #if defined GNULIB_POSIXCHECK
279 /* strspn() assumes the second argument is a list of single-byte characters.
280    Even in this simple case, it cannot work with multibyte strings.  */
281 # undef strspn
282 # define strspn(s,a) \
283     (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
284                       "in multibyte locales - " \
285                       "use mbsspn if you care about internationalization"), \
286      strspn (s, a))
287 #endif
288
289 #if defined GNULIB_POSIXCHECK
290 /* strrchr() does not work with multibyte strings if the locale encoding is
291    GB18030 and the character to be searched is a digit.  */
292 # undef strrchr
293 # define strrchr(s,c) \
294     (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
295                       "in some multibyte locales - " \
296                       "use mbsrchr if you care about internationalization"), \
297      strrchr (s, c))
298 #endif
299
300 /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
301    If one is found, overwrite it with a NUL, and advance *STRINGP
302    to point to the next char after it.  Otherwise, set *STRINGP to NULL.
303    If *STRINGP was already NULL, nothing happens.
304    Return the old value of *STRINGP.
305
306    This is a variant of strtok() that is multithread-safe and supports
307    empty fields.
308
309    Caveat: It modifies the original string.
310    Caveat: These functions cannot be used on constant strings.
311    Caveat: The identity of the delimiting character is lost.
312    Caveat: It doesn't work with multibyte strings unless all of the delimiter
313            characters are ASCII characters < 0x30.
314
315    See also strtok_r().  */
316 #if @GNULIB_STRSEP@
317 # if ! @HAVE_STRSEP@
318 extern char *strsep (char **restrict __stringp, char const *restrict __delim);
319 # endif
320 # if defined GNULIB_POSIXCHECK
321 #  undef strsep
322 #  define strsep(s,d) \
323      (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
324                        "in multibyte locales - " \
325                        "use mbssep if you care about internationalization"), \
326       strsep (s, d))
327 # endif
328 #elif defined GNULIB_POSIXCHECK
329 # undef strsep
330 # define strsep(s,d) \
331     (GL_LINK_WARNING ("strsep is unportable - " \
332                       "use gnulib module strsep for portability"), \
333      strsep (s, d))
334 #endif
335
336 #if @GNULIB_STRSTR@
337 # if @REPLACE_STRSTR@
338 #  define strstr rpl_strstr
339 char *strstr (const char *haystack, const char *needle)
340   __attribute__ ((__pure__));
341 # endif
342 #elif defined GNULIB_POSIXCHECK
343 /* strstr() does not work with multibyte strings if the locale encoding is
344    different from UTF-8:
345    POSIX says that it operates on "strings", and "string" in POSIX is defined
346    as a sequence of bytes, not of characters.  */
347 # undef strstr
348 # define strstr(a,b) \
349     (GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \
350                       "work correctly on character strings in most "    \
351                       "multibyte locales - " \
352                       "use mbsstr if you care about internationalization, " \
353                       "or use strstr if you care about speed"), \
354      strstr (a, b))
355 #endif
356
357 /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
358    comparison.  */
359 #if @GNULIB_STRCASESTR@
360 # if @REPLACE_STRCASESTR@
361 #  define strcasestr rpl_strcasestr
362 # endif
363 # if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
364 extern char *strcasestr (const char *haystack, const char *needle)
365   __attribute__ ((__pure__));
366 # endif
367 #elif defined GNULIB_POSIXCHECK
368 /* strcasestr() does not work with multibyte strings:
369    It is a glibc extension, and glibc implements it only for unibyte
370    locales.  */
371 # undef strcasestr
372 # define strcasestr(a,b) \
373     (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
374                       "in multibyte locales - " \
375                       "use mbscasestr if you care about " \
376                       "internationalization, or use c-strcasestr if you want " \
377                       "a locale independent function"), \
378      strcasestr (a, b))
379 #endif
380
381 /* Parse S into tokens separated by characters in DELIM.
382    If S is NULL, the saved pointer in SAVE_PTR is used as
383    the next starting point.  For example:
384         char s[] = "-abc-=-def";
385         char *sp;
386         x = strtok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
387         x = strtok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
388         x = strtok_r(NULL, "=", &sp);   // x = NULL
389                 // s = "abc\0-def\0"
390
391    This is a variant of strtok() that is multithread-safe.
392
393    For the POSIX documentation for this function, see:
394    http://www.opengroup.org/susv3xsh/strtok.html
395
396    Caveat: It modifies the original string.
397    Caveat: These functions cannot be used on constant strings.
398    Caveat: The identity of the delimiting character is lost.
399    Caveat: It doesn't work with multibyte strings unless all of the delimiter
400            characters are ASCII characters < 0x30.
401
402    See also strsep().  */
403 #if @GNULIB_STRTOK_R@
404 # if @REPLACE_STRTOK_R@
405 #  undef strtok_r
406 #  define strtok_r rpl_strtok_r
407 # elif @UNDEFINE_STRTOK_R@
408 #  undef strtok_r
409 # endif
410 # if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
411 extern char *strtok_r (char *restrict s, char const *restrict delim,
412                        char **restrict save_ptr);
413 # endif
414 # if defined GNULIB_POSIXCHECK
415 #  undef strtok_r
416 #  define strtok_r(s,d,p) \
417      (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
418                        "in multibyte locales - " \
419                        "use mbstok_r if you care about internationalization"), \
420       strtok_r (s, d, p))
421 # endif
422 #elif defined GNULIB_POSIXCHECK
423 # undef strtok_r
424 # define strtok_r(s,d,p) \
425     (GL_LINK_WARNING ("strtok_r is unportable - " \
426                       "use gnulib module strtok_r for portability"), \
427      strtok_r (s, d, p))
428 #endif
429
430
431 /* The following functions are not specified by POSIX.  They are gnulib
432    extensions.  */
433
434 #if @GNULIB_MBSLEN@
435 /* Return the number of multibyte characters in the character string STRING.
436    This considers multibyte characters, unlike strlen, which counts bytes.  */
437 extern size_t mbslen (const char *string);
438 #endif
439
440 #if @GNULIB_MBSNLEN@
441 /* Return the number of multibyte characters in the character string starting
442    at STRING and ending at STRING + LEN.  */
443 extern size_t mbsnlen (const char *string, size_t len);
444 #endif
445
446 #if @GNULIB_MBSCHR@
447 /* Locate the first single-byte character C in the character string STRING,
448    and return a pointer to it.  Return NULL if C is not found in STRING.
449    Unlike strchr(), this function works correctly in multibyte locales with
450    encodings such as GB18030.  */
451 # define mbschr rpl_mbschr /* avoid collision with HP-UX function */
452 extern char * mbschr (const char *string, int c);
453 #endif
454
455 #if @GNULIB_MBSRCHR@
456 /* Locate the last single-byte character C in the character string STRING,
457    and return a pointer to it.  Return NULL if C is not found in STRING.
458    Unlike strrchr(), this function works correctly in multibyte locales with
459    encodings such as GB18030.  */
460 # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
461 extern char * mbsrchr (const char *string, int c);
462 #endif
463
464 #if @GNULIB_MBSSTR@
465 /* Find the first occurrence of the character string NEEDLE in the character
466    string HAYSTACK.  Return NULL if NEEDLE is not found in HAYSTACK.
467    Unlike strstr(), this function works correctly in multibyte locales with
468    encodings different from UTF-8.  */
469 extern char * mbsstr (const char *haystack, const char *needle);
470 #endif
471
472 #if @GNULIB_MBSCASECMP@
473 /* Compare the character strings S1 and S2, ignoring case, returning less than,
474    equal to or greater than zero if S1 is lexicographically less than, equal to
475    or greater than S2.
476    Note: This function may, in multibyte locales, return 0 for strings of
477    different lengths!
478    Unlike strcasecmp(), this function works correctly in multibyte locales.  */
479 extern int mbscasecmp (const char *s1, const char *s2);
480 #endif
481
482 #if @GNULIB_MBSNCASECMP@
483 /* Compare the initial segment of the character string S1 consisting of at most
484    N characters with the initial segment of the character string S2 consisting
485    of at most N characters, ignoring case, returning less than, equal to or
486    greater than zero if the initial segment of S1 is lexicographically less
487    than, equal to or greater than the initial segment of S2.
488    Note: This function may, in multibyte locales, return 0 for initial segments
489    of different lengths!
490    Unlike strncasecmp(), this function works correctly in multibyte locales.
491    But beware that N is not a byte count but a character count!  */
492 extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
493 #endif
494
495 #if @GNULIB_MBSPCASECMP@
496 /* Compare the initial segment of the character string STRING consisting of
497    at most mbslen (PREFIX) characters with the character string PREFIX,
498    ignoring case, returning less than, equal to or greater than zero if this
499    initial segment is lexicographically less than, equal to or greater than
500    PREFIX.
501    Note: This function may, in multibyte locales, return 0 if STRING is of
502    smaller length than PREFIX!
503    Unlike strncasecmp(), this function works correctly in multibyte
504    locales.  */
505 extern char * mbspcasecmp (const char *string, const char *prefix);
506 #endif
507
508 #if @GNULIB_MBSCASESTR@
509 /* Find the first occurrence of the character string NEEDLE in the character
510    string HAYSTACK, using case-insensitive comparison.
511    Note: This function may, in multibyte locales, return success even if
512    strlen (haystack) < strlen (needle) !
513    Unlike strcasestr(), this function works correctly in multibyte locales.  */
514 extern char * mbscasestr (const char *haystack, const char *needle);
515 #endif
516
517 #if @GNULIB_MBSCSPN@
518 /* Find the first occurrence in the character string STRING of any character
519    in the character string ACCEPT.  Return the number of bytes from the
520    beginning of the string to this occurrence, or to the end of the string
521    if none exists.
522    Unlike strcspn(), this function works correctly in multibyte locales.  */
523 extern size_t mbscspn (const char *string, const char *accept);
524 #endif
525
526 #if @GNULIB_MBSPBRK@
527 /* Find the first occurrence in the character string STRING of any character
528    in the character string ACCEPT.  Return the pointer to it, or NULL if none
529    exists.
530    Unlike strpbrk(), this function works correctly in multibyte locales.  */
531 # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
532 extern char * mbspbrk (const char *string, const char *accept);
533 #endif
534
535 #if @GNULIB_MBSSPN@
536 /* Find the first occurrence in the character string STRING of any character
537    not in the character string REJECT.  Return the number of bytes from the
538    beginning of the string to this occurrence, or to the end of the string
539    if none exists.
540    Unlike strspn(), this function works correctly in multibyte locales.  */
541 extern size_t mbsspn (const char *string, const char *reject);
542 #endif
543
544 #if @GNULIB_MBSSEP@
545 /* Search the next delimiter (multibyte character listed in the character
546    string DELIM) starting at the character string *STRINGP.
547    If one is found, overwrite it with a NUL, and advance *STRINGP to point
548    to the next multibyte character after it.  Otherwise, set *STRINGP to NULL.
549    If *STRINGP was already NULL, nothing happens.
550    Return the old value of *STRINGP.
551
552    This is a variant of mbstok_r() that supports empty fields.
553
554    Caveat: It modifies the original string.
555    Caveat: These functions cannot be used on constant strings.
556    Caveat: The identity of the delimiting character is lost.
557
558    See also mbstok_r().  */
559 extern char * mbssep (char **stringp, const char *delim);
560 #endif
561
562 #if @GNULIB_MBSTOK_R@
563 /* Parse the character string STRING into tokens separated by characters in
564    the character string DELIM.
565    If STRING is NULL, the saved pointer in SAVE_PTR is used as
566    the next starting point.  For example:
567         char s[] = "-abc-=-def";
568         char *sp;
569         x = mbstok_r(s, "-", &sp);      // x = "abc", sp = "=-def"
570         x = mbstok_r(NULL, "-=", &sp);  // x = "def", sp = NULL
571         x = mbstok_r(NULL, "=", &sp);   // x = NULL
572                 // s = "abc\0-def\0"
573
574    Caveat: It modifies the original string.
575    Caveat: These functions cannot be used on constant strings.
576    Caveat: The identity of the delimiting character is lost.
577
578    See also mbssep().  */
579 extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
580 #endif
581
582 /* Map any int, typically from errno, into an error message.  */
583 #if @GNULIB_STRERROR@
584 # if @REPLACE_STRERROR@
585 #  undef strerror
586 #  define strerror rpl_strerror
587 extern char *strerror (int);
588 # endif
589 #elif defined GNULIB_POSIXCHECK
590 # undef strerror
591 # define strerror(e) \
592     (GL_LINK_WARNING ("strerror is unportable - " \
593                       "use gnulib module strerror to guarantee non-NULL result"), \
594      strerror (e))
595 #endif
596
597 #if @GNULIB_STRSIGNAL@
598 # if @REPLACE_STRSIGNAL@
599 #  define strsignal rpl_strsignal
600 # endif
601 # if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@
602 extern char *strsignal (int __sig);
603 # endif
604 #elif defined GNULIB_POSIXCHECK
605 # undef strsignal
606 # define strsignal(a) \
607     (GL_LINK_WARNING ("strsignal is unportable - " \
608                       "use gnulib module strsignal for portability"), \
609      strsignal (a))
610 #endif
611
612 #if @GNULIB_STRVERSCMP@
613 # if !@HAVE_STRVERSCMP@
614 extern int strverscmp (const char *, const char *);
615 # endif
616 #elif defined GNULIB_POSIXCHECK
617 # undef strverscmp
618 # define strverscmp(a, b) \
619     (GL_LINK_WARNING ("strverscmp is unportable - " \
620                       "use gnulib module strverscmp for portability"), \
621      strverscmp (a, b))
622 #endif
623
624
625 #ifdef __cplusplus
626 }
627 #endif
628
629 #endif /* _GL_STRING_H */
630 #endif /* _GL_STRING_H */