63355f6f340a49205e98cde53ece97c2e24f07c9
[platform/upstream/diffutils.git] / lib / 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-2011 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 _@GUARD_PREFIX@_STRINGS_H
22
23 #if __GNUC__ >= 3
24 @PRAGMA_SYSTEM_HEADER@
25 #endif
26 @PRAGMA_COLUMNS@
27
28 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before <strings.h>.
29    But avoid namespace pollution on glibc systems.  */
30 #if defined __minix && !defined __GLIBC__
31 # include <sys/types.h>
32 #endif
33
34 /* The include_next requires a split double-inclusion guard.  */
35 #@INCLUDE_NEXT@ @NEXT_STRINGS_H@
36
37 #ifndef _@GUARD_PREFIX@_STRINGS_H
38 #define _@GUARD_PREFIX@_STRINGS_H
39
40
41 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
42
43 /* The definition of _GL_ARG_NONNULL is copied here.  */
44
45 /* The definition of _GL_WARN_ON_USE is copied here.  */
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51
52   /* Find the index of the least-significant set bit.  */
53 #if @GNULIB_FFS@
54 # if !@HAVE_FFS@
55 _GL_FUNCDECL_SYS (ffs, int, (int i));
56 # endif
57 _GL_CXXALIAS_SYS (ffs, int, (int i));
58 _GL_CXXALIASWARN (ffs);
59 #elif defined GNULIB_POSIXCHECK
60 # undef ffs
61 # if HAVE_RAW_DECL_FFS
62 _GL_WARN_ON_USE (ffs, "ffs is not portable - use the ffs module");
63 # endif
64 #endif
65
66 /* Compare strings S1 and S2, ignoring case, returning less than, equal to or
67    greater than zero if S1 is lexicographically less than, equal to or greater
68    than S2.
69    Note: This function does not work in multibyte locales.  */
70 #if ! @HAVE_STRCASECMP@
71 extern int strcasecmp (char const *s1, char const *s2)
72      _GL_ARG_NONNULL ((1, 2));
73 #endif
74 #if defined GNULIB_POSIXCHECK
75 /* strcasecmp() does not work with multibyte strings:
76    POSIX says that it operates on "strings", and "string" in POSIX is defined
77    as a sequence of bytes, not of characters.   */
78 # undef strcasecmp
79 # if HAVE_RAW_DECL_STRCASECMP
80 _GL_WARN_ON_USE (strcasecmp, "strcasecmp cannot work correctly on character "
81                  "strings in multibyte locales - "
82                  "use mbscasecmp if you care about "
83                  "internationalization, or use c_strcasecmp , "
84                  "gnulib module c-strcase) if you want a locale "
85                  "independent function");
86 # endif
87 #endif
88
89 /* Compare no more than N bytes of strings S1 and S2, ignoring case,
90    returning less than, equal to or greater than zero if S1 is
91    lexicographically less than, equal to or greater than S2.
92    Note: This function cannot work correctly in multibyte locales.  */
93 #if ! @HAVE_DECL_STRNCASECMP@
94 extern int strncasecmp (char const *s1, char const *s2, size_t n)
95      _GL_ARG_NONNULL ((1, 2));
96 #endif
97 #if defined GNULIB_POSIXCHECK
98 /* strncasecmp() does not work with multibyte strings:
99    POSIX says that it operates on "strings", and "string" in POSIX is defined
100    as a sequence of bytes, not of characters.  */
101 # undef strncasecmp
102 # if HAVE_RAW_DECL_STRNCASECMP
103 _GL_WARN_ON_USE (strncasecmp, "strncasecmp cannot work correctly on character "
104                  "strings in multibyte locales - "
105                  "use mbsncasecmp or mbspcasecmp if you care about "
106                  "internationalization, or use c_strncasecmp , "
107                  "gnulib module c-strcase) if you want a locale "
108                  "independent function");
109 # endif
110 #endif
111
112
113 #ifdef __cplusplus
114 }
115 #endif
116
117 #endif /* _@GUARD_PREFIX@_STRING_H */
118 #endif /* _@GUARD_PREFIX@_STRING_H */