Mercurial > hg > octave-kai > gnulib-hg
annotate lib/langinfo.in.h @ 13761:a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
* m4/include_next.m4 (gl_INCLUDE_NEXT): Define also PRAGMA_COLUMNS.
* lib/arpa_inet.in.h: Use PRAGMA_COLUMNS.
* lib/ctype.in.h: Likewise.
* lib/dirent.in.h: Likewise.
* lib/errno.in.h: Likewise.
* lib/fcntl.in.h: Likewise.
* lib/float.in.h: Likewise.
* lib/getopt.in.h: Likewise.
* lib/iconv.in.h: Likewise.
* lib/inttypes.in.h: Likewise.
* lib/langinfo.in.h: Likewise.
* lib/locale.in.h: Likewise.
* lib/math.in.h: Likewise.
* lib/netdb.in.h: Likewise.
* lib/netinet_in.in.h: Likewise.
* lib/poll.in.h: Likewise.
* lib/pthread.in.h: Likewise.
* lib/pty.in.h: Likewise.
* lib/sched.in.h: Likewise.
* lib/se-selinux.in.h: Likewise.
* lib/search.in.h: Likewise.
* lib/signal.in.h: Likewise.
* lib/spawn.in.h: Likewise.
* lib/stdarg.in.h: Likewise.
* lib/stddef.in.h: Likewise.
* lib/stdint.in.h: Likewise.
* lib/stdio.in.h: Likewise.
* lib/stdlib.in.h: Likewise.
* lib/string.in.h: Likewise.
* lib/strings.in.h: Likewise.
* lib/sys_file.in.h: Likewise.
* lib/sys_ioctl.in.h: Likewise.
* lib/sys_select.in.h: Likewise.
* lib/sys_socket.in.h: Likewise.
* lib/sys_stat.in.h: Likewise.
* lib/sys_time.in.h: Likewise.
* lib/sys_times.in.h: Likewise.
* lib/sys_utsname.in.h: Likewise.
* lib/sys_wait.in.h: Likewise.
* lib/sysexits.in.h: Likewise.
* lib/termios.in.h: Likewise.
* lib/time.in.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/wchar.in.h: Likewise.
* lib/wctype.in.h: Likewise.
* modules/arpa_inet (Makefile.am): Substitute PRAGMA_COLUMNS.
* modules/ctype (Makefile.am): Likewise.
* modules/dirent (Makefile.am): Likewise.
* modules/errno (Makefile.am): Likewise.
* modules/fcntl-h (Makefile.am): Likewise.
* modules/float (Makefile.am): Likewise.
* modules/getopt-posix (Makefile.am): Likewise.
* modules/iconv-h (Makefile.am): Likewise.
* modules/inttypes (Makefile.am): Likewise.
* modules/langinfo (Makefile.am): Likewise.
* modules/locale (Makefile.am): Likewise.
* modules/math (Makefile.am): Likewise.
* modules/netdb (Makefile.am): Likewise.
* modules/netinet_in (Makefile.am): Likewise.
* modules/poll-h (Makefile.am): Likewise.
* modules/pthread (Makefile.am): Likewise.
* modules/pty (Makefile.am): Likewise.
* modules/sched (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/selinux-h (Makefile.am): Likewise.
* modules/signal (Makefile.am): Likewise.
* modules/spawn (Makefile.am): Likewise.
* modules/stdarg (Makefile.am): Likewise.
* modules/stddef (Makefile.am): Likewise.
* modules/stdint (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.
* modules/sys_file (Makefile.am): Likewise.
* modules/sys_ioctl (Makefile.am): Likewise.
* modules/sys_select (Makefile.am): Likewise.
* modules/sys_socket (Makefile.am): Likewise.
* modules/sys_stat (Makefile.am): Likewise.
* modules/sys_time (Makefile.am): Likewise.
* modules/sys_times (Makefile.am): Likewise.
* modules/sys_utsname (Makefile.am): Likewise.
* modules/sys_wait (Makefile.am): Likewise.
* modules/sysexits (Makefile.am): Likewise.
* modules/termios (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
* modules/wctype (Makefile.am): Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 04 Oct 2010 23:35:51 +0200 |
parents | 9dc0f85b1c1c |
children | 97fc9a21a8fb |
rev | line source |
---|---|
12428 | 1 /* Substitute for and wrapper around <langinfo.h>. |
12559
c2cbabec01dd
update nearly all FSF copyright year lists to include 2010
Jim Meyering <meyering@redhat.com>
parents:
12524
diff
changeset
|
2 Copyright (C) 2009, 2010 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 | |
15 along with this program; if not, write to the Free Software Foundation, | |
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | |
17 | |
18 /* | |
19 * POSIX <langinfo.h> for platforms that lack it or have an incomplete one. | |
20 * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html> | |
21 */ | |
22 | |
13094
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
23 #ifndef _GL_LANGINFO_H |
2ed0fc659db8
Emit #pragma system_header after the inclusion guard, not before.
Bruno Haible <bruno@clisp.org>
parents:
13055
diff
changeset
|
24 |
12428 | 25 #if __GNUC__ >= 3 |
26 @PRAGMA_SYSTEM_HEADER@ | |
27 #endif | |
13761
a19ace3ba849
Avoid line length limitation from HP NonStop system header files.
Bruno Haible <bruno@clisp.org>
parents:
13663
diff
changeset
|
28 @PRAGMA_COLUMNS@ |
12428 | 29 |
30 /* The include_next requires a split double-inclusion guard. */ | |
31 #if @HAVE_LANGINFO_H@ | |
32 # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ | |
33 #endif | |
34 | |
35 #ifndef _GL_LANGINFO_H | |
36 #define _GL_LANGINFO_H | |
37 | |
38 | |
39 #if !@HAVE_LANGINFO_H@ | |
40 | |
41 /* A platform that lacks <langinfo.h>. */ | |
42 | |
43 /* Assume that it also lacks <nl_types.h> and the nl_item type. */ | |
44 typedef int nl_item; | |
45 | |
46 /* nl_langinfo items of the LC_CTYPE category */ | |
47 # define CODESET 10000 | |
48 /* nl_langinfo items of the LC_NUMERIC category */ | |
49 # define RADIXCHAR 10001 | |
50 # define THOUSEP 10002 | |
51 /* nl_langinfo items of the LC_TIME category */ | |
52 # define D_T_FMT 10003 | |
53 # define D_FMT 10004 | |
54 # define T_FMT 10005 | |
55 # define T_FMT_AMPM 10006 | |
56 # define AM_STR 10007 | |
57 # define PM_STR 10008 | |
58 # define DAY_1 10009 | |
59 # define DAY_2 (DAY_1 + 1) | |
60 # define DAY_3 (DAY_1 + 2) | |
61 # define DAY_4 (DAY_1 + 3) | |
62 # define DAY_5 (DAY_1 + 4) | |
63 # define DAY_6 (DAY_1 + 5) | |
64 # define DAY_7 (DAY_1 + 6) | |
65 # define ABDAY_1 10016 | |
66 # define ABDAY_2 (ABDAY_1 + 1) | |
67 # define ABDAY_3 (ABDAY_1 + 2) | |
68 # define ABDAY_4 (ABDAY_1 + 3) | |
69 # define ABDAY_5 (ABDAY_1 + 4) | |
70 # define ABDAY_6 (ABDAY_1 + 5) | |
71 # define ABDAY_7 (ABDAY_1 + 6) | |
72 # define MON_1 10023 | |
73 # define MON_2 (MON_1 + 1) | |
74 # define MON_3 (MON_1 + 2) | |
75 # define MON_4 (MON_1 + 3) | |
76 # define MON_5 (MON_1 + 4) | |
77 # define MON_6 (MON_1 + 5) | |
78 # define MON_7 (MON_1 + 6) | |
79 # define MON_8 (MON_1 + 7) | |
80 # define MON_9 (MON_1 + 8) | |
81 # define MON_10 (MON_1 + 9) | |
82 # define MON_11 (MON_1 + 10) | |
83 # define MON_12 (MON_1 + 11) | |
84 # define ABMON_1 10035 | |
85 # define ABMON_2 (ABMON_1 + 1) | |
86 # define ABMON_3 (ABMON_1 + 2) | |
87 # define ABMON_4 (ABMON_1 + 3) | |
88 # define ABMON_5 (ABMON_1 + 4) | |
89 # define ABMON_6 (ABMON_1 + 5) | |
90 # define ABMON_7 (ABMON_1 + 6) | |
91 # define ABMON_8 (ABMON_1 + 7) | |
92 # define ABMON_9 (ABMON_1 + 8) | |
93 # define ABMON_10 (ABMON_1 + 9) | |
94 # define ABMON_11 (ABMON_1 + 10) | |
95 # define ABMON_12 (ABMON_1 + 11) | |
96 # define ERA 10047 | |
97 # define ERA_D_FMT 10048 | |
98 # define ERA_D_T_FMT 10049 | |
99 # define ERA_T_FMT 10050 | |
100 # define ALT_DIGITS 10051 | |
101 /* nl_langinfo items of the LC_MONETARY category */ | |
102 # define CRNCYSTR 10052 | |
103 /* nl_langinfo items of the LC_MESSAGES category */ | |
104 # define YESEXPR 10053 | |
105 # define NOEXPR 10054 | |
106 | |
107 #else | |
108 | |
109 /* A platform that has <langinfo.h>. */ | |
110 | |
111 # if !@HAVE_LANGINFO_CODESET@ | |
112 # define CODESET 10000 | |
113 # define GNULIB_defined_CODESET 1 | |
114 # endif | |
115 | |
13663
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
116 # if !@HAVE_LANGINFO_T_FMT_AMPM@ |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
117 # define T_FMT_AMPM 10006 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
118 # 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
|
119 # endif |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
120 |
12428 | 121 # if !@HAVE_LANGINFO_ERA@ |
122 # define ERA 10047 | |
123 # define ERA_D_FMT 10048 | |
124 # define ERA_D_T_FMT 10049 | |
125 # define ERA_T_FMT 10050 | |
126 # define ALT_DIGITS 10051 | |
127 # define GNULIB_defined_ERA 1 | |
128 # endif | |
129 | |
13663
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
130 # if !@HAVE_LANGINFO_YESEXPR@ |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
131 # define YESEXPR 10053 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
132 # define NOEXPR 10054 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
133 # define GNULIB_defined_YESEXPR 1 |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
134 # endif |
9dc0f85b1c1c
langinfo, nl_langinfo: Fix for IRIX 5.3.
Bruno Haible <bruno@clisp.org>
parents:
13094
diff
changeset
|
135 |
12428 | 136 #endif |
137 | |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
138 /* 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
|
139 |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
140 /* The definition of _GL_WARN_ON_USE is copied here. */ |
12428 | 141 |
142 /* Declare overridden functions. */ | |
143 | |
144 | |
145 /* Return a piece of locale dependent information. | |
146 Note: The difference between nl_langinfo (CODESET) and locale_charset () | |
147 is that the latter normalizes the encoding names to GNU conventions. */ | |
148 | |
149 #if @GNULIB_NL_LANGINFO@ | |
150 # if @REPLACE_NL_LANGINFO@ | |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
151 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
152 # undef nl_langinfo |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
153 # define nl_langinfo rpl_nl_langinfo |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
154 # endif |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
155 _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
|
156 _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
|
157 # else |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
158 # if !@HAVE_NL_LANGINFO@ |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
159 _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
|
160 # endif |
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
161 _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); |
12428 | 162 # endif |
12934
480ece83bf05
langinfo: Avoid #define replacements in C++ mode.
Bruno Haible <bruno@clisp.org>
parents:
12766
diff
changeset
|
163 _GL_CXXALIASWARN (nl_langinfo); |
12428 | 164 #elif defined GNULIB_POSIXCHECK |
165 # undef nl_langinfo | |
12766
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
166 # if HAVE_RAW_DECL_NL_LANGINFO |
2c14f1e449e5
warn-on-use: use instead of link-warning
Eric Blake <ebb9@byu.net>
parents:
12559
diff
changeset
|
167 _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
|
168 "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
|
169 # endif |
12428 | 170 #endif |
171 | |
172 | |
173 #endif /* _GL_LANGINFO_H */ | |
174 #endif /* _GL_LANGINFO_H */ |