cd94d251b14141dbf93870ccab2156c721a1024c
[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-2011 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, write to the Free Software Foundation,
18    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
19
20 /*
21  * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
22  * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
23  */
24
25 #ifndef _GL_LANGINFO_H
26
27 #if __GNUC__ >= 3
28 @PRAGMA_SYSTEM_HEADER@
29 #endif
30 @PRAGMA_COLUMNS@
31
32 /* The include_next requires a split double-inclusion guard.  */
33 #if @HAVE_LANGINFO_H@
34 # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
35 #endif
36
37 #ifndef _GL_LANGINFO_H
38 #define _GL_LANGINFO_H
39
40
41 #if !@HAVE_LANGINFO_H@
42
43 /* A platform that lacks <langinfo.h>.  */
44
45 /* Assume that it also lacks <nl_types.h> and the nl_item type.  */
46 # if !GNULIB_defined_nl_item
47 typedef int nl_item;
48 #  define GNULIB_defined_nl_item 1
49 # endif
50
51 /* nl_langinfo items of the LC_CTYPE category */
52 # define CODESET     10000
53 /* nl_langinfo items of the LC_NUMERIC category */
54 # define RADIXCHAR   10001
55 # define THOUSEP     10002
56 /* nl_langinfo items of the LC_TIME category */
57 # define D_T_FMT     10003
58 # define D_FMT       10004
59 # define T_FMT       10005
60 # define T_FMT_AMPM  10006
61 # define AM_STR      10007
62 # define PM_STR      10008
63 # define DAY_1       10009
64 # define DAY_2       (DAY_1 + 1)
65 # define DAY_3       (DAY_1 + 2)
66 # define DAY_4       (DAY_1 + 3)
67 # define DAY_5       (DAY_1 + 4)
68 # define DAY_6       (DAY_1 + 5)
69 # define DAY_7       (DAY_1 + 6)
70 # define ABDAY_1     10016
71 # define ABDAY_2     (ABDAY_1 + 1)
72 # define ABDAY_3     (ABDAY_1 + 2)
73 # define ABDAY_4     (ABDAY_1 + 3)
74 # define ABDAY_5     (ABDAY_1 + 4)
75 # define ABDAY_6     (ABDAY_1 + 5)
76 # define ABDAY_7     (ABDAY_1 + 6)
77 # define MON_1       10023
78 # define MON_2       (MON_1 + 1)
79 # define MON_3       (MON_1 + 2)
80 # define MON_4       (MON_1 + 3)
81 # define MON_5       (MON_1 + 4)
82 # define MON_6       (MON_1 + 5)
83 # define MON_7       (MON_1 + 6)
84 # define MON_8       (MON_1 + 7)
85 # define MON_9       (MON_1 + 8)
86 # define MON_10      (MON_1 + 9)
87 # define MON_11      (MON_1 + 10)
88 # define MON_12      (MON_1 + 11)
89 # define ABMON_1     10035
90 # define ABMON_2     (ABMON_1 + 1)
91 # define ABMON_3     (ABMON_1 + 2)
92 # define ABMON_4     (ABMON_1 + 3)
93 # define ABMON_5     (ABMON_1 + 4)
94 # define ABMON_6     (ABMON_1 + 5)
95 # define ABMON_7     (ABMON_1 + 6)
96 # define ABMON_8     (ABMON_1 + 7)
97 # define ABMON_9     (ABMON_1 + 8)
98 # define ABMON_10    (ABMON_1 + 9)
99 # define ABMON_11    (ABMON_1 + 10)
100 # define ABMON_12    (ABMON_1 + 11)
101 # define ERA         10047
102 # define ERA_D_FMT   10048
103 # define ERA_D_T_FMT 10049
104 # define ERA_T_FMT   10050
105 # define ALT_DIGITS  10051
106 /* nl_langinfo items of the LC_MONETARY category */
107 # define CRNCYSTR    10052
108 /* nl_langinfo items of the LC_MESSAGES category */
109 # define YESEXPR     10053
110 # define NOEXPR      10054
111
112 #else
113
114 /* A platform that has <langinfo.h>.  */
115
116 # if !@HAVE_LANGINFO_CODESET@
117 #  define CODESET     10000
118 #  define GNULIB_defined_CODESET 1
119 # endif
120
121 # if !@HAVE_LANGINFO_T_FMT_AMPM@
122 #  define T_FMT_AMPM  10006
123 #  define GNULIB_defined_T_FMT_AMPM 1
124 # endif
125
126 # if !@HAVE_LANGINFO_ERA@
127 #  define ERA         10047
128 #  define ERA_D_FMT   10048
129 #  define ERA_D_T_FMT 10049
130 #  define ERA_T_FMT   10050
131 #  define ALT_DIGITS  10051
132 #  define GNULIB_defined_ERA 1
133 # endif
134
135 # if !@HAVE_LANGINFO_YESEXPR@
136 #  define YESEXPR     10053
137 #  define NOEXPR      10054
138 #  define GNULIB_defined_YESEXPR 1
139 # endif
140
141 #endif
142
143 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
144
145 /* The definition of _GL_WARN_ON_USE is copied here.  */
146
147 /* Declare overridden functions.  */
148
149
150 /* Return a piece of locale dependent information.
151    Note: The difference between nl_langinfo (CODESET) and locale_charset ()
152    is that the latter normalizes the encoding names to GNU conventions.  */
153
154 #if @GNULIB_NL_LANGINFO@
155 # if @REPLACE_NL_LANGINFO@
156 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
157 #   undef nl_langinfo
158 #   define nl_langinfo rpl_nl_langinfo
159 #  endif
160 _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
161 _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
162 # else
163 #  if !@HAVE_NL_LANGINFO@
164 _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
165 #  endif
166 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
167 # endif
168 _GL_CXXALIASWARN (nl_langinfo);
169 #elif defined GNULIB_POSIXCHECK
170 # undef nl_langinfo
171 # if HAVE_RAW_DECL_NL_LANGINFO
172 _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
173                  "use gnulib module nl_langinfo for portability");
174 # endif
175 #endif
176
177
178 #endif /* _GL_LANGINFO_H */
179 #endif /* _GL_LANGINFO_H */