1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Substitute for and wrapper around <langinfo.h>.
3 Copyright (C) 2009-2020 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <https://www.gnu.org/licenses/>. */
19 * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
20 * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
23 #ifndef _GL_LANGINFO_H
26 #pragma GCC system_header
30 /* The include_next requires a split double-inclusion guard. */
32 # include_next <langinfo.h>
35 #ifndef _GL_LANGINFO_H
36 #define _GL_LANGINFO_H
41 /* A platform that lacks <langinfo.h>. */
43 /* Assume that it also lacks <nl_types.h> and the nl_item type. */
44 # if !GNULIB_defined_nl_item
46 # define GNULIB_defined_nl_item 1
49 /* nl_langinfo items of the LC_CTYPE category */
50 # define CODESET 10000
51 /* nl_langinfo items of the LC_NUMERIC category */
52 # define RADIXCHAR 10001
53 # define DECIMAL_POINT RADIXCHAR
54 # define THOUSEP 10002
55 # define THOUSANDS_SEP THOUSEP
56 # define GROUPING 10114
57 /* nl_langinfo items of the LC_TIME category */
58 # define D_T_FMT 10003
61 # define T_FMT_AMPM 10006
65 # define DAY_2 (DAY_1 + 1)
66 # define DAY_3 (DAY_1 + 2)
67 # define DAY_4 (DAY_1 + 3)
68 # define DAY_5 (DAY_1 + 4)
69 # define DAY_6 (DAY_1 + 5)
70 # define DAY_7 (DAY_1 + 6)
71 # define ABDAY_1 10016
72 # define ABDAY_2 (ABDAY_1 + 1)
73 # define ABDAY_3 (ABDAY_1 + 2)
74 # define ABDAY_4 (ABDAY_1 + 3)
75 # define ABDAY_5 (ABDAY_1 + 4)
76 # define ABDAY_6 (ABDAY_1 + 5)
77 # define ABDAY_7 (ABDAY_1 + 6)
79 # define MON_2 (MON_1 + 1)
80 # define MON_3 (MON_1 + 2)
81 # define MON_4 (MON_1 + 3)
82 # define MON_5 (MON_1 + 4)
83 # define MON_6 (MON_1 + 5)
84 # define MON_7 (MON_1 + 6)
85 # define MON_8 (MON_1 + 7)
86 # define MON_9 (MON_1 + 8)
87 # define MON_10 (MON_1 + 9)
88 # define MON_11 (MON_1 + 10)
89 # define MON_12 (MON_1 + 11)
90 # define ALTMON_1 10200
91 # define ALTMON_2 (ALTMON_1 + 1)
92 # define ALTMON_3 (ALTMON_1 + 2)
93 # define ALTMON_4 (ALTMON_1 + 3)
94 # define ALTMON_5 (ALTMON_1 + 4)
95 # define ALTMON_6 (ALTMON_1 + 5)
96 # define ALTMON_7 (ALTMON_1 + 6)
97 # define ALTMON_8 (ALTMON_1 + 7)
98 # define ALTMON_9 (ALTMON_1 + 8)
99 # define ALTMON_10 (ALTMON_1 + 9)
100 # define ALTMON_11 (ALTMON_1 + 10)
101 # define ALTMON_12 (ALTMON_1 + 11)
102 # define ABMON_1 10035
103 # define ABMON_2 (ABMON_1 + 1)
104 # define ABMON_3 (ABMON_1 + 2)
105 # define ABMON_4 (ABMON_1 + 3)
106 # define ABMON_5 (ABMON_1 + 4)
107 # define ABMON_6 (ABMON_1 + 5)
108 # define ABMON_7 (ABMON_1 + 6)
109 # define ABMON_8 (ABMON_1 + 7)
110 # define ABMON_9 (ABMON_1 + 8)
111 # define ABMON_10 (ABMON_1 + 9)
112 # define ABMON_11 (ABMON_1 + 10)
113 # define ABMON_12 (ABMON_1 + 11)
115 # define ERA_D_FMT 10048
116 # define ERA_D_T_FMT 10049
117 # define ERA_T_FMT 10050
118 # define ALT_DIGITS 10051
119 /* nl_langinfo items of the LC_MONETARY category */
120 # define CRNCYSTR 10052
121 # define CURRENCY_SYMBOL CRNCYSTR
122 # define INT_CURR_SYMBOL 10100
123 # define MON_DECIMAL_POINT 10101
124 # define MON_THOUSANDS_SEP 10102
125 # define MON_GROUPING 10103
126 # define POSITIVE_SIGN 10104
127 # define NEGATIVE_SIGN 10105
128 # define FRAC_DIGITS 10106
129 # define INT_FRAC_DIGITS 10107
130 # define P_CS_PRECEDES 10108
131 # define N_CS_PRECEDES 10109
132 # define P_SEP_BY_SPACE 10110
133 # define N_SEP_BY_SPACE 10111
134 # define P_SIGN_POSN 10112
135 # define N_SIGN_POSN 10113
136 /* nl_langinfo items of the LC_MESSAGES category */
137 # define YESEXPR 10053
138 # define NOEXPR 10054
142 /* A platform that has <langinfo.h>. */
145 # define CODESET 10000
146 # define GNULIB_defined_CODESET 1
150 # define T_FMT_AMPM 10006
151 # define GNULIB_defined_T_FMT_AMPM 1
155 # define ALTMON_1 10200
156 # define ALTMON_2 (ALTMON_1 + 1)
157 # define ALTMON_3 (ALTMON_1 + 2)
158 # define ALTMON_4 (ALTMON_1 + 3)
159 # define ALTMON_5 (ALTMON_1 + 4)
160 # define ALTMON_6 (ALTMON_1 + 5)
161 # define ALTMON_7 (ALTMON_1 + 6)
162 # define ALTMON_8 (ALTMON_1 + 7)
163 # define ALTMON_9 (ALTMON_1 + 8)
164 # define ALTMON_10 (ALTMON_1 + 9)
165 # define ALTMON_11 (ALTMON_1 + 10)
166 # define ALTMON_12 (ALTMON_1 + 11)
167 # define GNULIB_defined_ALTMON 1
172 # define ERA_D_FMT 10048
173 # define ERA_D_T_FMT 10049
174 # define ERA_T_FMT 10050
175 # define ALT_DIGITS 10051
176 # define GNULIB_defined_ERA 1
180 # define YESEXPR 10053
181 # define NOEXPR 10054
182 # define GNULIB_defined_YESEXPR 1
187 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
188 /* C++ compatible function declaration macros.
189 Copyright (C) 2010-2020 Free Software Foundation, Inc.
191 This program is free software: you can redistribute it and/or modify it
192 under the terms of the GNU General Public License as published
193 by the Free Software Foundation; either version 3 of the License, or
194 (at your option) any later version.
196 This program is distributed in the hope that it will be useful,
197 but WITHOUT ANY WARRANTY; without even the implied warranty of
198 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
199 General Public License for more details.
201 You should have received a copy of the GNU General Public License
202 along with this program. If not, see <https://www.gnu.org/licenses/>. */
204 #ifndef _GL_CXXDEFS_H
205 #define _GL_CXXDEFS_H
207 /* Begin/end the GNULIB_NAMESPACE namespace. */
208 #if defined __cplusplus && defined GNULIB_NAMESPACE
209 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
210 # define _GL_END_NAMESPACE }
212 # define _GL_BEGIN_NAMESPACE
213 # define _GL_END_NAMESPACE
216 /* The three most frequent use cases of these macros are:
218 * For providing a substitute for a function that is missing on some
219 platforms, but is declared and works fine on the platforms on which
224 _GL_FUNCDECL_SYS (foo, ...);
226 _GL_CXXALIAS_SYS (foo, ...);
227 _GL_CXXALIASWARN (foo);
228 #elif defined GNULIB_POSIXCHECK
232 * For providing a replacement for a function that exists on all platforms,
233 but is broken/insufficient and needs to be replaced on some platforms:
237 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
241 _GL_FUNCDECL_RPL (foo, ...);
242 _GL_CXXALIAS_RPL (foo, ...);
244 _GL_CXXALIAS_SYS (foo, ...);
246 _GL_CXXALIASWARN (foo);
247 #elif defined GNULIB_POSIXCHECK
251 * For providing a replacement for a function that exists on some platforms
252 but is broken/insufficient and needs to be replaced on some of them and
253 is additionally either missing or undeclared on some other platforms:
257 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
261 _GL_FUNCDECL_RPL (foo, ...);
262 _GL_CXXALIAS_RPL (foo, ...);
264 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
265 _GL_FUNCDECL_SYS (foo, ...);
267 _GL_CXXALIAS_SYS (foo, ...);
269 _GL_CXXALIASWARN (foo);
270 #elif defined GNULIB_POSIXCHECK
275 /* _GL_EXTERN_C declaration;
276 performs the declaration with C linkage. */
277 #if defined __cplusplus
278 # define _GL_EXTERN_C extern "C"
280 # define _GL_EXTERN_C extern
283 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
284 declares a replacement function, named rpl_func, with the given prototype,
285 consisting of return type, parameters, and attributes.
287 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
288 _GL_ARG_NONNULL ((1)));
290 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
291 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
292 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
293 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
295 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
296 declares the system function, named func, with the given prototype,
297 consisting of return type, parameters, and attributes.
299 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
300 _GL_ARG_NONNULL ((1)));
302 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
303 _GL_EXTERN_C rettype func parameters_and_attributes
305 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
306 declares a C++ alias called GNULIB_NAMESPACE::func
307 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
309 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
311 Wrapping rpl_func in an object with an inline conversion operator
312 avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
313 actually used in the program. */
314 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
315 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
316 #if defined __cplusplus && defined GNULIB_NAMESPACE
317 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
318 namespace GNULIB_NAMESPACE \
320 static const struct _gl_ ## func ## _wrapper \
322 typedef rettype (*type) parameters; \
324 inline operator type () const \
330 _GL_EXTERN_C int _gl_cxxalias_dummy
332 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
333 _GL_EXTERN_C int _gl_cxxalias_dummy
336 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
337 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
338 except that the C function rpl_func may have a slightly different
339 declaration. A cast is used to silence the "invalid conversion" error
340 that would otherwise occur. */
341 #if defined __cplusplus && defined GNULIB_NAMESPACE
342 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
343 namespace GNULIB_NAMESPACE \
345 static const struct _gl_ ## func ## _wrapper \
347 typedef rettype (*type) parameters; \
349 inline operator type () const \
351 return reinterpret_cast<type>(::rpl_func); \
355 _GL_EXTERN_C int _gl_cxxalias_dummy
357 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
358 _GL_EXTERN_C int _gl_cxxalias_dummy
361 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
362 declares a C++ alias called GNULIB_NAMESPACE::func
363 that redirects to the system provided function func, if GNULIB_NAMESPACE
366 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
368 Wrapping func in an object with an inline conversion operator
369 avoids a reference to func unless GNULIB_NAMESPACE::func is
370 actually used in the program. */
371 #if defined __cplusplus && defined GNULIB_NAMESPACE
372 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
373 namespace GNULIB_NAMESPACE \
375 static const struct _gl_ ## func ## _wrapper \
377 typedef rettype (*type) parameters; \
379 inline operator type () const \
385 _GL_EXTERN_C int _gl_cxxalias_dummy
387 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
388 _GL_EXTERN_C int _gl_cxxalias_dummy
391 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
392 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
393 except that the C function func may have a slightly different declaration.
394 A cast is used to silence the "invalid conversion" error that would
396 #if defined __cplusplus && defined GNULIB_NAMESPACE
397 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
398 namespace GNULIB_NAMESPACE \
400 static const struct _gl_ ## func ## _wrapper \
402 typedef rettype (*type) parameters; \
404 inline operator type () const \
406 return reinterpret_cast<type>(::func); \
410 _GL_EXTERN_C int _gl_cxxalias_dummy
412 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
413 _GL_EXTERN_C int _gl_cxxalias_dummy
416 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
417 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
418 except that the C function is picked among a set of overloaded functions,
419 namely the one with rettype2 and parameters2. Two consecutive casts
420 are used to silence the "cannot find a match" and "invalid conversion"
421 errors that would otherwise occur. */
422 #if defined __cplusplus && defined GNULIB_NAMESPACE
423 /* The outer cast must be a reinterpret_cast.
424 The inner cast: When the function is defined as a set of overloaded
425 functions, it works as a static_cast<>, choosing the designated variant.
426 When the function is defined as a single variant, it works as a
427 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
428 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
429 namespace GNULIB_NAMESPACE \
431 static const struct _gl_ ## func ## _wrapper \
433 typedef rettype (*type) parameters; \
435 inline operator type () const \
437 return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
441 _GL_EXTERN_C int _gl_cxxalias_dummy
443 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
444 _GL_EXTERN_C int _gl_cxxalias_dummy
447 /* _GL_CXXALIASWARN (func);
448 causes a warning to be emitted when ::func is used but not when
449 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
451 #if defined __cplusplus && defined GNULIB_NAMESPACE
452 # define _GL_CXXALIASWARN(func) \
453 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
454 # define _GL_CXXALIASWARN_1(func,namespace) \
455 _GL_CXXALIASWARN_2 (func, namespace)
456 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
457 we enable the warning only when not optimizing. */
459 # define _GL_CXXALIASWARN_2(func,namespace) \
460 _GL_WARN_ON_USE (func, \
461 "The symbol ::" #func " refers to the system function. " \
462 "Use " #namespace "::" #func " instead.")
463 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
464 # define _GL_CXXALIASWARN_2(func,namespace) \
465 extern __typeof__ (func) func
467 # define _GL_CXXALIASWARN_2(func,namespace) \
468 _GL_EXTERN_C int _gl_cxxalias_dummy
471 # define _GL_CXXALIASWARN(func) \
472 _GL_EXTERN_C int _gl_cxxalias_dummy
475 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
476 causes a warning to be emitted when the given overloaded variant of ::func
477 is used but not when GNULIB_NAMESPACE::func is used. */
478 #if defined __cplusplus && defined GNULIB_NAMESPACE
479 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
480 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
482 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
483 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
484 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
485 we enable the warning only when not optimizing. */
487 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
488 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
489 "The symbol ::" #func " refers to the system function. " \
490 "Use " #namespace "::" #func " instead.")
491 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
492 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
493 extern __typeof__ (func) func
495 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
496 _GL_EXTERN_C int _gl_cxxalias_dummy
499 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
500 _GL_EXTERN_C int _gl_cxxalias_dummy
503 #endif /* _GL_CXXDEFS_H */
505 /* The definition of _GL_WARN_ON_USE is copied here. */
506 /* A C macro for emitting warnings if a function is used.
507 Copyright (C) 2010-2020 Free Software Foundation, Inc.
509 This program is free software: you can redistribute it and/or modify it
510 under the terms of the GNU General Public License as published
511 by the Free Software Foundation; either version 3 of the License, or
512 (at your option) any later version.
514 This program is distributed in the hope that it will be useful,
515 but WITHOUT ANY WARRANTY; without even the implied warranty of
516 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
517 General Public License for more details.
519 You should have received a copy of the GNU General Public License
520 along with this program. If not, see <https://www.gnu.org/licenses/>. */
522 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
523 for FUNCTION which will then trigger a compiler warning containing
524 the text of "literal string" anywhere that function is called, if
525 supported by the compiler. If the compiler does not support this
526 feature, the macro expands to an unused extern declaration.
528 _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
529 attribute used in _GL_WARN_ON_USE. If the compiler does not support
530 this feature, it expands to empty.
532 These macros are useful for marking a function as a potential
533 portability trap, with the intent that "literal string" include
534 instructions on the replacement function that should be used
536 _GL_WARN_ON_USE is for functions with 'extern' linkage.
537 _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
540 However, one of the reasons that a function is a portability trap is
541 if it has the wrong signature. Declaring FUNCTION with a different
542 signature in C is a compilation error, so this macro must use the
543 same type as any existing declaration so that programs that avoid
544 the problematic FUNCTION do not fail to compile merely because they
545 included a header that poisoned the function. But this implies that
546 _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
547 have a declaration. Use of this macro implies that there must not
548 be any other macro hiding the declaration of FUNCTION; but
549 undefining FUNCTION first is part of the poisoning process anyway
550 (although for symbols that are provided only via a macro, the result
551 is a compilation error rather than a warning containing
552 "literal string"). Also note that in C++, it is only safe to use if
553 FUNCTION has no overloads.
555 For an example, it is possible to poison 'getline' by:
556 - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
557 [getline]) in configure.ac, which potentially defines
558 HAVE_RAW_DECL_GETLINE
559 - adding this code to a header that wraps the system <stdio.h>:
561 #if HAVE_RAW_DECL_GETLINE
562 _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
563 "not universally present; use the gnulib module getline");
566 It is not possible to directly poison global variables. But it is
567 possible to write a wrapper accessor function, and poison that
568 (less common usage, like &environ, will cause a compilation error
569 rather than issue the nice warning, but the end result of informing
570 the developer about their portability problem is still achieved):
571 #if HAVE_RAW_DECL_ENVIRON
573 rpl_environ (void) { return &environ; }
574 _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
576 # define environ (*rpl_environ ())
578 or better (avoiding contradictory use of 'static' and 'extern'):
579 #if HAVE_RAW_DECL_ENVIRON
581 _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
582 rpl_environ (void) { return &environ; }
584 # define environ (*rpl_environ ())
587 #ifndef _GL_WARN_ON_USE
589 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
590 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
591 # define _GL_WARN_ON_USE(function, message) \
592 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
593 # define _GL_WARN_ON_USE_ATTRIBUTE(message) \
594 __attribute__ ((__warning__ (message)))
595 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
596 /* Verify the existence of the function. */
597 # define _GL_WARN_ON_USE(function, message) \
598 extern __typeof__ (function) function
599 # define _GL_WARN_ON_USE_ATTRIBUTE(message)
600 # else /* Unsupported. */
601 # define _GL_WARN_ON_USE(function, message) \
602 _GL_WARN_EXTERN_C int _gl_warn_on_use
603 # define _GL_WARN_ON_USE_ATTRIBUTE(message)
607 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
608 is like _GL_WARN_ON_USE (function, "string"), except that the function is
609 declared with the given prototype, consisting of return type, parameters,
611 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
612 not work in this case. */
613 #ifndef _GL_WARN_ON_USE_CXX
614 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
615 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
616 extern rettype function parameters_and_attributes \
617 __attribute__ ((__warning__ (msg)))
618 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
619 /* Verify the existence of the function. */
620 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
621 extern rettype function parameters_and_attributes
622 # else /* Unsupported. */
623 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
624 _GL_WARN_EXTERN_C int _gl_warn_on_use
628 /* _GL_WARN_EXTERN_C declaration;
629 performs the declaration with C linkage. */
630 #ifndef _GL_WARN_EXTERN_C
631 # if defined __cplusplus
632 # define _GL_WARN_EXTERN_C extern "C"
634 # define _GL_WARN_EXTERN_C extern
638 /* Declare overridden functions. */
641 /* Return a piece of locale dependent information.
642 Note: The difference between nl_langinfo (CODESET) and locale_charset ()
643 is that the latter normalizes the encoding names to GNU conventions. */
647 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
649 # define nl_langinfo rpl_nl_langinfo
651 _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
652 _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
655 _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
657 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
659 _GL_CXXALIASWARN (nl_langinfo);
660 #elif defined GNULIB_POSIXCHECK
662 # if HAVE_RAW_DECL_NL_LANGINFO
663 _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
664 "use gnulib module nl_langinfo for portability");
669 #endif /* _GL_LANGINFO_H */
670 #endif /* _GL_LANGINFO_H */