2 Copyright (C) 2007-2013 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 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 @PRAGMA_SYSTEM_HEADER@
22 #ifdef _GL_ALREADY_INCLUDING_LOCALE_H
24 /* Special invocation conventions to handle Solaris header files
25 (through Solaris 10) when combined with gettext's libintl.h. */
27 #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
30 /* Normal invocation convention. */
32 #ifndef _@GUARD_PREFIX@_LOCALE_H
34 #define _GL_ALREADY_INCLUDING_LOCALE_H
36 /* The include_next requires a split double-inclusion guard. */
37 #@INCLUDE_NEXT@ @NEXT_LOCALE_H@
39 #undef _GL_ALREADY_INCLUDING_LOCALE_H
41 #ifndef _@GUARD_PREFIX@_LOCALE_H
42 #define _@GUARD_PREFIX@_LOCALE_H
44 /* NetBSD 5.0 mis-defines NULL. */
47 /* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
52 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
54 /* The definition of _GL_ARG_NONNULL is copied here. */
56 /* The definition of _GL_WARN_ON_USE is copied here. */
58 /* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
59 On systems that don't define it, use the same value as GNU libintl. */
60 #if !defined LC_MESSAGES
61 # define LC_MESSAGES 1729
64 /* Bionic libc's 'struct lconv' is just a dummy. */
65 #if @REPLACE_STRUCT_LCONV@
66 # define lconv rpl_lconv
69 /* All 'char *' are actually 'const char *'. */
71 /* Members that depend on the LC_NUMERIC category of the locale. See
72 <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
74 /* Symbol used as decimal point. */
76 /* Symbol used to separate groups of digits to the left of the decimal
79 /* Definition of the size of groups of digits to the left of the decimal
83 /* Members that depend on the LC_MONETARY category of the locale. See
84 <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
86 /* Symbol used as decimal point. */
87 char *mon_decimal_point;
88 /* Symbol used to separate groups of digits to the left of the decimal
90 char *mon_thousands_sep;
91 /* Definition of the size of groups of digits to the left of the decimal
94 /* Sign used to indicate a value >= 0. */
96 /* Sign used to indicate a value < 0. */
99 /* For formatting local currency. */
100 /* Currency symbol (3 characters) followed by separator (1 character). */
101 char *currency_symbol;
102 /* Number of digits after the decimal point. */
104 /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
105 comes after the number. */
107 /* For values >= 0: Position of the sign. */
109 /* For values >= 0: Placement of spaces between currency symbol, sign, and
112 /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
113 comes after the number. */
115 /* For values < 0: Position of the sign. */
117 /* For values < 0: Placement of spaces between currency symbol, sign, and
121 /* For formatting international currency. */
122 /* Currency symbol (3 characters) followed by separator (1 character). */
123 char *int_curr_symbol;
124 /* Number of digits after the decimal point. */
125 char int_frac_digits;
126 /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
127 comes after the number. */
128 char int_p_cs_precedes;
129 /* For values >= 0: Position of the sign. */
130 char int_p_sign_posn;
131 /* For values >= 0: Placement of spaces between currency symbol, sign, and
133 char int_p_sep_by_space;
134 /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
135 comes after the number. */
136 char int_n_cs_precedes;
137 /* For values < 0: Position of the sign. */
138 char int_n_sign_posn;
139 /* For values < 0: Placement of spaces between currency symbol, sign, and
141 char int_n_sep_by_space;
145 #if @GNULIB_LOCALECONV@
146 # if @REPLACE_LOCALECONV@
147 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
149 # define localeconv rpl_localeconv
151 _GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
152 _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
154 _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
156 _GL_CXXALIASWARN (localeconv);
157 #elif @REPLACE_STRUCT_LCONV@
159 # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
160 #elif defined GNULIB_POSIXCHECK
162 # if HAVE_RAW_DECL_LOCALECONV
163 _GL_WARN_ON_USE (localeconv,
164 "localeconv returns too few information on some platforms - "
165 "use gnulib module localeconv for portability");
169 #if @GNULIB_SETLOCALE@
170 # if @REPLACE_SETLOCALE@
171 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
173 # define setlocale rpl_setlocale
174 # define GNULIB_defined_setlocale 1
176 _GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
177 _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
179 _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
181 _GL_CXXALIASWARN (setlocale);
182 #elif defined GNULIB_POSIXCHECK
184 # if HAVE_RAW_DECL_SETLOCALE
185 _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
186 "use gnulib module setlocale for portability");
190 #if @GNULIB_DUPLOCALE@
191 # if @REPLACE_DUPLOCALE@
192 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
194 # define duplocale rpl_duplocale
196 _GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
197 _GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
199 # if @HAVE_DUPLOCALE@
200 _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
203 # if @HAVE_DUPLOCALE@
204 _GL_CXXALIASWARN (duplocale);
206 #elif defined GNULIB_POSIXCHECK
208 # if HAVE_RAW_DECL_DUPLOCALE
209 _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
210 "use gnulib module duplocale for portability");
214 #endif /* _@GUARD_PREFIX@_LOCALE_H */
215 #endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
216 #endif /* _@GUARD_PREFIX@_LOCALE_H */