diff options
Diffstat (limited to 'gl/locale.in.h')
-rw-r--r-- | gl/locale.in.h | 158 |
1 files changed, 150 insertions, 8 deletions
diff --git a/gl/locale.in.h b/gl/locale.in.h index 75b52993..264161a6 100644 --- a/gl/locale.in.h +++ b/gl/locale.in.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* A POSIX <locale.h>. | 1 | /* A POSIX <locale.h>. |
2 | Copyright (C) 2007-2010 Free Software Foundation, Inc. | 2 | Copyright (C) 2007-2013 Free Software Foundation, Inc. |
3 | 3 | ||
4 | This program is free software: you can redistribute it and/or modify | 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 | 5 | it under the terms of the GNU General Public License as published by |
@@ -14,22 +14,37 @@ | |||
14 | You should have received a copy of the GNU General Public License | 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/>. */ | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
16 | 16 | ||
17 | #ifndef _GL_LOCALE_H | ||
18 | |||
19 | #if __GNUC__ >= 3 | 17 | #if __GNUC__ >= 3 |
20 | @PRAGMA_SYSTEM_HEADER@ | 18 | @PRAGMA_SYSTEM_HEADER@ |
21 | #endif | 19 | #endif |
20 | @PRAGMA_COLUMNS@ | ||
21 | |||
22 | #ifdef _GL_ALREADY_INCLUDING_LOCALE_H | ||
23 | |||
24 | /* Special invocation conventions to handle Solaris header files | ||
25 | (through Solaris 10) when combined with gettext's libintl.h. */ | ||
26 | |||
27 | #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ | ||
28 | |||
29 | #else | ||
30 | /* Normal invocation convention. */ | ||
31 | |||
32 | #ifndef _@GUARD_PREFIX@_LOCALE_H | ||
33 | |||
34 | #define _GL_ALREADY_INCLUDING_LOCALE_H | ||
22 | 35 | ||
23 | /* The include_next requires a split double-inclusion guard. */ | 36 | /* The include_next requires a split double-inclusion guard. */ |
24 | #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ | 37 | #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ |
25 | 38 | ||
26 | #ifndef _GL_LOCALE_H | 39 | #undef _GL_ALREADY_INCLUDING_LOCALE_H |
27 | #define _GL_LOCALE_H | 40 | |
41 | #ifndef _@GUARD_PREFIX@_LOCALE_H | ||
42 | #define _@GUARD_PREFIX@_LOCALE_H | ||
28 | 43 | ||
29 | /* NetBSD 5.0 mis-defines NULL. */ | 44 | /* NetBSD 5.0 mis-defines NULL. */ |
30 | #include <stddef.h> | 45 | #include <stddef.h> |
31 | 46 | ||
32 | /* MacOS X 10.5 defines the locale_t type in <xlocale.h>. */ | 47 | /* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */ |
33 | #if @HAVE_XLOCALE_H@ | 48 | #if @HAVE_XLOCALE_H@ |
34 | # include <xlocale.h> | 49 | # include <xlocale.h> |
35 | #endif | 50 | #endif |
@@ -46,6 +61,132 @@ | |||
46 | # define LC_MESSAGES 1729 | 61 | # define LC_MESSAGES 1729 |
47 | #endif | 62 | #endif |
48 | 63 | ||
64 | /* Bionic libc's 'struct lconv' is just a dummy. */ | ||
65 | #if @REPLACE_STRUCT_LCONV@ | ||
66 | # define lconv rpl_lconv | ||
67 | struct lconv | ||
68 | { | ||
69 | /* All 'char *' are actually 'const char *'. */ | ||
70 | |||
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> */ | ||
73 | |||
74 | /* Symbol used as decimal point. */ | ||
75 | char *decimal_point; | ||
76 | /* Symbol used to separate groups of digits to the left of the decimal | ||
77 | point. */ | ||
78 | char *thousands_sep; | ||
79 | /* Definition of the size of groups of digits to the left of the decimal | ||
80 | point. */ | ||
81 | char *grouping; | ||
82 | |||
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> */ | ||
85 | |||
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 | ||
89 | point. */ | ||
90 | char *mon_thousands_sep; | ||
91 | /* Definition of the size of groups of digits to the left of the decimal | ||
92 | point. */ | ||
93 | char *mon_grouping; | ||
94 | /* Sign used to indicate a value >= 0. */ | ||
95 | char *positive_sign; | ||
96 | /* Sign used to indicate a value < 0. */ | ||
97 | char *negative_sign; | ||
98 | |||
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. */ | ||
103 | char frac_digits; | ||
104 | /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it | ||
105 | comes after the number. */ | ||
106 | char p_cs_precedes; | ||
107 | /* For values >= 0: Position of the sign. */ | ||
108 | char p_sign_posn; | ||
109 | /* For values >= 0: Placement of spaces between currency symbol, sign, and | ||
110 | number. */ | ||
111 | char p_sep_by_space; | ||
112 | /* For values < 0: 1 if the currency symbol precedes the number, 0 if it | ||
113 | comes after the number. */ | ||
114 | char n_cs_precedes; | ||
115 | /* For values < 0: Position of the sign. */ | ||
116 | char n_sign_posn; | ||
117 | /* For values < 0: Placement of spaces between currency symbol, sign, and | ||
118 | number. */ | ||
119 | char n_sep_by_space; | ||
120 | |||
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 | ||
132 | number. */ | ||
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 | ||
140 | number. */ | ||
141 | char int_n_sep_by_space; | ||
142 | }; | ||
143 | #endif | ||
144 | |||
145 | #if @GNULIB_LOCALECONV@ | ||
146 | # if @REPLACE_LOCALECONV@ | ||
147 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
148 | # undef localeconv | ||
149 | # define localeconv rpl_localeconv | ||
150 | # endif | ||
151 | _GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); | ||
152 | _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); | ||
153 | # else | ||
154 | _GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); | ||
155 | # endif | ||
156 | _GL_CXXALIASWARN (localeconv); | ||
157 | #elif @REPLACE_STRUCT_LCONV@ | ||
158 | # undef localeconv | ||
159 | # define localeconv localeconv_used_without_requesting_gnulib_module_localeconv | ||
160 | #elif defined GNULIB_POSIXCHECK | ||
161 | # undef localeconv | ||
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"); | ||
166 | # endif | ||
167 | #endif | ||
168 | |||
169 | #if @GNULIB_SETLOCALE@ | ||
170 | # if @REPLACE_SETLOCALE@ | ||
171 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | ||
172 | # undef setlocale | ||
173 | # define setlocale rpl_setlocale | ||
174 | # define GNULIB_defined_setlocale 1 | ||
175 | # endif | ||
176 | _GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); | ||
177 | _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); | ||
178 | # else | ||
179 | _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); | ||
180 | # endif | ||
181 | _GL_CXXALIASWARN (setlocale); | ||
182 | #elif defined GNULIB_POSIXCHECK | ||
183 | # undef setlocale | ||
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"); | ||
187 | # endif | ||
188 | #endif | ||
189 | |||
49 | #if @GNULIB_DUPLOCALE@ | 190 | #if @GNULIB_DUPLOCALE@ |
50 | # if @REPLACE_DUPLOCALE@ | 191 | # if @REPLACE_DUPLOCALE@ |
51 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) | 192 | # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
@@ -70,5 +211,6 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " | |||
70 | # endif | 211 | # endif |
71 | #endif | 212 | #endif |
72 | 213 | ||
73 | #endif /* _GL_LOCALE_H */ | 214 | #endif /* _@GUARD_PREFIX@_LOCALE_H */ |
74 | #endif /* _GL_LOCALE_H */ | 215 | #endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */ |
216 | #endif /* _@GUARD_PREFIX@_LOCALE_H */ | ||