1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute <strings.h>.
5 Copyright (C) 2007-2011 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@
28 /* The include_next requires a split double-inclusion guard. */
29 #@INCLUDE_NEXT@ @NEXT_STRINGS_H@
35 /* The definition of _GL_ARG_NONNULL is copied here. */
37 /* The definition of _GL_WARN_ON_USE is copied here. */
44 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
45 greater than zero if S1 is lexicographically less than, equal to or greater
47 Note: This function does not work in multibyte locales. */
48 #if ! @HAVE_STRCASECMP@
49 extern int strcasecmp (char const *s1, char const *s2)
50 _GL_ARG_NONNULL ((1, 2));
52 #if defined GNULIB_POSIXCHECK
53 /* strcasecmp() does not work with multibyte strings:
54 POSIX says that it operates on "strings", and "string" in POSIX is defined
55 as a sequence of bytes, not of characters. */
57 # if HAVE_RAW_DECL_STRCASECMP
58 _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
59 "strings in multibyte locales - "
60 "use mbscasecmp if you care about "
61 "internationalization, or use c_strcasecmp , "
62 "gnulib module c-strcase) if you want a locale "
63 "independent function");
67 /* Compare no more than N bytes of strings S1 and S2, ignoring case,
68 returning less than, equal to or greater than zero if S1 is
69 lexicographically less than, equal to or greater than S2.
70 Note: This function cannot work correctly in multibyte locales. */
71 #if ! @HAVE_DECL_STRNCASECMP@
72 extern int strncasecmp (char const *s1, char const *s2, size_t n)
73 _GL_ARG_NONNULL ((1, 2));
75 #if defined GNULIB_POSIXCHECK
76 /* strncasecmp() does not work with multibyte strings:
77 POSIX says that it operates on "strings", and "string" in POSIX is defined
78 as a sequence of bytes, not of characters. */
80 # if HAVE_RAW_DECL_STRNCASECMP
81 _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
82 "strings in multibyte locales - "
83 "use mbsncasecmp or mbspcasecmp if you care about "
84 "internationalization, or use c_strncasecmp , "
85 "gnulib module c-strcase) if you want a locale "
86 "independent function");
95 #endif /* _GL_STRING_H */
96 #endif /* _GL_STRING_H */