782a8fa4b260a875f27e64070129281fe687b8fa
[debian/tar] / gnu / langinfo.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* Substitute for and wrapper around <langinfo.h>.
4    Copyright (C) 2009-2013 Free Software Foundation, Inc.
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 3, or (at your option)
9    any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
18
19 /*
20  * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
21  * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
22  */
23
24 #ifndef _@GUARD_PREFIX@_LANGINFO_H
25
26 #if __GNUC__ >= 3
27 @PRAGMA_SYSTEM_HEADER@
28 #endif
29 @PRAGMA_COLUMNS@
30
31 /* The include_next requires a split double-inclusion guard.  */
32 #if @HAVE_LANGINFO_H@
33 # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
34 #endif
35
36 #ifndef _@GUARD_PREFIX@_LANGINFO_H
37 #define _@GUARD_PREFIX@_LANGINFO_H
38
39
40 #if !@HAVE_LANGINFO_H@
41
42 /* A platform that lacks <langinfo.h>.  */
43
44 /* Assume that it also lacks <nl_types.h> and the nl_item type.  */
45 # if !GNULIB_defined_nl_item
46 typedef int nl_item;
47 #  define GNULIB_defined_nl_item 1
48 # endif
49
50 /* nl_langinfo items of the LC_CTYPE category */
51 # define CODESET     10000
52 /* nl_langinfo items of the LC_NUMERIC category */
53 # define RADIXCHAR   10001
54 # define THOUSEP     10002
55 /* nl_langinfo items of the LC_TIME category */
56 # define D_T_FMT     10003
57 # define D_FMT       10004
58 # define T_FMT       10005
59 # define T_FMT_AMPM  10006
60 # define AM_STR      10007
61 # define PM_STR      10008
62 # define DAY_1       10009
63 # define DAY_2       (DAY_1 + 1)
64 # define DAY_3       (DAY_1 + 2)
65 # define DAY_4       (DAY_1 + 3)
66 # define DAY_5       (DAY_1 + 4)
67 # define DAY_6       (DAY_1 + 5)
68 # define DAY_7       (DAY_1 + 6)
69 # define ABDAY_1     10016
70 # define ABDAY_2     (ABDAY_1 + 1)
71 # define ABDAY_3     (ABDAY_1 + 2)
72 # define ABDAY_4     (ABDAY_1 + 3)
73 # define ABDAY_5     (ABDAY_1 + 4)
74 # define ABDAY_6     (ABDAY_1 + 5)
75 # define ABDAY_7     (ABDAY_1 + 6)
76 # define MON_1       10023
77 # define MON_2       (MON_1 + 1)
78 # define MON_3       (MON_1 + 2)
79 # define MON_4       (MON_1 + 3)
80 # define MON_5       (MON_1 + 4)
81 # define MON_6       (MON_1 + 5)
82 # define MON_7       (MON_1 + 6)
83 # define MON_8       (MON_1 + 7)
84 # define MON_9       (MON_1 + 8)
85 # define MON_10      (MON_1 + 9)
86 # define MON_11      (MON_1 + 10)
87 # define MON_12      (MON_1 + 11)
88 # define ABMON_1     10035
89 # define ABMON_2     (ABMON_1 + 1)
90 # define ABMON_3     (ABMON_1 + 2)
91 # define ABMON_4     (ABMON_1 + 3)
92 # define ABMON_5     (ABMON_1 + 4)
93 # define ABMON_6     (ABMON_1 + 5)
94 # define ABMON_7     (ABMON_1 + 6)
95 # define ABMON_8     (ABMON_1 + 7)
96 # define ABMON_9     (ABMON_1 + 8)
97 # define ABMON_10    (ABMON_1 + 9)
98 # define ABMON_11    (ABMON_1 + 10)
99 # define ABMON_12    (ABMON_1 + 11)
100 # define ERA         10047
101 # define ERA_D_FMT   10048
102 # define ERA_D_T_FMT 10049
103 # define ERA_T_FMT   10050
104 # define ALT_DIGITS  10051
105 /* nl_langinfo items of the LC_MONETARY category */
106 # define CRNCYSTR    10052
107 /* nl_langinfo items of the LC_MESSAGES category */
108 # define YESEXPR     10053
109 # define NOEXPR      10054
110
111 #else
112
113 /* A platform that has <langinfo.h>.  */
114
115 # if !@HAVE_LANGINFO_CODESET@
116 #  define CODESET     10000
117 #  define GNULIB_defined_CODESET 1
118 # endif
119
120 # if !@HAVE_LANGINFO_T_FMT_AMPM@
121 #  define T_FMT_AMPM  10006
122 #  define GNULIB_defined_T_FMT_AMPM 1
123 # endif
124
125 # if !@HAVE_LANGINFO_ERA@
126 #  define ERA         10047
127 #  define ERA_D_FMT   10048
128 #  define ERA_D_T_FMT 10049
129 #  define ERA_T_FMT   10050
130 #  define ALT_DIGITS  10051
131 #  define GNULIB_defined_ERA 1
132 # endif
133
134 # if !@HAVE_LANGINFO_YESEXPR@
135 #  define YESEXPR     10053
136 #  define NOEXPR      10054
137 #  define GNULIB_defined_YESEXPR 1
138 # endif
139
140 #endif
141
142 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
143
144 /* The definition of _GL_WARN_ON_USE is copied here.  */
145
146 /* Declare overridden functions.  */
147
148
149 /* Return a piece of locale dependent information.
150    Note: The difference between nl_langinfo (CODESET) and locale_charset ()
151    is that the latter normalizes the encoding names to GNU conventions.  */
152
153 #if @GNULIB_NL_LANGINFO@
154 # if @REPLACE_NL_LANGINFO@
155 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
156 #   undef nl_langinfo
157 #   define nl_langinfo rpl_nl_langinfo
158 #  endif
159 _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
160 _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
161 # else
162 #  if !@HAVE_NL_LANGINFO@
163 _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
164 #  endif
165 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
166 # endif
167 _GL_CXXALIASWARN (nl_langinfo);
168 #elif defined GNULIB_POSIXCHECK
169 # undef nl_langinfo
170 # if HAVE_RAW_DECL_NL_LANGINFO
171 _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
172                  "use gnulib module nl_langinfo for portability");
173 # endif
174 #endif
175
176
177 #endif /* _@GUARD_PREFIX@_LANGINFO_H */
178 #endif /* _@GUARD_PREFIX@_LANGINFO_H */