Mercurial > gnulib
annotate lib/langinfo.in.h @ 17363:5a51fb7777a9
sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
Problem reported by Marco Atzeri in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>.
* lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
Simply delegate to the system <sys/select.h> in this case too.
Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
be needed on Solaris either.
* lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
Simply delgate to the system <sys/time.h> in this case.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 19 Mar 2013 09:08:47 -0700 |
parents | e542fd46ad6f |
children | 344018b6e5d7 |
rev | line source |
---|---|
12428 | 1 /* Substitute for and wrapper around <langinfo.h>. |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
16366
diff
changeset
|
2 Copyright (C) 2009-2013 Free Software Foundation, Inc. |
12428 | 3 |
4 This program is free software; you can redistribute it and/or modify | |
5 it under the terms of the GNU General Public License as published by | |
6 the Free Software Foundation; either version 2, or (at your option) | |
7 any later version. | |
8 | |
9 This program is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU General Public License | |
16366
bb182ee4a09d
maint: replace FSF snail-mail addresses with URLs
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
15 along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
12428 | 16 |
17 /* | |
18 * POSIX <langinfo.h> for platforms that lack it or have an incomplete one. | |
19 * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html> | |
20 */ | |
21 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
22 #ifndef _@GUARD_PREFIX@_LANGINFO_H |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
23 |
12428 | 24 #if __GNUC__ >= 3 |
25 @PRAGMA_SYSTEM_HEADER@ | |
26 #endif | |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13663
diff
changeset
|
27 @PRAGMA_COLUMNS@ |
12428 | 28 |
29 /* The include_next requires a split double-inclusion guard. */ | |
30 #if @HAVE_LANGINFO_H@ | |
31 # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ | |
32 #endif | |
33 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
34 #ifndef _@GUARD_PREFIX@_LANGINFO_H |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
35 #define _@GUARD_PREFIX@_LANGINFO_H |
12428 | 36 |
37 | |
38 #if !@HAVE_LANGINFO_H@ | |
39 | |
40 /* A platform that lacks <langinfo.h>. */ | |
41 | |
42 /* Assume that it also lacks <nl_types.h> and the nl_item type. */ | |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
43 # if !GNULIB_defined_nl_item |
12428 | 44 typedef int nl_item; |
14274
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
45 # define GNULIB_defined_nl_item 1 |
da5595160b9f
Allow multiple gnulib generated replacements to coexist.
Bruno Haible <bruno@clisp.org>
parents:
14079
diff
changeset
|
46 # endif |
12428 | 47 |
48 /* nl_langinfo items of the LC_CTYPE category */ | |
49 # define CODESET 10000 | |
50 /* nl_langinfo items of the LC_NUMERIC category */ | |
51 # define RADIXCHAR 10001 | |
52 # define THOUSEP 10002 | |
53 /* nl_langinfo items of the LC_TIME category */ | |
54 # define D_T_FMT 10003 | |
55 # define D_FMT 10004 | |
56 # define T_FMT 10005 | |
57 # define T_FMT_AMPM 10006 | |
58 # define AM_STR 10007 | |
59 # define PM_STR 10008 | |
60 # define DAY_1 10009 | |
61 # define DAY_2 (DAY_1 + 1) | |
62 # define DAY_3 (DAY_1 + 2) | |
63 # define DAY_4 (DAY_1 + 3) | |
64 # define DAY_5 (DAY_1 + 4) | |
65 # define DAY_6 (DAY_1 + 5) | |
66 # define DAY_7 (DAY_1 + 6) | |
67 # define ABDAY_1 10016 | |
68 # define ABDAY_2 (ABDAY_1 + 1) | |
69 # define ABDAY_3 (ABDAY_1 + 2) | |
70 # define ABDAY_4 (ABDAY_1 + 3) | |
71 # define ABDAY_5 (ABDAY_1 + 4) | |
72 # define ABDAY_6 (ABDAY_1 + 5) | |
73 # define ABDAY_7 (ABDAY_1 + 6) | |
74 # define MON_1 10023 | |
75 # define MON_2 (MON_1 + 1) | |
76 # define MON_3 (MON_1 + 2) | |
77 # define MON_4 (MON_1 + 3) | |
78 # define MON_5 (MON_1 + 4) | |
79 # define MON_6 (MON_1 + 5) | |
80 # define MON_7 (MON_1 + 6) | |
81 # define MON_8 (MON_1 + 7) | |
82 # define MON_9 (MON_1 + 8) | |
83 # define MON_10 (MON_1 + 9) | |
84 # define MON_11 (MON_1 + 10) | |
85 # define MON_12 (MON_1 + 11) | |
86 # define ABMON_1 10035 | |
87 # define ABMON_2 (ABMON_1 + 1) | |
88 # define ABMON_3 (ABMON_1 + 2) | |
89 # define ABMON_4 (ABMON_1 + 3) | |
90 # define ABMON_5 (ABMON_1 + 4) | |
91 # define ABMON_6 (ABMON_1 + 5) | |
92 # define ABMON_7 (ABMON_1 + 6) | |
93 # define ABMON_8 (ABMON_1 + 7) | |
94 # define ABMON_9 (ABMON_1 + 8) | |
95 # define ABMON_10 (ABMON_1 + 9) | |
96 # define ABMON_11 (ABMON_1 + 10) | |
97 # define ABMON_12 (ABMON_1 + 11) | |
98 # define ERA 10047 | |
99 # define ERA_D_FMT 10048 | |
100 # define ERA_D_T_FMT 10049 | |
101 # define ERA_T_FMT 10050 | |
102 # define ALT_DIGITS 10051 | |
103 /* nl_langinfo items of the LC_MONETARY category */ | |
104 # define CRNCYSTR 10052 | |
105 /* nl_langinfo items of the LC_MESSAGES category */ | |
106 # define YESEXPR 10053 | |
107 # define NOEXPR 10054 | |
108 | |
109 #else | |
110 | |
111 /* A platform that has <langinfo.h>. */ | |
112 | |
113 # if !@HAVE_LANGINFO_CODESET@ | |
114 # define CODESET 10000 | |
115 # define GNULIB_defined_CODESET 1 | |
116 # endif | |
117 | |
13663
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
118 # if !@HAVE_LANGINFO_T_FMT_AMPM@ |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
119 # define T_FMT_AMPM 10006 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
120 # define GNULIB_defined_T_FMT_AMPM 1 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
121 # endif |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
122 |
12428 | 123 # if !@HAVE_LANGINFO_ERA@ |
124 # define ERA 10047 | |
125 # define ERA_D_FMT 10048 | |
126 # define ERA_D_T_FMT 10049 | |
127 # define ERA_T_FMT 10050 | |
128 # define ALT_DIGITS 10051 | |
129 # define GNULIB_defined_ERA 1 | |
130 # endif | |
131 | |
13663
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
132 # if !@HAVE_LANGINFO_YESEXPR@ |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
133 # define YESEXPR 10053 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
134 # define NOEXPR 10054 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
135 # define GNULIB_defined_YESEXPR 1 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
136 # endif |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
137 |
12428 | 138 #endif |
139 | |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
140 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
141 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
142 /* The definition of _GL_WARN_ON_USE is copied here. */ |
12428 | 143 |
144 /* Declare overridden functions. */ | |
145 | |
146 | |
147 /* Return a piece of locale dependent information. | |
148 Note: The difference between nl_langinfo (CODESET) and locale_charset () | |
149 is that the latter normalizes the encoding names to GNU conventions. */ | |
150 | |
151 #if @GNULIB_NL_LANGINFO@ | |
152 # if @REPLACE_NL_LANGINFO@ | |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
153 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
154 # undef nl_langinfo |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
155 # define nl_langinfo rpl_nl_langinfo |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
156 # endif |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
157 _GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
158 _GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
159 # else |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
160 # if !@HAVE_NL_LANGINFO@ |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
161 _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
162 # endif |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
163 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); |
12428 | 164 # endif |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
165 _GL_CXXALIASWARN (nl_langinfo); |
12428 | 166 #elif defined GNULIB_POSIXCHECK |
167 # undef nl_langinfo | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
168 # if HAVE_RAW_DECL_NL_LANGINFO |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
169 _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
170 "use gnulib module nl_langinfo for portability"); |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
171 # endif |
12428 | 172 #endif |
173 | |
174 | |
14840
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
175 #endif /* _@GUARD_PREFIX@_LANGINFO_H */ |
5f709022a256
Allow multiple gnulib generated include files to be combined.
Bruno Haible <bruno@clisp.org>
parents:
14274
diff
changeset
|
176 #endif /* _@GUARD_PREFIX@_LANGINFO_H */ |