diff options
Diffstat (limited to 'gl/string.in.h')
-rw-r--r-- | gl/string.in.h | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/gl/string.in.h b/gl/string.in.h index 5c7597ce..f021a3ed 100644 --- a/gl/string.in.h +++ b/gl/string.in.h | |||
@@ -18,6 +18,10 @@ | |||
18 | 18 | ||
19 | #ifndef _GL_STRING_H | 19 | #ifndef _GL_STRING_H |
20 | 20 | ||
21 | #if __GNUC__ >= 3 | ||
22 | @PRAGMA_SYSTEM_HEADER@ | ||
23 | #endif | ||
24 | |||
21 | /* The include_next requires a split double-inclusion guard. */ | 25 | /* The include_next requires a split double-inclusion guard. */ |
22 | #@INCLUDE_NEXT@ @NEXT_STRING_H@ | 26 | #@INCLUDE_NEXT@ @NEXT_STRING_H@ |
23 | 27 | ||
@@ -93,6 +97,22 @@ extern void *memrchr (void const *, int, size_t) | |||
93 | memrchr (a, b, c)) | 97 | memrchr (a, b, c)) |
94 | #endif | 98 | #endif |
95 | 99 | ||
100 | /* Find the first occurrence of C in S. More efficient than | ||
101 | memchr(S,C,N), at the expense of undefined behavior if C does not | ||
102 | occur within N bytes. */ | ||
103 | #if @GNULIB_RAWMEMCHR@ | ||
104 | # if ! @HAVE_RAWMEMCHR@ | ||
105 | extern void *rawmemchr (void const *__s, int __c_in) | ||
106 | __attribute__ ((__pure__)); | ||
107 | # endif | ||
108 | #elif defined GNULIB_POSIXCHECK | ||
109 | # undef rawmemchr | ||
110 | # define rawmemchr(a,b) \ | ||
111 | (GL_LINK_WARNING ("rawmemchr is unportable - " \ | ||
112 | "use gnulib module rawmemchr for portability"), \ | ||
113 | rawmemchr (a, b)) | ||
114 | #endif | ||
115 | |||
96 | /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ | 116 | /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ |
97 | #if @GNULIB_STPCPY@ | 117 | #if @GNULIB_STPCPY@ |
98 | # if ! @HAVE_STPCPY@ | 118 | # if ! @HAVE_STPCPY@ |
@@ -149,7 +169,11 @@ extern char *strchrnul (char const *__s, int __c_in) | |||
149 | 169 | ||
150 | /* Duplicate S, returning an identical malloc'd string. */ | 170 | /* Duplicate S, returning an identical malloc'd string. */ |
151 | #if @GNULIB_STRDUP@ | 171 | #if @GNULIB_STRDUP@ |
152 | # if ! @HAVE_DECL_STRDUP@ && ! defined strdup | 172 | # if @REPLACE_STRDUP@ |
173 | # undef strdup | ||
174 | # define strdup rpl_strdup | ||
175 | # endif | ||
176 | # if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@ | ||
153 | extern char *strdup (char const *__s); | 177 | extern char *strdup (char const *__s); |
154 | # endif | 178 | # endif |
155 | #elif defined GNULIB_POSIXCHECK | 179 | #elif defined GNULIB_POSIXCHECK |
@@ -560,6 +584,18 @@ extern char *strsignal (int __sig); | |||
560 | strsignal (a)) | 584 | strsignal (a)) |
561 | #endif | 585 | #endif |
562 | 586 | ||
587 | #if @GNULIB_STRVERSCMP@ | ||
588 | # if !@HAVE_STRVERSCMP@ | ||
589 | extern int strverscmp (const char *, const char *); | ||
590 | # endif | ||
591 | #elif defined GNULIB_POSIXCHECK | ||
592 | # undef strverscmp | ||
593 | # define strverscmp(a, b) \ | ||
594 | (GL_LINK_WARNING ("strverscmp is unportable - " \ | ||
595 | "use gnulib module strverscmp for portability"), \ | ||
596 | strverscmp (a, b)) | ||
597 | #endif | ||
598 | |||
563 | 599 | ||
564 | #ifdef __cplusplus | 600 | #ifdef __cplusplus |
565 | } | 601 | } |