Print this page
2964 need POSIX 2008 locale object support (more C++ fixes)
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/head/langinfo.h
+++ new/usr/src/head/langinfo.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 /* Copyright (c) 1988 AT&T */
28 28 /* All Rights Reserved */
29 29
30 30 /*
31 31 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
32 32 */
33 33
34 34
35 35 #ifndef _LANGINFO_H
36 36 #define _LANGINFO_H
37 37
38 38 #include <sys/feature_tests.h>
39 39 #include <nl_types.h>
40 40
41 41 #ifdef __cplusplus
42 42 extern "C" {
43 43 #endif
44 44
45 45 /*
46 46 * The seven days of the week in their full beauty
47 47 */
48 48
49 49 #define DAY_1 1 /* sunday */
50 50 #define DAY_2 2 /* monday */
51 51 #define DAY_3 3 /* tuesday */
52 52 #define DAY_4 4 /* wednesday */
53 53 #define DAY_5 5 /* thursday */
54 54 #define DAY_6 6 /* friday */
55 55 #define DAY_7 7 /* saturday */
56 56
57 57 /*
58 58 * The abbreviated seven days of the week
59 59 */
60 60
61 61 #define ABDAY_1 8 /* sun */
62 62 #define ABDAY_2 9 /* mon */
63 63 #define ABDAY_3 10 /* tue */
64 64 #define ABDAY_4 11 /* wed */
65 65 #define ABDAY_5 12 /* thu */
66 66 #define ABDAY_6 13 /* fri */
67 67 #define ABDAY_7 14 /* sat */
68 68
69 69 /*
70 70 * The full names of the twelve months...
71 71 */
72 72
73 73 #define MON_1 15 /* january */
74 74 #define MON_2 16 /* february */
75 75 #define MON_3 17 /* march */
76 76 #define MON_4 18 /* april */
77 77 #define MON_5 19 /* may */
78 78 #define MON_6 20 /* june */
79 79 #define MON_7 21 /* july */
80 80 #define MON_8 22 /* august */
81 81 #define MON_9 23 /* september */
82 82 #define MON_10 24 /* october */
83 83 #define MON_11 25 /* november */
84 84 #define MON_12 26 /* december */
85 85
86 86 /*
87 87 * ... and their abbreviated form
88 88 */
89 89
90 90 #define ABMON_1 27 /* jan */
91 91 #define ABMON_2 28 /* feb */
92 92 #define ABMON_3 29 /* mar */
93 93 #define ABMON_4 30 /* apr */
94 94 #define ABMON_5 31 /* may */
95 95 #define ABMON_6 32 /* jun */
96 96 #define ABMON_7 33 /* jul */
97 97 #define ABMON_8 34 /* aug */
98 98 #define ABMON_9 35 /* sep */
99 99 #define ABMON_10 36 /* oct */
100 100 #define ABMON_11 37 /* nov */
101 101 #define ABMON_12 38 /* dec */
102 102
103 103 /*
104 104 * plus some special strings you might need to know
105 105 */
106 106
107 107 #define RADIXCHAR 39 /* radix character */
108 108 #define THOUSEP 40 /* separator for thousand */
109 109 /* YESSTR and NOSTR marked as legacy in XPG5 and removed in SUSv3 */
110 110 #if !defined(_XPG6) || defined(__EXTENSIONS__)
111 111 #define YESSTR 41 /* affirmative response for yes/no queries */
112 112 #define NOSTR 42 /* negative response for yes/no queries */
113 113 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__ */
114 114 #define CRNCYSTR 43 /* currency symbol */
115 115
116 116 /*
117 117 * Default string used to format date and time
118 118 * e.g. Sunday, August 24 21:08:38 MET 1986
119 119 */
120 120
121 121 #define D_T_FMT 44 /* string for formatting date and time */
122 122 #define D_FMT 45 /* date format */
123 123 #define T_FMT 46 /* time format */
124 124 #define AM_STR 47 /* am string */
125 125 #define PM_STR 48 /* pm string */
126 126
127 127 /*
128 128 * Additions for XPG4 (XSH4) Compliance
129 129 */
130 130
131 131 #define CODESET 49 /* codeset name */
132 132 #define T_FMT_AMPM 50 /* am or pm time format string */
133 133 #define ERA 51 /* era description segments */
134 134 #define ERA_D_FMT 52 /* era date format string */
135 135 #define ERA_D_T_FMT 53 /* era date and time format string */
136 136 #define ERA_T_FMT 54 /* era time format string */
137 137 #define ALT_DIGITS 55 /* alternative symbols for digits */
138 138 #define YESEXPR 56 /* affirmative response expression */
139 139 #define NOEXPR 57 /* negative response expression */
140 140 #define _DATE_FMT 58 /* strftime format for date(1) */
141 141
142 142 #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE)
143 143 #define MAXSTRMSG 58 /* Maximum number of strings in langinfo */
144 144 #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */
145 145
146 146 /*
147 147 * and the definitions of functions langinfo(3C)
|
↓ open down ↓ |
147 lines elided |
↑ open up ↑ |
148 148 */
149 149 #if defined(__STDC__)
150 150 char *nl_langinfo(nl_item); /* get a string from the database */
151 151 #else
152 152 char *nl_langinfo(); /* get a string from the database */
153 153 #endif
154 154
155 155 #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
156 156 #ifndef _LOCALE_T
157 157 #define _LOCALE_T
158 -typedef struct locale *locale_t;
158 +typedef struct _locale *locale_t;
159 159 #endif
160 160
161 161 #if defined(__STDC__)
162 162 char *nl_langinfo_l(nl_item, locale_t);
163 163 #else
164 164 char *nl_langinfo_l();
165 165 #endif
166 166 #endif
167 167
168 168 #ifdef __cplusplus
169 169 }
170 170 #endif
171 171
172 172 #endif /* _LANGINFO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX