OSDN Git Service

Timeval struct bitness issue [#2059]
[mingw/mingw-org-wsl.git] / include / locale.h
1 /**
2  * @file locale.h
3  * Copyright 2012, 2013 MinGW.org project
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  * 
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _LOCALE_H
25 #define _LOCALE_H
26 #pragma GCC system_header
27 #include <_mingw.h>
28
29 /* 
30  * Functions and types for localization (ie. changing the appearance of
31  * output based on the standards of a certain country).
32  */
33
34 /*
35  * NOTE: I have tried to test this, but I am limited by my knowledge of
36  *       locale issues. The structure does not bomb if you look at the
37  *       values, and 'decimal_point' even seems to be correct. But the
38  *       rest of the values are, by default, not particularly useful
39  *       (read meaningless and not related to the international settings
40  *       of the system).
41  */
42
43 #define LC_ALL          0
44 #define LC_COLLATE      1
45 #define LC_CTYPE        2
46 #define LC_MONETARY     3
47 #define LC_NUMERIC      4
48 #define LC_TIME         5
49 #define LC_MIN          LC_ALL
50 #define LC_MAX          LC_TIME
51
52 #ifndef RC_INVOKED
53
54 /* According to C89 std, NULL is defined in locale.h too.  */
55 #define __need_NULL
56 #include <stddef.h>
57
58 /*
59  * The structure returned by 'localeconv'.
60  */
61 struct lconv
62 {
63         char*   decimal_point;
64         char*   thousands_sep;
65         char*   grouping;
66         char*   int_curr_symbol;
67         char*   currency_symbol;
68         char*   mon_decimal_point;
69         char*   mon_thousands_sep;
70         char*   mon_grouping;
71         char*   positive_sign;
72         char*   negative_sign;
73         char    int_frac_digits;
74         char    frac_digits;
75         char    p_cs_precedes;
76         char    p_sep_by_space;
77         char    n_cs_precedes;
78         char    n_sep_by_space;
79         char    p_sign_posn;
80         char    n_sign_posn;
81 };
82
83 #ifdef  __cplusplus
84 extern "C" {
85 #endif
86
87 _CRTIMP  char* __cdecl __MINGW_NOTHROW setlocale (int, const char*);
88 _CRTIMP struct lconv* __cdecl __MINGW_NOTHROW localeconv (void);
89
90 #ifndef _WLOCALE_DEFINED  /* also declared in wchar.h */
91 # define __need_wchar_t
92 # include <stddef.h>
93   _CRTIMP wchar_t* __cdecl __MINGW_NOTHROW _wsetlocale(int, const wchar_t*);
94 # define _WLOCALE_DEFINED
95 #endif /* ndef _WLOCALE_DEFINED */
96
97 #ifdef  __cplusplus
98 }
99 #endif
100
101 #endif  /* Not RC_INVOKED */
102
103 #endif  /* Not _LOCALE_H */
104