Print this page
2964 need POSIX 2008 locale object support
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/head/iso/locale_iso.h
+++ new/usr/src/head/iso/locale_iso.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 2005 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 /*
32 32 * An application should not include this header directly. Instead it
33 33 * should be included only through the inclusion of other Sun headers.
34 34 *
35 35 * The contents of this header is limited to identifiers specified in the
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
36 36 * C Standard. Any new identifiers specified in future amendments to the
37 37 * C Standard must be placed in this header. If these new identifiers
38 38 * are required to also be in the C++ Standard "std" namespace, then for
39 39 * anything other than macro definitions, corresponding "using" directives
40 40 * must also be added to <locale.h>.
41 41 */
42 42
43 43 #ifndef _ISO_LOCALE_ISO_H
44 44 #define _ISO_LOCALE_ISO_H
45 45
46 -#pragma ident "%Z%%M% %I% %E% SMI"
47 -
48 46 #include <sys/feature_tests.h>
49 47
50 48 #ifdef __cplusplus
51 49 extern "C" {
52 50 #endif
53 51
54 52 #if __cplusplus >= 199711L
55 53 namespace std {
56 54 #endif
57 55
58 56 struct lconv {
59 57 char *decimal_point;
60 58 char *thousands_sep;
61 59 char *grouping;
62 60 char *int_curr_symbol;
63 61 char *currency_symbol;
64 62 char *mon_decimal_point;
65 63 char *mon_thousands_sep;
66 64 char *mon_grouping;
67 65 char *positive_sign;
68 66 char *negative_sign;
69 67 char int_frac_digits;
70 68 char frac_digits;
71 69 char p_cs_precedes;
72 70 char p_sep_by_space;
73 71 char n_cs_precedes;
74 72 char n_sep_by_space;
75 73 char p_sign_posn;
76 74 char n_sign_posn;
77 75
78 76 /*
79 77 * New in IEEE Std 1003.1-2001 for alignment with the ISO/IEC 9899:1999
80 78 * standard. Namespace and binary compatibility dictate that visibility
81 79 * of these new members be limited. Visibility is limited to a strictly
82 80 * conforming ANSI C environment (-Xc) or if _LCONV_C99 is defined.
83 81 */
84 82 #if (defined(_STRICT_STDC) && defined(_STDC_C99)) || defined(_LCONV_C99)
85 83 char int_p_cs_precedes;
86 84 char int_p_sep_by_space;
87 85 char int_n_cs_precedes;
88 86 char int_n_sep_by_space;
89 87 char int_p_sign_posn;
90 88 char int_n_sign_posn;
91 89 #endif
92 90 };
93 91
94 92 #define LC_CTYPE 0
95 93 #define LC_NUMERIC 1
96 94 #define LC_TIME 2
97 95 #define LC_COLLATE 3
98 96 #define LC_MONETARY 4
99 97 #define LC_MESSAGES 5
100 98 #define LC_ALL 6
101 99
102 100 #ifndef NULL
103 101 #if defined(_LP64)
104 102 #define NULL 0L
105 103 #else
106 104 #define NULL 0
107 105 #endif
↓ open down ↓ |
50 lines elided |
↑ open up ↑ |
108 106 #endif
109 107
110 108 #if defined(__STDC__)
111 109 extern char *setlocale(int, const char *);
112 110 extern struct lconv *localeconv(void);
113 111 #else
114 112 extern char *setlocale();
115 113 extern struct lconv *localeconv();
116 114 #endif
117 115
116 +#define LC_COLLATE_MASK (1<<0)
117 +#define LC_CTYPE_MASK (1<<1)
118 +#define LC_MESSAGES_MASK (1<<2)
119 +#define LC_MONETARY_MASK (1<<3)
120 +#define LC_NUMERIC_MASK (1<<4)
121 +#define LC_TIME_MASK (1<<5)
122 +#define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | \
123 + LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK)
124 +#define LC_GLOBAL_LOCALE ((locale_t)-1)
125 +
126 +/* XXX */
127 +#ifndef _LOCALE_T_DEFINED
128 +#define _LOCALE_T_DEFINED
129 +typedef struct _xlocale *locale_t;
130 +#endif
131 +
132 +locale_t duplocale(locale_t);
133 +int freelocale(locale_t);
134 +locale_t newlocale(int, const char *, locale_t);
135 +const char *querylocale(int, locale_t);
136 +locale_t uselocale(locale_t);
137 +
118 138 #if __cplusplus >= 199711L
119 139 }
120 140 #endif /* end of namespace std */
121 141
122 142 #ifdef __cplusplus
123 143 }
124 144 #endif
125 145
126 146 #endif /* _ISO_LOCALE_ISO_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX