string.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  1. /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
  2. /* A GNU-like <string.h>.
  3. Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software Foundation,
  14. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
  15. #ifndef _GL_STRING_H
  16. /* The include_next requires a split double-inclusion guard. */
  17. #include_next <string.h>
  18. #ifndef _GL_STRING_H
  19. #define _GL_STRING_H
  20. #ifndef __attribute__
  21. /* This feature is available in gcc versions 2.5 and later. */
  22. # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
  23. # define __attribute__(Spec) /* empty */
  24. # endif
  25. /* The attribute __pure__ was added in gcc 2.96. */
  26. # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
  27. # define __pure__ /* empty */
  28. # endif
  29. #endif
  30. /* The definition of GL_LINK_WARNING is copied here. */
  31. /* GL_LINK_WARNING("literal string") arranges to emit the literal string as
  32. a linker warning on most glibc systems.
  33. We use a linker warning rather than a preprocessor warning, because
  34. #warning cannot be used inside macros. */
  35. #ifndef GL_LINK_WARNING
  36. /* This works on platforms with GNU ld and ELF object format.
  37. Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
  38. Testing __ELF__ guarantees the ELF object format.
  39. Testing __GNUC__ is necessary for the compound expression syntax. */
  40. # if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
  41. # define GL_LINK_WARNING(message) \
  42. GL_LINK_WARNING1 (__FILE__, __LINE__, message)
  43. # define GL_LINK_WARNING1(file, line, message) \
  44. GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
  45. # define GL_LINK_WARNING2(file, line, message) \
  46. GL_LINK_WARNING3 (file ":" #line ": warning: " message)
  47. # define GL_LINK_WARNING3(message) \
  48. ({ static const char warning[sizeof (message)] \
  49. __attribute__ ((__unused__, \
  50. __section__ (".gnu.warning"), \
  51. __aligned__ (1))) \
  52. = message "\n"; \
  53. (void)0; \
  54. })
  55. # else
  56. # define GL_LINK_WARNING(message) ((void) 0)
  57. # endif
  58. #endif
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif
  62. /* Return the first occurrence of NEEDLE in HAYSTACK. */
  63. #if 0
  64. # if 0
  65. # define memmem rpl_memmem
  66. # endif
  67. # if ! 1 || 0
  68. extern void *memmem (void const *__haystack, size_t __haystack_len,
  69. void const *__needle, size_t __needle_len)
  70. __attribute__ ((__pure__));
  71. # endif
  72. #elif defined GNULIB_POSIXCHECK
  73. # undef memmem
  74. # define memmem(a,al,b,bl) \
  75. (GL_LINK_WARNING ("memmem is unportable and often quadratic - " \
  76. "use gnulib module memmem-simple for portability, " \
  77. "and module memmem for speed" ), \
  78. memmem (a, al, b, bl))
  79. #endif
  80. /* Copy N bytes of SRC to DEST, return pointer to bytes after the
  81. last written byte. */
  82. #if 0
  83. # if ! 1
  84. extern void *mempcpy (void *restrict __dest, void const *restrict __src,
  85. size_t __n);
  86. # endif
  87. #elif defined GNULIB_POSIXCHECK
  88. # undef mempcpy
  89. # define mempcpy(a,b,n) \
  90. (GL_LINK_WARNING ("mempcpy is unportable - " \
  91. "use gnulib module mempcpy for portability"), \
  92. mempcpy (a, b, n))
  93. #endif
  94. /* Search backwards through a block for a byte (specified as an int). */
  95. #if 0
  96. # if ! 1
  97. extern void *memrchr (void const *, int, size_t)
  98. __attribute__ ((__pure__));
  99. # endif
  100. #elif defined GNULIB_POSIXCHECK
  101. # undef memrchr
  102. # define memrchr(a,b,c) \
  103. (GL_LINK_WARNING ("memrchr is unportable - " \
  104. "use gnulib module memrchr for portability"), \
  105. memrchr (a, b, c))
  106. #endif
  107. /* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
  108. #if 0
  109. # if ! 1
  110. extern char *stpcpy (char *restrict __dst, char const *restrict __src);
  111. # endif
  112. #elif defined GNULIB_POSIXCHECK
  113. # undef stpcpy
  114. # define stpcpy(a,b) \
  115. (GL_LINK_WARNING ("stpcpy is unportable - " \
  116. "use gnulib module stpcpy for portability"), \
  117. stpcpy (a, b))
  118. #endif
  119. /* Copy no more than N bytes of SRC to DST, returning a pointer past the
  120. last non-NUL byte written into DST. */
  121. #if 0
  122. # if ! 1
  123. # define stpncpy gnu_stpncpy
  124. extern char *stpncpy (char *restrict __dst, char const *restrict __src,
  125. size_t __n);
  126. # endif
  127. #elif defined GNULIB_POSIXCHECK
  128. # undef stpncpy
  129. # define stpncpy(a,b,n) \
  130. (GL_LINK_WARNING ("stpncpy is unportable - " \
  131. "use gnulib module stpncpy for portability"), \
  132. stpncpy (a, b, n))
  133. #endif
  134. #if defined GNULIB_POSIXCHECK
  135. /* strchr() does not work with multibyte strings if the locale encoding is
  136. GB18030 and the character to be searched is a digit. */
  137. # undef strchr
  138. # define strchr(s,c) \
  139. (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
  140. "in some multibyte locales - " \
  141. "use mbschr if you care about internationalization"), \
  142. strchr (s, c))
  143. #endif
  144. /* Find the first occurrence of C in S or the final NUL byte. */
  145. #if 0
  146. # if ! 1
  147. extern char *strchrnul (char const *__s, int __c_in)
  148. __attribute__ ((__pure__));
  149. # endif
  150. #elif defined GNULIB_POSIXCHECK
  151. # undef strchrnul
  152. # define strchrnul(a,b) \
  153. (GL_LINK_WARNING ("strchrnul is unportable - " \
  154. "use gnulib module strchrnul for portability"), \
  155. strchrnul (a, b))
  156. #endif
  157. /* Duplicate S, returning an identical malloc'd string. */
  158. #if 1
  159. # if ! 1 && ! defined strdup
  160. extern char *strdup (char const *__s);
  161. # endif
  162. #elif defined GNULIB_POSIXCHECK
  163. # undef strdup
  164. # define strdup(a) \
  165. (GL_LINK_WARNING ("strdup is unportable - " \
  166. "use gnulib module strdup for portability"), \
  167. strdup (a))
  168. #endif
  169. /* Return a newly allocated copy of at most N bytes of STRING. */
  170. #if 1
  171. # if ! 1
  172. # undef strndup
  173. # define strndup rpl_strndup
  174. # endif
  175. # if ! 1 || ! 1
  176. extern char *strndup (char const *__string, size_t __n);
  177. # endif
  178. #elif defined GNULIB_POSIXCHECK
  179. # undef strndup
  180. # define strndup(a,n) \
  181. (GL_LINK_WARNING ("strndup is unportable - " \
  182. "use gnulib module strndup for portability"), \
  183. strndup (a, n))
  184. #endif
  185. /* Find the length (number of bytes) of STRING, but scan at most
  186. MAXLEN bytes. If no '\0' terminator is found in that many bytes,
  187. return MAXLEN. */
  188. #if 1
  189. # if ! 1
  190. extern size_t strnlen (char const *__string, size_t __maxlen)
  191. __attribute__ ((__pure__));
  192. # endif
  193. #elif defined GNULIB_POSIXCHECK
  194. # undef strnlen
  195. # define strnlen(a,n) \
  196. (GL_LINK_WARNING ("strnlen is unportable - " \
  197. "use gnulib module strnlen for portability"), \
  198. strnlen (a, n))
  199. #endif
  200. #if defined GNULIB_POSIXCHECK
  201. /* strcspn() assumes the second argument is a list of single-byte characters.
  202. Even in this simple case, it does not work with multibyte strings if the
  203. locale encoding is GB18030 and one of the characters to be searched is a
  204. digit. */
  205. # undef strcspn
  206. # define strcspn(s,a) \
  207. (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
  208. "in multibyte locales - " \
  209. "use mbscspn if you care about internationalization"), \
  210. strcspn (s, a))
  211. #endif
  212. /* Find the first occurrence in S of any character in ACCEPT. */
  213. #if 0
  214. # if ! 1
  215. extern char *strpbrk (char const *__s, char const *__accept)
  216. __attribute__ ((__pure__));
  217. # endif
  218. # if defined GNULIB_POSIXCHECK
  219. /* strpbrk() assumes the second argument is a list of single-byte characters.
  220. Even in this simple case, it does not work with multibyte strings if the
  221. locale encoding is GB18030 and one of the characters to be searched is a
  222. digit. */
  223. # undef strpbrk
  224. # define strpbrk(s,a) \
  225. (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
  226. "in multibyte locales - " \
  227. "use mbspbrk if you care about internationalization"), \
  228. strpbrk (s, a))
  229. # endif
  230. #elif defined GNULIB_POSIXCHECK
  231. # undef strpbrk
  232. # define strpbrk(s,a) \
  233. (GL_LINK_WARNING ("strpbrk is unportable - " \
  234. "use gnulib module strpbrk for portability"), \
  235. strpbrk (s, a))
  236. #endif
  237. #if defined GNULIB_POSIXCHECK
  238. /* strspn() assumes the second argument is a list of single-byte characters.
  239. Even in this simple case, it cannot work with multibyte strings. */
  240. # undef strspn
  241. # define strspn(s,a) \
  242. (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
  243. "in multibyte locales - " \
  244. "use mbsspn if you care about internationalization"), \
  245. strspn (s, a))
  246. #endif
  247. #if defined GNULIB_POSIXCHECK
  248. /* strrchr() does not work with multibyte strings if the locale encoding is
  249. GB18030 and the character to be searched is a digit. */
  250. # undef strrchr
  251. # define strrchr(s,c) \
  252. (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
  253. "in some multibyte locales - " \
  254. "use mbsrchr if you care about internationalization"), \
  255. strrchr (s, c))
  256. #endif
  257. /* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
  258. If one is found, overwrite it with a NUL, and advance *STRINGP
  259. to point to the next char after it. Otherwise, set *STRINGP to NULL.
  260. If *STRINGP was already NULL, nothing happens.
  261. Return the old value of *STRINGP.
  262. This is a variant of strtok() that is multithread-safe and supports
  263. empty fields.
  264. Caveat: It modifies the original string.
  265. Caveat: These functions cannot be used on constant strings.
  266. Caveat: The identity of the delimiting character is lost.
  267. Caveat: It doesn't work with multibyte strings unless all of the delimiter
  268. characters are ASCII characters < 0x30.
  269. See also strtok_r(). */
  270. #if 0
  271. # if ! 1
  272. extern char *strsep (char **restrict __stringp, char const *restrict __delim);
  273. # endif
  274. # if defined GNULIB_POSIXCHECK
  275. # undef strsep
  276. # define strsep(s,d) \
  277. (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
  278. "in multibyte locales - " \
  279. "use mbssep if you care about internationalization"), \
  280. strsep (s, d))
  281. # endif
  282. #elif defined GNULIB_POSIXCHECK
  283. # undef strsep
  284. # define strsep(s,d) \
  285. (GL_LINK_WARNING ("strsep is unportable - " \
  286. "use gnulib module strsep for portability"), \
  287. strsep (s, d))
  288. #endif
  289. #if 0
  290. # if 0
  291. # define strstr rpl_strstr
  292. char *strstr (const char *haystack, const char *needle)
  293. __attribute__ ((__pure__));
  294. # endif
  295. #elif defined GNULIB_POSIXCHECK
  296. /* strstr() does not work with multibyte strings if the locale encoding is
  297. different from UTF-8:
  298. POSIX says that it operates on "strings", and "string" in POSIX is defined
  299. as a sequence of bytes, not of characters. */
  300. # undef strstr
  301. # define strstr(a,b) \
  302. (GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \
  303. "work correctly on character strings in most " \
  304. "multibyte locales - " \
  305. "use mbsstr if you care about internationalization, " \
  306. "or use strstr if you care about speed"), \
  307. strstr (a, b))
  308. #endif
  309. /* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
  310. comparison. */
  311. #if 0
  312. # if 0
  313. # define strcasestr rpl_strcasestr
  314. # endif
  315. # if ! 1 || 0
  316. extern char *strcasestr (const char *haystack, const char *needle)
  317. __attribute__ ((__pure__));
  318. # endif
  319. #elif defined GNULIB_POSIXCHECK
  320. /* strcasestr() does not work with multibyte strings:
  321. It is a glibc extension, and glibc implements it only for unibyte
  322. locales. */
  323. # undef strcasestr
  324. # define strcasestr(a,b) \
  325. (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
  326. "in multibyte locales - " \
  327. "use mbscasestr if you care about " \
  328. "internationalization, or use c-strcasestr if you want " \
  329. "a locale independent function"), \
  330. strcasestr (a, b))
  331. #endif
  332. /* Parse S into tokens separated by characters in DELIM.
  333. If S is NULL, the saved pointer in SAVE_PTR is used as
  334. the next starting point. For example:
  335. char s[] = "-abc-=-def";
  336. char *sp;
  337. x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
  338. x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
  339. x = strtok_r(NULL, "=", &sp); // x = NULL
  340. // s = "abc\0-def\0"
  341. This is a variant of strtok() that is multithread-safe.
  342. For the POSIX documentation for this function, see:
  343. http://www.opengroup.org/susv3xsh/strtok.html
  344. Caveat: It modifies the original string.
  345. Caveat: These functions cannot be used on constant strings.
  346. Caveat: The identity of the delimiting character is lost.
  347. Caveat: It doesn't work with multibyte strings unless all of the delimiter
  348. characters are ASCII characters < 0x30.
  349. See also strsep(). */
  350. #if 0
  351. # if ! 1
  352. extern char *strtok_r (char *restrict s, char const *restrict delim,
  353. char **restrict save_ptr);
  354. # endif
  355. # if defined GNULIB_POSIXCHECK
  356. # undef strtok_r
  357. # define strtok_r(s,d,p) \
  358. (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
  359. "in multibyte locales - " \
  360. "use mbstok_r if you care about internationalization"), \
  361. strtok_r (s, d, p))
  362. # endif
  363. #elif defined GNULIB_POSIXCHECK
  364. # undef strtok_r
  365. # define strtok_r(s,d,p) \
  366. (GL_LINK_WARNING ("strtok_r is unportable - " \
  367. "use gnulib module strtok_r for portability"), \
  368. strtok_r (s, d, p))
  369. #endif
  370. /* The following functions are not specified by POSIX. They are gnulib
  371. extensions. */
  372. #if 0
  373. /* Return the number of multibyte characters in the character string STRING.
  374. This considers multibyte characters, unlike strlen, which counts bytes. */
  375. extern size_t mbslen (const char *string);
  376. #endif
  377. #if 0
  378. /* Return the number of multibyte characters in the character string starting
  379. at STRING and ending at STRING + LEN. */
  380. extern size_t mbsnlen (const char *string, size_t len);
  381. #endif
  382. #if 0
  383. /* Locate the first single-byte character C in the character string STRING,
  384. and return a pointer to it. Return NULL if C is not found in STRING.
  385. Unlike strchr(), this function works correctly in multibyte locales with
  386. encodings such as GB18030. */
  387. # define mbschr rpl_mbschr /* avoid collision with HP-UX function */
  388. extern char * mbschr (const char *string, int c);
  389. #endif
  390. #if 0
  391. /* Locate the last single-byte character C in the character string STRING,
  392. and return a pointer to it. Return NULL if C is not found in STRING.
  393. Unlike strrchr(), this function works correctly in multibyte locales with
  394. encodings such as GB18030. */
  395. # define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
  396. extern char * mbsrchr (const char *string, int c);
  397. #endif
  398. #if 0
  399. /* Find the first occurrence of the character string NEEDLE in the character
  400. string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
  401. Unlike strstr(), this function works correctly in multibyte locales with
  402. encodings different from UTF-8. */
  403. extern char * mbsstr (const char *haystack, const char *needle);
  404. #endif
  405. #if 0
  406. /* Compare the character strings S1 and S2, ignoring case, returning less than,
  407. equal to or greater than zero if S1 is lexicographically less than, equal to
  408. or greater than S2.
  409. Note: This function may, in multibyte locales, return 0 for strings of
  410. different lengths!
  411. Unlike strcasecmp(), this function works correctly in multibyte locales. */
  412. extern int mbscasecmp (const char *s1, const char *s2);
  413. #endif
  414. #if 0
  415. /* Compare the initial segment of the character string S1 consisting of at most
  416. N characters with the initial segment of the character string S2 consisting
  417. of at most N characters, ignoring case, returning less than, equal to or
  418. greater than zero if the initial segment of S1 is lexicographically less
  419. than, equal to or greater than the initial segment of S2.
  420. Note: This function may, in multibyte locales, return 0 for initial segments
  421. of different lengths!
  422. Unlike strncasecmp(), this function works correctly in multibyte locales.
  423. But beware that N is not a byte count but a character count! */
  424. extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
  425. #endif
  426. #if 0
  427. /* Compare the initial segment of the character string STRING consisting of
  428. at most mbslen (PREFIX) characters with the character string PREFIX,
  429. ignoring case, returning less than, equal to or greater than zero if this
  430. initial segment is lexicographically less than, equal to or greater than
  431. PREFIX.
  432. Note: This function may, in multibyte locales, return 0 if STRING is of
  433. smaller length than PREFIX!
  434. Unlike strncasecmp(), this function works correctly in multibyte
  435. locales. */
  436. extern char * mbspcasecmp (const char *string, const char *prefix);
  437. #endif
  438. #if 0
  439. /* Find the first occurrence of the character string NEEDLE in the character
  440. string HAYSTACK, using case-insensitive comparison.
  441. Note: This function may, in multibyte locales, return success even if
  442. strlen (haystack) < strlen (needle) !
  443. Unlike strcasestr(), this function works correctly in multibyte locales. */
  444. extern char * mbscasestr (const char *haystack, const char *needle);
  445. #endif
  446. #if 0
  447. /* Find the first occurrence in the character string STRING of any character
  448. in the character string ACCEPT. Return the number of bytes from the
  449. beginning of the string to this occurrence, or to the end of the string
  450. if none exists.
  451. Unlike strcspn(), this function works correctly in multibyte locales. */
  452. extern size_t mbscspn (const char *string, const char *accept);
  453. #endif
  454. #if 0
  455. /* Find the first occurrence in the character string STRING of any character
  456. in the character string ACCEPT. Return the pointer to it, or NULL if none
  457. exists.
  458. Unlike strpbrk(), this function works correctly in multibyte locales. */
  459. # define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
  460. extern char * mbspbrk (const char *string, const char *accept);
  461. #endif
  462. #if 0
  463. /* Find the first occurrence in the character string STRING of any character
  464. not in the character string REJECT. Return the number of bytes from the
  465. beginning of the string to this occurrence, or to the end of the string
  466. if none exists.
  467. Unlike strspn(), this function works correctly in multibyte locales. */
  468. extern size_t mbsspn (const char *string, const char *reject);
  469. #endif
  470. #if 0
  471. /* Search the next delimiter (multibyte character listed in the character
  472. string DELIM) starting at the character string *STRINGP.
  473. If one is found, overwrite it with a NUL, and advance *STRINGP to point
  474. to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
  475. If *STRINGP was already NULL, nothing happens.
  476. Return the old value of *STRINGP.
  477. This is a variant of mbstok_r() that supports empty fields.
  478. Caveat: It modifies the original string.
  479. Caveat: These functions cannot be used on constant strings.
  480. Caveat: The identity of the delimiting character is lost.
  481. See also mbstok_r(). */
  482. extern char * mbssep (char **stringp, const char *delim);
  483. #endif
  484. #if 0
  485. /* Parse the character string STRING into tokens separated by characters in
  486. the character string DELIM.
  487. If STRING is NULL, the saved pointer in SAVE_PTR is used as
  488. the next starting point. For example:
  489. char s[] = "-abc-=-def";
  490. char *sp;
  491. x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
  492. x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
  493. x = mbstok_r(NULL, "=", &sp); // x = NULL
  494. // s = "abc\0-def\0"
  495. Caveat: It modifies the original string.
  496. Caveat: These functions cannot be used on constant strings.
  497. Caveat: The identity of the delimiting character is lost.
  498. See also mbssep(). */
  499. extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
  500. #endif
  501. /* Map any int, typically from errno, into an error message. */
  502. #if 1
  503. # if 0
  504. # undef strerror
  505. # define strerror rpl_strerror
  506. extern char *strerror (int);
  507. # endif
  508. #elif defined GNULIB_POSIXCHECK
  509. # undef strerror
  510. # define strerror(e) \
  511. (GL_LINK_WARNING ("strerror is unportable - " \
  512. "use gnulib module strerror to guarantee non-NULL result"), \
  513. strerror (e))
  514. #endif
  515. #if 0
  516. # if 0
  517. # define strsignal rpl_strsignal
  518. # endif
  519. # if ! 1 || 0
  520. extern char *strsignal (int __sig);
  521. # endif
  522. #elif defined GNULIB_POSIXCHECK
  523. # undef strsignal
  524. # define strsignal(a) \
  525. (GL_LINK_WARNING ("strsignal is unportable - " \
  526. "use gnulib module strsignal for portability"), \
  527. strsignal (a))
  528. #endif
  529. #ifdef __cplusplus
  530. }
  531. #endif
  532. #endif /* _GL_STRING_H */
  533. #endif /* _GL_STRING_H */