Print this page
2964 need POSIX 2008 locale object support
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.
↓ open down ↓ |
23 lines elided |
↑ open up ↑ |
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 #ifndef _LANGINFO_H
32 32 #define _LANGINFO_H
33 33
34 -#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.2 */
35 -
36 34 #include <sys/feature_tests.h>
37 35 #include <nl_types.h>
38 36
39 37 #ifdef __cplusplus
40 38 extern "C" {
41 39 #endif
42 40
43 41 /*
44 42 * The seven days of the week in their full beauty
45 43 */
46 44
47 45 #define DAY_1 1 /* sunday */
48 46 #define DAY_2 2 /* monday */
49 47 #define DAY_3 3 /* tuesday */
50 48 #define DAY_4 4 /* wednesday */
51 49 #define DAY_5 5 /* thursday */
52 50 #define DAY_6 6 /* friday */
53 51 #define DAY_7 7 /* saturday */
54 52
55 53 /*
56 54 * The abbreviated seven days of the week
57 55 */
58 56
59 57 #define ABDAY_1 8 /* sun */
60 58 #define ABDAY_2 9 /* mon */
61 59 #define ABDAY_3 10 /* tue */
62 60 #define ABDAY_4 11 /* wed */
63 61 #define ABDAY_5 12 /* thu */
64 62 #define ABDAY_6 13 /* fri */
65 63 #define ABDAY_7 14 /* sat */
66 64
67 65 /*
68 66 * The full names of the twelve months...
69 67 */
70 68
71 69 #define MON_1 15 /* january */
72 70 #define MON_2 16 /* february */
73 71 #define MON_3 17 /* march */
74 72 #define MON_4 18 /* april */
75 73 #define MON_5 19 /* may */
76 74 #define MON_6 20 /* june */
77 75 #define MON_7 21 /* july */
78 76 #define MON_8 22 /* august */
79 77 #define MON_9 23 /* september */
80 78 #define MON_10 24 /* october */
81 79 #define MON_11 25 /* november */
82 80 #define MON_12 26 /* december */
83 81
84 82 /*
85 83 * ... and their abbreviated form
86 84 */
87 85
88 86 #define ABMON_1 27 /* jan */
89 87 #define ABMON_2 28 /* feb */
90 88 #define ABMON_3 29 /* mar */
91 89 #define ABMON_4 30 /* apr */
92 90 #define ABMON_5 31 /* may */
93 91 #define ABMON_6 32 /* jun */
94 92 #define ABMON_7 33 /* jul */
95 93 #define ABMON_8 34 /* aug */
96 94 #define ABMON_9 35 /* sep */
97 95 #define ABMON_10 36 /* oct */
98 96 #define ABMON_11 37 /* nov */
99 97 #define ABMON_12 38 /* dec */
100 98
101 99 /*
102 100 * plus some special strings you might need to know
103 101 */
104 102
105 103 #define RADIXCHAR 39 /* radix character */
106 104 #define THOUSEP 40 /* separator for thousand */
107 105 /* YESSTR and NOSTR marked as legacy in XPG5 and removed in SUSv3 */
108 106 #if !defined(_XPG6) || defined(__EXTENSIONS__)
109 107 #define YESSTR 41 /* affirmative response for yes/no queries */
110 108 #define NOSTR 42 /* negative response for yes/no queries */
111 109 #endif /* !defined(_XPG6) || defined(__EXTENSIONS__ */
112 110 #define CRNCYSTR 43 /* currency symbol */
113 111
114 112 /*
115 113 * Default string used to format date and time
116 114 * e.g. Sunday, August 24 21:08:38 MET 1986
117 115 */
118 116
119 117 #define D_T_FMT 44 /* string for formatting date and time */
120 118 #define D_FMT 45 /* date format */
121 119 #define T_FMT 46 /* time format */
122 120 #define AM_STR 47 /* am string */
123 121 #define PM_STR 48 /* pm string */
124 122
125 123 /*
126 124 * Additions for XPG4 (XSH4) Compliance
127 125 */
128 126
129 127 #define CODESET 49 /* codeset name */
130 128 #define T_FMT_AMPM 50 /* am or pm time format string */
131 129 #define ERA 51 /* era description segments */
132 130 #define ERA_D_FMT 52 /* era date format string */
133 131 #define ERA_D_T_FMT 53 /* era date and time format string */
↓ open down ↓ |
88 lines elided |
↑ open up ↑ |
134 132 #define ERA_T_FMT 54 /* era time format string */
135 133 #define ALT_DIGITS 55 /* alternative symbols for digits */
136 134 #define YESEXPR 56 /* affirmative response expression */
137 135 #define NOEXPR 57 /* negative response expression */
138 136 #define _DATE_FMT 58 /* strftime format for date(1) */
139 137
140 138 #if defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE)
141 139 #define MAXSTRMSG 58 /* Maximum number of strings in langinfo */
142 140 #endif /* defined(__EXTENSIONS__) || !defined(_XOPEN_SOURCE) */
143 141
142 +#ifndef _LOCALE_T_DEFINED
143 +#define _LOCALE_T_DEFINED
144 +typedef struct _xlocale *locale_t;
145 +#endif
146 +
144 147 /*
145 148 * and the definitions of functions langinfo(3C)
146 149 */
147 150 #if defined(__STDC__)
148 -char *nl_langinfo(nl_item); /* get a string from the database */
151 +char *nl_langinfo(nl_item); /* get a string from the database */
152 +char *nl_langinfo_l(nl_item, locale_t);
149 153 #else
150 -char *nl_langinfo(); /* get a string from the database */
154 +char *nl_langinfo(); /* get a string from the database */
155 +char *nl_langinfo_l();
151 156 #endif
152 157
153 158 #ifdef __cplusplus
154 159 }
155 160 #endif
156 161
157 162 #endif /* _LANGINFO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX