00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _GL_STRING_H
00022
00023 #if __GNUC__ >= 3
00024 @PRAGMA_SYSTEM_HEADER@
00025 #endif
00026 @PRAGMA_COLUMNS@
00027
00028
00029 #@INCLUDE_NEXT@ @NEXT_STRING_H@
00030
00031 #ifndef _GL_STRING_H
00032 #define _GL_STRING_H
00033
00034
00035 #include <stddef.h>
00036
00037
00038 #if @GNULIB_MBSLEN@ && defined __MirBSD__
00039 # include <wchar.h>
00040 #endif
00041
00042 #ifndef __attribute__
00043
00044 # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
00045 # define __attribute__(Spec)
00046 # endif
00047 #endif
00048
00049 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
00050 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
00051 #else
00052 # define _GL_ATTRIBUTE_PURE
00053 #endif
00054
00055
00056
00057 #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \
00058 && ! defined __GLIBC__
00059 # include <unistd.h>
00060 #endif
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #if @GNULIB_MEMCHR@
00071 # if @REPLACE_MEMCHR@
00072 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00073 # define memchr rpl_memchr
00074 # endif
00075 _GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
00076 _GL_ATTRIBUTE_PURE
00077 _GL_ARG_NONNULL ((1)));
00078 _GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
00079 # else
00080 # if ! @HAVE_MEMCHR@
00081 _GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
00082 _GL_ATTRIBUTE_PURE
00083 _GL_ARG_NONNULL ((1)));
00084 # endif
00085
00086
00087
00088 _GL_CXXALIAS_SYS_CAST2 (memchr,
00089 void *, (void const *__s, int __c, size_t __n),
00090 void const *, (void const *__s, int __c, size_t __n));
00091 # endif
00092 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00093 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00094 _GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n));
00095 _GL_CXXALIASWARN1 (memchr, void const *,
00096 (void const *__s, int __c, size_t __n));
00097 # else
00098 _GL_CXXALIASWARN (memchr);
00099 # endif
00100 #elif defined GNULIB_POSIXCHECK
00101 # undef memchr
00102
00103 _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
00104 "use gnulib module memchr for portability" );
00105 #endif
00106
00107
00108 #if @GNULIB_MEMMEM@
00109 # if @REPLACE_MEMMEM@
00110 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00111 # define memmem rpl_memmem
00112 # endif
00113 _GL_FUNCDECL_RPL (memmem, void *,
00114 (void const *__haystack, size_t __haystack_len,
00115 void const *__needle, size_t __needle_len)
00116 _GL_ATTRIBUTE_PURE
00117 _GL_ARG_NONNULL ((1, 3)));
00118 _GL_CXXALIAS_RPL (memmem, void *,
00119 (void const *__haystack, size_t __haystack_len,
00120 void const *__needle, size_t __needle_len));
00121 # else
00122 # if ! @HAVE_DECL_MEMMEM@
00123 _GL_FUNCDECL_SYS (memmem, void *,
00124 (void const *__haystack, size_t __haystack_len,
00125 void const *__needle, size_t __needle_len)
00126 _GL_ATTRIBUTE_PURE
00127 _GL_ARG_NONNULL ((1, 3)));
00128 # endif
00129 _GL_CXXALIAS_SYS (memmem, void *,
00130 (void const *__haystack, size_t __haystack_len,
00131 void const *__needle, size_t __needle_len));
00132 # endif
00133 _GL_CXXALIASWARN (memmem);
00134 #elif defined GNULIB_POSIXCHECK
00135 # undef memmem
00136 # if HAVE_RAW_DECL_MEMMEM
00137 _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
00138 "use gnulib module memmem-simple for portability, "
00139 "and module memmem for speed" );
00140 # endif
00141 #endif
00142
00143
00144
00145 #if @GNULIB_MEMPCPY@
00146 # if ! @HAVE_MEMPCPY@
00147 _GL_FUNCDECL_SYS (mempcpy, void *,
00148 (void *restrict __dest, void const *restrict __src,
00149 size_t __n)
00150 _GL_ARG_NONNULL ((1, 2)));
00151 # endif
00152 _GL_CXXALIAS_SYS (mempcpy, void *,
00153 (void *restrict __dest, void const *restrict __src,
00154 size_t __n));
00155 _GL_CXXALIASWARN (mempcpy);
00156 #elif defined GNULIB_POSIXCHECK
00157 # undef mempcpy
00158 # if HAVE_RAW_DECL_MEMPCPY
00159 _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
00160 "use gnulib module mempcpy for portability");
00161 # endif
00162 #endif
00163
00164
00165 #if @GNULIB_MEMRCHR@
00166 # if ! @HAVE_DECL_MEMRCHR@
00167 _GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
00168 _GL_ATTRIBUTE_PURE
00169 _GL_ARG_NONNULL ((1)));
00170 # endif
00171
00172
00173
00174 _GL_CXXALIAS_SYS_CAST2 (memrchr,
00175 void *, (void const *, int, size_t),
00176 void const *, (void const *, int, size_t));
00177 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00178 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00179 _GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t));
00180 _GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t));
00181 # else
00182 _GL_CXXALIASWARN (memrchr);
00183 # endif
00184 #elif defined GNULIB_POSIXCHECK
00185 # undef memrchr
00186 # if HAVE_RAW_DECL_MEMRCHR
00187 _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
00188 "use gnulib module memrchr for portability");
00189 # endif
00190 #endif
00191
00192
00193
00194
00195 #if @GNULIB_RAWMEMCHR@
00196 # if ! @HAVE_RAWMEMCHR@
00197 _GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
00198 _GL_ATTRIBUTE_PURE
00199 _GL_ARG_NONNULL ((1)));
00200 # endif
00201
00202
00203
00204 _GL_CXXALIAS_SYS_CAST2 (rawmemchr,
00205 void *, (void const *__s, int __c_in),
00206 void const *, (void const *__s, int __c_in));
00207 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00208 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00209 _GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in));
00210 _GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in));
00211 # else
00212 _GL_CXXALIASWARN (rawmemchr);
00213 # endif
00214 #elif defined GNULIB_POSIXCHECK
00215 # undef rawmemchr
00216 # if HAVE_RAW_DECL_RAWMEMCHR
00217 _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
00218 "use gnulib module rawmemchr for portability");
00219 # endif
00220 #endif
00221
00222
00223 #if @GNULIB_STPCPY@
00224 # if ! @HAVE_STPCPY@
00225 _GL_FUNCDECL_SYS (stpcpy, char *,
00226 (char *restrict __dst, char const *restrict __src)
00227 _GL_ARG_NONNULL ((1, 2)));
00228 # endif
00229 _GL_CXXALIAS_SYS (stpcpy, char *,
00230 (char *restrict __dst, char const *restrict __src));
00231 _GL_CXXALIASWARN (stpcpy);
00232 #elif defined GNULIB_POSIXCHECK
00233 # undef stpcpy
00234 # if HAVE_RAW_DECL_STPCPY
00235 _GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
00236 "use gnulib module stpcpy for portability");
00237 # endif
00238 #endif
00239
00240
00241
00242 #if @GNULIB_STPNCPY@
00243 # if @REPLACE_STPNCPY@
00244 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00245 # undef stpncpy
00246 # define stpncpy rpl_stpncpy
00247 # endif
00248 _GL_FUNCDECL_RPL (stpncpy, char *,
00249 (char *restrict __dst, char const *restrict __src,
00250 size_t __n)
00251 _GL_ARG_NONNULL ((1, 2)));
00252 _GL_CXXALIAS_RPL (stpncpy, char *,
00253 (char *restrict __dst, char const *restrict __src,
00254 size_t __n));
00255 # else
00256 # if ! @HAVE_STPNCPY@
00257 _GL_FUNCDECL_SYS (stpncpy, char *,
00258 (char *restrict __dst, char const *restrict __src,
00259 size_t __n)
00260 _GL_ARG_NONNULL ((1, 2)));
00261 # endif
00262 _GL_CXXALIAS_SYS (stpncpy, char *,
00263 (char *restrict __dst, char const *restrict __src,
00264 size_t __n));
00265 # endif
00266 _GL_CXXALIASWARN (stpncpy);
00267 #elif defined GNULIB_POSIXCHECK
00268 # undef stpncpy
00269 # if HAVE_RAW_DECL_STPNCPY
00270 _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
00271 "use gnulib module stpncpy for portability");
00272 # endif
00273 #endif
00274
00275 #if defined GNULIB_POSIXCHECK
00276
00277
00278 # undef strchr
00279
00280 _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
00281 "in some multibyte locales - "
00282 "use mbschr if you care about internationalization");
00283 #endif
00284
00285
00286 #if @GNULIB_STRCHRNUL@
00287 # if ! @HAVE_STRCHRNUL@
00288 _GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
00289 _GL_ATTRIBUTE_PURE
00290 _GL_ARG_NONNULL ((1)));
00291 # endif
00292
00293
00294
00295 _GL_CXXALIAS_SYS_CAST2 (strchrnul,
00296 char *, (char const *__s, int __c_in),
00297 char const *, (char const *__s, int __c_in));
00298 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00299 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00300 _GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in));
00301 _GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in));
00302 # else
00303 _GL_CXXALIASWARN (strchrnul);
00304 # endif
00305 #elif defined GNULIB_POSIXCHECK
00306 # undef strchrnul
00307 # if HAVE_RAW_DECL_STRCHRNUL
00308 _GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
00309 "use gnulib module strchrnul for portability");
00310 # endif
00311 #endif
00312
00313
00314 #if @GNULIB_STRDUP@
00315 # if @REPLACE_STRDUP@
00316 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00317 # undef strdup
00318 # define strdup rpl_strdup
00319 # endif
00320 _GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
00321 _GL_CXXALIAS_RPL (strdup, char *, (char const *__s));
00322 # else
00323 # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup
00324
00325 # undef strdup
00326 # endif
00327 # if !(@HAVE_DECL_STRDUP@ || defined strdup)
00328 _GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1)));
00329 # endif
00330 _GL_CXXALIAS_SYS (strdup, char *, (char const *__s));
00331 # endif
00332 _GL_CXXALIASWARN (strdup);
00333 #elif defined GNULIB_POSIXCHECK
00334 # undef strdup
00335 # if HAVE_RAW_DECL_STRDUP
00336 _GL_WARN_ON_USE (strdup, "strdup is unportable - "
00337 "use gnulib module strdup for portability");
00338 # endif
00339 #endif
00340
00341
00342 #if @GNULIB_STRNCAT@
00343 # if @REPLACE_STRNCAT@
00344 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00345 # undef strncat
00346 # define strncat rpl_strncat
00347 # endif
00348 _GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n)
00349 _GL_ARG_NONNULL ((1, 2)));
00350 _GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n));
00351 # else
00352 _GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n));
00353 # endif
00354 _GL_CXXALIASWARN (strncat);
00355 #elif defined GNULIB_POSIXCHECK
00356 # undef strncat
00357 # if HAVE_RAW_DECL_STRNCAT
00358 _GL_WARN_ON_USE (strncat, "strncat is unportable - "
00359 "use gnulib module strncat for portability");
00360 # endif
00361 #endif
00362
00363
00364 #if @GNULIB_STRNDUP@
00365 # if @REPLACE_STRNDUP@
00366 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00367 # undef strndup
00368 # define strndup rpl_strndup
00369 # endif
00370 _GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n)
00371 _GL_ARG_NONNULL ((1)));
00372 _GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n));
00373 # else
00374 # if ! @HAVE_DECL_STRNDUP@
00375 _GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n)
00376 _GL_ARG_NONNULL ((1)));
00377 # endif
00378 _GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n));
00379 # endif
00380 _GL_CXXALIASWARN (strndup);
00381 #elif defined GNULIB_POSIXCHECK
00382 # undef strndup
00383 # if HAVE_RAW_DECL_STRNDUP
00384 _GL_WARN_ON_USE (strndup, "strndup is unportable - "
00385 "use gnulib module strndup for portability");
00386 # endif
00387 #endif
00388
00389
00390
00391
00392 #if @GNULIB_STRNLEN@
00393 # if @REPLACE_STRNLEN@
00394 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00395 # undef strnlen
00396 # define strnlen rpl_strnlen
00397 # endif
00398 _GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
00399 _GL_ATTRIBUTE_PURE
00400 _GL_ARG_NONNULL ((1)));
00401 _GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
00402 # else
00403 # if ! @HAVE_DECL_STRNLEN@
00404 _GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
00405 _GL_ATTRIBUTE_PURE
00406 _GL_ARG_NONNULL ((1)));
00407 # endif
00408 _GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
00409 # endif
00410 _GL_CXXALIASWARN (strnlen);
00411 #elif defined GNULIB_POSIXCHECK
00412 # undef strnlen
00413 # if HAVE_RAW_DECL_STRNLEN
00414 _GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
00415 "use gnulib module strnlen for portability");
00416 # endif
00417 #endif
00418
00419 #if defined GNULIB_POSIXCHECK
00420
00421
00422
00423
00424 # undef strcspn
00425
00426 _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
00427 "in multibyte locales - "
00428 "use mbscspn if you care about internationalization");
00429 #endif
00430
00431
00432 #if @GNULIB_STRPBRK@
00433 # if ! @HAVE_STRPBRK@
00434 _GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
00435 _GL_ATTRIBUTE_PURE
00436 _GL_ARG_NONNULL ((1, 2)));
00437 # endif
00438
00439
00440
00441 _GL_CXXALIAS_SYS_CAST2 (strpbrk,
00442 char *, (char const *__s, char const *__accept),
00443 const char *, (char const *__s, char const *__accept));
00444 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00445 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00446 _GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept));
00447 _GL_CXXALIASWARN1 (strpbrk, char const *,
00448 (char const *__s, char const *__accept));
00449 # else
00450 _GL_CXXALIASWARN (strpbrk);
00451 # endif
00452 # if defined GNULIB_POSIXCHECK
00453
00454
00455
00456
00457 # undef strpbrk
00458 _GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
00459 "in multibyte locales - "
00460 "use mbspbrk if you care about internationalization");
00461 # endif
00462 #elif defined GNULIB_POSIXCHECK
00463 # undef strpbrk
00464 # if HAVE_RAW_DECL_STRPBRK
00465 _GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
00466 "use gnulib module strpbrk for portability");
00467 # endif
00468 #endif
00469
00470 #if defined GNULIB_POSIXCHECK
00471
00472
00473 # undef strspn
00474
00475 _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
00476 "in multibyte locales - "
00477 "use mbsspn if you care about internationalization");
00478 #endif
00479
00480 #if defined GNULIB_POSIXCHECK
00481
00482
00483 # undef strrchr
00484
00485 _GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
00486 "in some multibyte locales - "
00487 "use mbsrchr if you care about internationalization");
00488 #endif
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506 #if @GNULIB_STRSEP@
00507 # if ! @HAVE_STRSEP@
00508 _GL_FUNCDECL_SYS (strsep, char *,
00509 (char **restrict __stringp, char const *restrict __delim)
00510 _GL_ARG_NONNULL ((1, 2)));
00511 # endif
00512 _GL_CXXALIAS_SYS (strsep, char *,
00513 (char **restrict __stringp, char const *restrict __delim));
00514 _GL_CXXALIASWARN (strsep);
00515 # if defined GNULIB_POSIXCHECK
00516 # undef strsep
00517 _GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
00518 "in multibyte locales - "
00519 "use mbssep if you care about internationalization");
00520 # endif
00521 #elif defined GNULIB_POSIXCHECK
00522 # undef strsep
00523 # if HAVE_RAW_DECL_STRSEP
00524 _GL_WARN_ON_USE (strsep, "strsep is unportable - "
00525 "use gnulib module strsep for portability");
00526 # endif
00527 #endif
00528
00529 #if @GNULIB_STRSTR@
00530 # if @REPLACE_STRSTR@
00531 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00532 # define strstr rpl_strstr
00533 # endif
00534 _GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
00535 _GL_ATTRIBUTE_PURE
00536 _GL_ARG_NONNULL ((1, 2)));
00537 _GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
00538 # else
00539
00540
00541
00542 _GL_CXXALIAS_SYS_CAST2 (strstr,
00543 char *, (const char *haystack, const char *needle),
00544 const char *, (const char *haystack, const char *needle));
00545 # endif
00546 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00547 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00548 _GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle));
00549 _GL_CXXALIASWARN1 (strstr, const char *,
00550 (const char *haystack, const char *needle));
00551 # else
00552 _GL_CXXALIASWARN (strstr);
00553 # endif
00554 #elif defined GNULIB_POSIXCHECK
00555
00556
00557
00558
00559 # undef strstr
00560
00561 _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
00562 "work correctly on character strings in most "
00563 "multibyte locales - "
00564 "use mbsstr if you care about internationalization, "
00565 "or use strstr if you care about speed");
00566 #endif
00567
00568
00569
00570 #if @GNULIB_STRCASESTR@
00571 # if @REPLACE_STRCASESTR@
00572 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00573 # define strcasestr rpl_strcasestr
00574 # endif
00575 _GL_FUNCDECL_RPL (strcasestr, char *,
00576 (const char *haystack, const char *needle)
00577 _GL_ATTRIBUTE_PURE
00578 _GL_ARG_NONNULL ((1, 2)));
00579 _GL_CXXALIAS_RPL (strcasestr, char *,
00580 (const char *haystack, const char *needle));
00581 # else
00582 # if ! @HAVE_STRCASESTR@
00583 _GL_FUNCDECL_SYS (strcasestr, char *,
00584 (const char *haystack, const char *needle)
00585 _GL_ATTRIBUTE_PURE
00586 _GL_ARG_NONNULL ((1, 2)));
00587 # endif
00588
00589
00590
00591 _GL_CXXALIAS_SYS_CAST2 (strcasestr,
00592 char *, (const char *haystack, const char *needle),
00593 const char *, (const char *haystack, const char *needle));
00594 # endif
00595 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
00596 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
00597 _GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle));
00598 _GL_CXXALIASWARN1 (strcasestr, const char *,
00599 (const char *haystack, const char *needle));
00600 # else
00601 _GL_CXXALIASWARN (strcasestr);
00602 # endif
00603 #elif defined GNULIB_POSIXCHECK
00604
00605
00606
00607 # undef strcasestr
00608 # if HAVE_RAW_DECL_STRCASESTR
00609 _GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
00610 "strings in multibyte locales - "
00611 "use mbscasestr if you care about "
00612 "internationalization, or use c-strcasestr if you want "
00613 "a locale independent function");
00614 # endif
00615 #endif
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639 #if @GNULIB_STRTOK_R@
00640 # if @REPLACE_STRTOK_R@
00641 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00642 # undef strtok_r
00643 # define strtok_r rpl_strtok_r
00644 # endif
00645 _GL_FUNCDECL_RPL (strtok_r, char *,
00646 (char *restrict s, char const *restrict delim,
00647 char **restrict save_ptr)
00648 _GL_ARG_NONNULL ((2, 3)));
00649 _GL_CXXALIAS_RPL (strtok_r, char *,
00650 (char *restrict s, char const *restrict delim,
00651 char **restrict save_ptr));
00652 # else
00653 # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
00654 # undef strtok_r
00655 # endif
00656 # if ! @HAVE_DECL_STRTOK_R@
00657 _GL_FUNCDECL_SYS (strtok_r, char *,
00658 (char *restrict s, char const *restrict delim,
00659 char **restrict save_ptr)
00660 _GL_ARG_NONNULL ((2, 3)));
00661 # endif
00662 _GL_CXXALIAS_SYS (strtok_r, char *,
00663 (char *restrict s, char const *restrict delim,
00664 char **restrict save_ptr));
00665 # endif
00666 _GL_CXXALIASWARN (strtok_r);
00667 # if defined GNULIB_POSIXCHECK
00668 _GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
00669 "strings in multibyte locales - "
00670 "use mbstok_r if you care about internationalization");
00671 # endif
00672 #elif defined GNULIB_POSIXCHECK
00673 # undef strtok_r
00674 # if HAVE_RAW_DECL_STRTOK_R
00675 _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
00676 "use gnulib module strtok_r for portability");
00677 # endif
00678 #endif
00679
00680
00681
00682
00683
00684 #if @GNULIB_MBSLEN@
00685
00686
00687 # ifdef __MirBSD__
00688 # undef mbslen
00689 # endif
00690 # if @HAVE_MBSLEN@
00691 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00692 # define mbslen rpl_mbslen
00693 # endif
00694 _GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
00695 _GL_CXXALIAS_RPL (mbslen, size_t, (const char *string));
00696 # else
00697 _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) _GL_ARG_NONNULL ((1)));
00698 _GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
00699 # endif
00700 _GL_CXXALIASWARN (mbslen);
00701 #endif
00702
00703 #if @GNULIB_MBSNLEN@
00704
00705
00706 _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len)
00707 _GL_ARG_NONNULL ((1));
00708 #endif
00709
00710 #if @GNULIB_MBSCHR@
00711
00712
00713
00714
00715 # if defined __hpux
00716 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00717 # define mbschr rpl_mbschr
00718 # endif
00719 _GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c)
00720 _GL_ARG_NONNULL ((1)));
00721 _GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c));
00722 # else
00723 _GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c)
00724 _GL_ARG_NONNULL ((1)));
00725 _GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c));
00726 # endif
00727 _GL_CXXALIASWARN (mbschr);
00728 #endif
00729
00730 #if @GNULIB_MBSRCHR@
00731
00732
00733
00734
00735 # if defined __hpux
00736 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00737 # define mbsrchr rpl_mbsrchr
00738 # endif
00739 _GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c)
00740 _GL_ARG_NONNULL ((1)));
00741 _GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c));
00742 # else
00743 _GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c)
00744 _GL_ARG_NONNULL ((1)));
00745 _GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c));
00746 # endif
00747 _GL_CXXALIASWARN (mbsrchr);
00748 #endif
00749
00750 #if @GNULIB_MBSSTR@
00751
00752
00753
00754
00755 _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle)
00756 _GL_ARG_NONNULL ((1, 2));
00757 #endif
00758
00759 #if @GNULIB_MBSCASECMP@
00760
00761
00762
00763
00764
00765
00766 _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2)
00767 _GL_ARG_NONNULL ((1, 2));
00768 #endif
00769
00770 #if @GNULIB_MBSNCASECMP@
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780 _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n)
00781 _GL_ARG_NONNULL ((1, 2));
00782 #endif
00783
00784 #if @GNULIB_MBSPCASECMP@
00785
00786
00787
00788
00789
00790
00791
00792
00793 _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix)
00794 _GL_ARG_NONNULL ((1, 2));
00795 #endif
00796
00797 #if @GNULIB_MBSCASESTR@
00798
00799
00800
00801
00802
00803 _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle)
00804 _GL_ARG_NONNULL ((1, 2));
00805 #endif
00806
00807 #if @GNULIB_MBSCSPN@
00808
00809
00810
00811
00812
00813 _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept)
00814 _GL_ARG_NONNULL ((1, 2));
00815 #endif
00816
00817 #if @GNULIB_MBSPBRK@
00818
00819
00820
00821
00822 # if defined __hpux
00823 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00824 # define mbspbrk rpl_mbspbrk
00825 # endif
00826 _GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept)
00827 _GL_ARG_NONNULL ((1, 2)));
00828 _GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept));
00829 # else
00830 _GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept)
00831 _GL_ARG_NONNULL ((1, 2)));
00832 _GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept));
00833 # endif
00834 _GL_CXXALIASWARN (mbspbrk);
00835 #endif
00836
00837 #if @GNULIB_MBSSPN@
00838
00839
00840
00841
00842
00843 _GL_EXTERN_C size_t mbsspn (const char *string, const char *reject)
00844 _GL_ARG_NONNULL ((1, 2));
00845 #endif
00846
00847 #if @GNULIB_MBSSEP@
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862 _GL_EXTERN_C char * mbssep (char **stringp, const char *delim)
00863 _GL_ARG_NONNULL ((1, 2));
00864 #endif
00865
00866 #if @GNULIB_MBSTOK_R@
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878
00879
00880
00881
00882
00883 _GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr)
00884 _GL_ARG_NONNULL ((2, 3));
00885 #endif
00886
00887
00888 #if @GNULIB_STRERROR@
00889 # if @REPLACE_STRERROR@
00890 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00891 # undef strerror
00892 # define strerror rpl_strerror
00893 # endif
00894 _GL_FUNCDECL_RPL (strerror, char *, (int));
00895 _GL_CXXALIAS_RPL (strerror, char *, (int));
00896 # else
00897 _GL_CXXALIAS_SYS (strerror, char *, (int));
00898 # endif
00899 _GL_CXXALIASWARN (strerror);
00900 #elif defined GNULIB_POSIXCHECK
00901 # undef strerror
00902
00903 _GL_WARN_ON_USE (strerror, "strerror is unportable - "
00904 "use gnulib module strerror to guarantee non-NULL result");
00905 #endif
00906
00907
00908
00909 #if @GNULIB_STRERROR_R@
00910 # if @REPLACE_STRERROR_R@
00911 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00912 # undef strerror_r
00913 # define strerror_r rpl_strerror_r
00914 # endif
00915 _GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)
00916 _GL_ARG_NONNULL ((2)));
00917 _GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen));
00918 # else
00919 # if !@HAVE_DECL_STRERROR_R@
00920 _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
00921 _GL_ARG_NONNULL ((2)));
00922 # endif
00923 _GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
00924 # endif
00925 # if @HAVE_DECL_STRERROR_R@
00926 _GL_CXXALIASWARN (strerror_r);
00927 # endif
00928 #elif defined GNULIB_POSIXCHECK
00929 # undef strerror_r
00930 # if HAVE_RAW_DECL_STRERROR_R
00931 _GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - "
00932 "use gnulib module strerror_r-posix for portability");
00933 # endif
00934 #endif
00935
00936 #if @GNULIB_STRSIGNAL@
00937 # if @REPLACE_STRSIGNAL@
00938 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
00939 # define strsignal rpl_strsignal
00940 # endif
00941 _GL_FUNCDECL_RPL (strsignal, char *, (int __sig));
00942 _GL_CXXALIAS_RPL (strsignal, char *, (int __sig));
00943 # else
00944 # if ! @HAVE_DECL_STRSIGNAL@
00945 _GL_FUNCDECL_SYS (strsignal, char *, (int __sig));
00946 # endif
00947
00948
00949 _GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig));
00950 # endif
00951 _GL_CXXALIASWARN (strsignal);
00952 #elif defined GNULIB_POSIXCHECK
00953 # undef strsignal
00954 # if HAVE_RAW_DECL_STRSIGNAL
00955 _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
00956 "use gnulib module strsignal for portability");
00957 # endif
00958 #endif
00959
00960 #if @GNULIB_STRVERSCMP@
00961 # if !@HAVE_STRVERSCMP@
00962 _GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
00963 _GL_ARG_NONNULL ((1, 2)));
00964 # endif
00965 _GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
00966 _GL_CXXALIASWARN (strverscmp);
00967 #elif defined GNULIB_POSIXCHECK
00968 # undef strverscmp
00969 # if HAVE_RAW_DECL_STRVERSCMP
00970 _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
00971 "use gnulib module strverscmp for portability");
00972 # endif
00973 #endif
00974
00975
00976 #endif
00977 #endif