summaryrefslogtreecommitdiffstats
path: root/gl/locale.in.h
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-02-11 06:20:24 (GMT)
committerAndreas Baumann <mail@andreasbaumann.cc>2023-02-11 06:20:24 (GMT)
commitf867d7b44080fa9716deeff4476275f9a489879f (patch)
treebc964662fc3300dc626fb6d833d8ed5c8f46eca7 /gl/locale.in.h
parent9734c439cba0a02b087e50789e94ec9b07754608 (diff)
parentc07206f2ccc2356aa74bc6813a94c2190017d44e (diff)
downloadmonitoring-plugins-f867d7b44080fa9716deeff4476275f9a489879f.tar.gz
Merge branch 'master' into curlfixes
Diffstat (limited to 'gl/locale.in.h')
-rw-r--r--gl/locale.in.h121
1 files changed, 105 insertions, 16 deletions
diff --git a/gl/locale.in.h b/gl/locale.in.h
index 264161a..538b834 100644
--- a/gl/locale.in.h
+++ b/gl/locale.in.h
@@ -1,28 +1,31 @@
1/* A POSIX <locale.h>. 1/* A POSIX <locale.h>.
2 Copyright (C) 2007-2013 Free Software Foundation, Inc. 2 Copyright (C) 2007-2023 Free Software Foundation, Inc.
3 3
4 This program is free software: you can redistribute it and/or modify 4 This file 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 Lesser General Public License as
6 the Free Software Foundation; either version 3 of the License, or 6 published by the Free Software Foundation; either version 2.1 of the
7 (at your option) any later version. 7 License, or (at your option) any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 This file is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU Lesser General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
16 16
17#if __GNUC__ >= 3 17#if __GNUC__ >= 3
18@PRAGMA_SYSTEM_HEADER@ 18@PRAGMA_SYSTEM_HEADER@
19#endif 19#endif
20@PRAGMA_COLUMNS@ 20@PRAGMA_COLUMNS@
21 21
22#ifdef _GL_ALREADY_INCLUDING_LOCALE_H 22#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \
23 || defined _GL_ALREADY_INCLUDING_LOCALE_H
23 24
24/* Special invocation conventions to handle Solaris header files 25/* Special invocation convention:
25 (through Solaris 10) when combined with gettext's libintl.h. */ 26 - Inside mingw header files,
27 - To handle Solaris header files (through Solaris 10) when combined
28 with gettext's libintl.h. */
26 29
27#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ 30#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
28 31
@@ -61,6 +64,18 @@
61# define LC_MESSAGES 1729 64# define LC_MESSAGES 1729
62#endif 65#endif
63 66
67/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and
68 int_n_*. Instead of overriding 'struct lconv', merely define these member
69 names as macros. This avoids trouble in C++ mode. */
70#if defined _MSC_VER
71# define int_p_cs_precedes p_cs_precedes
72# define int_p_sign_posn p_sign_posn
73# define int_p_sep_by_space p_sep_by_space
74# define int_n_cs_precedes n_cs_precedes
75# define int_n_sign_posn n_sign_posn
76# define int_n_sep_by_space n_sep_by_space
77#endif
78
64/* Bionic libc's 'struct lconv' is just a dummy. */ 79/* Bionic libc's 'struct lconv' is just a dummy. */
65#if @REPLACE_STRUCT_LCONV@ 80#if @REPLACE_STRUCT_LCONV@
66# define lconv rpl_lconv 81# define lconv rpl_lconv
@@ -69,7 +84,7 @@ struct lconv
69 /* All 'char *' are actually 'const char *'. */ 84 /* All 'char *' are actually 'const char *'. */
70 85
71 /* Members that depend on the LC_NUMERIC category of the locale. See 86 /* 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> */ 87 <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
73 88
74 /* Symbol used as decimal point. */ 89 /* Symbol used as decimal point. */
75 char *decimal_point; 90 char *decimal_point;
@@ -81,7 +96,7 @@ struct lconv
81 char *grouping; 96 char *grouping;
82 97
83 /* Members that depend on the LC_MONETARY category of the locale. See 98 /* 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> */ 99 <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
85 100
86 /* Symbol used as decimal point. */ 101 /* Symbol used as decimal point. */
87 char *mon_decimal_point; 102 char *mon_decimal_point;
@@ -153,7 +168,9 @@ _GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
153# else 168# else
154_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); 169_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
155# endif 170# endif
171# if __GLIBC__ >= 2
156_GL_CXXALIASWARN (localeconv); 172_GL_CXXALIASWARN (localeconv);
173# endif
157#elif @REPLACE_STRUCT_LCONV@ 174#elif @REPLACE_STRUCT_LCONV@
158# undef localeconv 175# undef localeconv
159# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv 176# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
@@ -178,7 +195,9 @@ _GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
178# else 195# else
179_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); 196_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
180# endif 197# endif
198# if __GLIBC__ >= 2
181_GL_CXXALIASWARN (setlocale); 199_GL_CXXALIASWARN (setlocale);
200# endif
182#elif defined GNULIB_POSIXCHECK 201#elif defined GNULIB_POSIXCHECK
183# undef setlocale 202# undef setlocale
184# if HAVE_RAW_DECL_SETLOCALE 203# if HAVE_RAW_DECL_SETLOCALE
@@ -187,11 +206,50 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
187# endif 206# endif
188#endif 207#endif
189 208
190#if @GNULIB_DUPLOCALE@ 209#if @GNULIB_SETLOCALE_NULL@
210/* Included here for convenience. */
211# include "setlocale_null.h"
212#endif
213
214#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_NEWLOCALE@)
215# if @REPLACE_NEWLOCALE@
216# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
217# undef newlocale
218# define newlocale rpl_newlocale
219# define GNULIB_defined_newlocale 1
220# endif
221_GL_FUNCDECL_RPL (newlocale, locale_t,
222 (int category_mask, const char *name, locale_t base)
223 _GL_ARG_NONNULL ((2)));
224_GL_CXXALIAS_RPL (newlocale, locale_t,
225 (int category_mask, const char *name, locale_t base));
226# else
227# if @HAVE_NEWLOCALE@
228_GL_CXXALIAS_SYS (newlocale, locale_t,
229 (int category_mask, const char *name, locale_t base));
230# endif
231# endif
232# if @HAVE_NEWLOCALE@
233_GL_CXXALIASWARN (newlocale);
234# endif
235# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
236# ifndef HAVE_WORKING_NEWLOCALE
237# define HAVE_WORKING_NEWLOCALE 1
238# endif
239# endif
240#elif defined GNULIB_POSIXCHECK
241# undef newlocale
242# if HAVE_RAW_DECL_NEWLOCALE
243_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
244# endif
245#endif
246
247#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
191# if @REPLACE_DUPLOCALE@ 248# if @REPLACE_DUPLOCALE@
192# if !(defined __cplusplus && defined GNULIB_NAMESPACE) 249# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
193# undef duplocale 250# undef duplocale
194# define duplocale rpl_duplocale 251# define duplocale rpl_duplocale
252# define GNULIB_defined_duplocale 1
195# endif 253# endif
196_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); 254_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
197_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); 255_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
@@ -203,6 +261,11 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
203# if @HAVE_DUPLOCALE@ 261# if @HAVE_DUPLOCALE@
204_GL_CXXALIASWARN (duplocale); 262_GL_CXXALIASWARN (duplocale);
205# endif 263# endif
264# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
265# ifndef HAVE_WORKING_DUPLOCALE
266# define HAVE_WORKING_DUPLOCALE 1
267# endif
268# endif
206#elif defined GNULIB_POSIXCHECK 269#elif defined GNULIB_POSIXCHECK
207# undef duplocale 270# undef duplocale
208# if HAVE_RAW_DECL_DUPLOCALE 271# if HAVE_RAW_DECL_DUPLOCALE
@@ -211,6 +274,32 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
211# endif 274# endif
212#endif 275#endif
213 276
277#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_FREELOCALE@)
278# if @REPLACE_FREELOCALE@
279# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
280# undef freelocale
281# define freelocale rpl_freelocale
282# define GNULIB_defined_freelocale 1
283# endif
284_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
285_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
286# else
287# if @HAVE_FREELOCALE@
288/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is
289 int. */
290_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
291# endif
292# endif
293# if @HAVE_FREELOCALE@
294_GL_CXXALIASWARN (freelocale);
295# endif
296#elif defined GNULIB_POSIXCHECK
297# undef freelocale
298# if HAVE_RAW_DECL_FREELOCALE
299_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
300# endif
301#endif
302
214#endif /* _@GUARD_PREFIX@_LOCALE_H */ 303#endif /* _@GUARD_PREFIX@_LOCALE_H */
215#endif /* ! _GL_ALREADY_INCLUDING_LOCALE_H */
216#endif /* _@GUARD_PREFIX@_LOCALE_H */ 304#endif /* _@GUARD_PREFIX@_LOCALE_H */
305#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */