]> git.cworth.org Git - tar/blob - gnu/strings.in.h
Imported Upstream version 1.24
[tar] / gnu / strings.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute <strings.h>.
4
5    Copyright (C) 2007-2010 Free Software Foundation, Inc.
6
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)
10    any later version.
11
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.
16
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.  */
20
21 #ifndef _GL_STRINGS_H
22
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26 @PRAGMA_COLUMNS@
27
28 /* The include_next requires a split double-inclusion guard.  */
29 #@INCLUDE_NEXT@ @NEXT_STRINGS_H@
30
31 #ifndef _GL_STRINGS_H
32 #define _GL_STRINGS_H
33
34
35 /* The definition of _GL_ARG_NONNULL is copied here.  */
36
37 /* The definition of _GL_WARN_ON_USE is copied here.  */
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43
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
46    than S2.
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));
51 #endif
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.   */
56 # undef strcasecmp
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");
64 # endif
65 #endif
66
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));
74 #endif
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.  */
79 # undef strncasecmp
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");
87 # endif
88 #endif
89
90
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif /* _GL_STRING_H */
96 #endif /* _GL_STRING_H */