]> git.cworth.org Git - tar/blob - gnu/langinfo.in.h
5a4111127c50254615b07c6bd386b44358bdb18a
[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, 2010 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
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 _GL_LANGINFO_H
37 #define _GL_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 typedef int nl_item;
46
47 /* nl_langinfo items of the LC_CTYPE category */
48 # define CODESET     10000
49 /* nl_langinfo items of the LC_NUMERIC category */
50 # define RADIXCHAR   10001
51 # define THOUSEP     10002
52 /* nl_langinfo items of the LC_TIME category */
53 # define D_T_FMT     10003
54 # define D_FMT       10004
55 # define T_FMT       10005
56 # define T_FMT_AMPM  10006
57 # define AM_STR      10007
58 # define PM_STR      10008
59 # define DAY_1       10009
60 # define DAY_2       (DAY_1 + 1)
61 # define DAY_3       (DAY_1 + 2)
62 # define DAY_4       (DAY_1 + 3)
63 # define DAY_5       (DAY_1 + 4)
64 # define DAY_6       (DAY_1 + 5)
65 # define DAY_7       (DAY_1 + 6)
66 # define ABDAY_1     10016
67 # define ABDAY_2     (ABDAY_1 + 1)
68 # define ABDAY_3     (ABDAY_1 + 2)
69 # define ABDAY_4     (ABDAY_1 + 3)
70 # define ABDAY_5     (ABDAY_1 + 4)
71 # define ABDAY_6     (ABDAY_1 + 5)
72 # define ABDAY_7     (ABDAY_1 + 6)
73 # define MON_1       10023
74 # define MON_2       (MON_1 + 1)
75 # define MON_3       (MON_1 + 2)
76 # define MON_4       (MON_1 + 3)
77 # define MON_5       (MON_1 + 4)
78 # define MON_6       (MON_1 + 5)
79 # define MON_7       (MON_1 + 6)
80 # define MON_8       (MON_1 + 7)
81 # define MON_9       (MON_1 + 8)
82 # define MON_10      (MON_1 + 9)
83 # define MON_11      (MON_1 + 10)
84 # define MON_12      (MON_1 + 11)
85 # define ABMON_1     10035
86 # define ABMON_2     (ABMON_1 + 1)
87 # define ABMON_3     (ABMON_1 + 2)
88 # define ABMON_4     (ABMON_1 + 3)
89 # define ABMON_5     (ABMON_1 + 4)
90 # define ABMON_6     (ABMON_1 + 5)
91 # define ABMON_7     (ABMON_1 + 6)
92 # define ABMON_8     (ABMON_1 + 7)
93 # define ABMON_9     (ABMON_1 + 8)
94 # define ABMON_10    (ABMON_1 + 9)
95 # define ABMON_11    (ABMON_1 + 10)
96 # define ABMON_12    (ABMON_1 + 11)
97 # define ERA         10047
98 # define ERA_D_FMT   10048
99 # define ERA_D_T_FMT 10049
100 # define ERA_T_FMT   10050
101 # define ALT_DIGITS  10051
102 /* nl_langinfo items of the LC_MONETARY category */
103 # define CRNCYSTR    10052
104 /* nl_langinfo items of the LC_MESSAGES category */
105 # define YESEXPR     10053
106 # define NOEXPR      10054
107
108 #else
109
110 /* A platform that has <langinfo.h>.  */
111
112 # if !@HAVE_LANGINFO_CODESET@
113 #  define CODESET     10000
114 #  define GNULIB_defined_CODESET 1
115 # endif
116
117 # if !@HAVE_LANGINFO_ERA@
118 #  define ERA         10047
119 #  define ERA_D_FMT   10048
120 #  define ERA_D_T_FMT 10049
121 #  define ERA_T_FMT   10050
122 #  define ALT_DIGITS  10051
123 #  define GNULIB_defined_ERA 1
124 # endif
125
126 #endif
127
128 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
129
130 /* The definition of _GL_WARN_ON_USE is copied here.  */
131
132 /* Declare overridden functions.  */
133
134
135 /* Return a piece of locale dependent information.
136    Note: The difference between nl_langinfo (CODESET) and locale_charset ()
137    is that the latter normalizes the encoding names to GNU conventions.  */
138
139 #if @GNULIB_NL_LANGINFO@
140 # if @REPLACE_NL_LANGINFO@
141 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
142 #   undef nl_langinfo
143 #   define nl_langinfo rpl_nl_langinfo
144 #  endif
145 _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item));
146 _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item));
147 # else
148 #  if !@HAVE_NL_LANGINFO@
149 _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
150 #  endif
151 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
152 # endif
153 _GL_CXXALIASWARN (nl_langinfo);
154 #elif defined GNULIB_POSIXCHECK
155 # undef nl_langinfo
156 # if HAVE_RAW_DECL_NL_LANGINFO
157 _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
158                  "use gnulib module nl_langinfo for portability");
159 # endif
160 #endif
161
162
163 #endif /* _GL_LANGINFO_H */
164 #endif /* _GL_LANGINFO_H */