1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute <strings.h>.
5 Copyright (C) 2007-2008 Free Software Foundation, Inc.
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)
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.
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. */
24 @PRAGMA_SYSTEM_HEADER@
27 /* The include_next requires a split double-inclusion guard. */
28 #@INCLUDE_NEXT@ @NEXT_STRINGS_H@
34 /* The definition of GL_LINK_WARNING is copied here. */
42 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
43 greater than zero if S1 is lexicographically less than, equal to or greater
45 Note: This function does not work in multibyte locales. */
46 #if ! @HAVE_STRCASECMP@
47 extern int strcasecmp (char const *s1, char const *s2);
49 #if defined GNULIB_POSIXCHECK
50 /* strcasecmp() does not work with multibyte strings:
51 POSIX says that it operates on "strings", and "string" in POSIX is defined
52 as a sequence of bytes, not of characters. */
54 # define strcasecmp(a,b) \
55 (GL_LINK_WARNING ("strcasecmp cannot work correctly on character strings " \
56 "in multibyte locales - " \
57 "use mbscasecmp if you care about " \
58 "internationalization, or use c_strcasecmp (from " \
59 "gnulib module c-strcase) if you want a locale " \
60 "independent function"), \
64 /* Compare no more than N bytes of strings S1 and S2, ignoring case,
65 returning less than, equal to or greater than zero if S1 is
66 lexicographically less than, equal to or greater than S2.
67 Note: This function cannot work correctly in multibyte locales. */
68 #if ! @HAVE_DECL_STRNCASECMP@
69 extern int strncasecmp (char const *s1, char const *s2, size_t n);
71 #if defined GNULIB_POSIXCHECK
72 /* strncasecmp() does not work with multibyte strings:
73 POSIX says that it operates on "strings", and "string" in POSIX is defined
74 as a sequence of bytes, not of characters. */
76 # define strncasecmp(a,b,n) \
77 (GL_LINK_WARNING ("strncasecmp cannot work correctly on character " \
78 "strings in multibyte locales - " \
79 "use mbsncasecmp or mbspcasecmp if you care about " \
80 "internationalization, or use c_strncasecmp (from " \
81 "gnulib module c-strcase) if you want a locale " \
82 "independent function"), \
83 strncasecmp (a, b, n))
91 #endif /* _GL_STRING_H */
92 #endif /* _GL_STRING_H */