Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / include / locale.h
blob47b02e99adbb205cbb71f493fa994d3540403a2d
1 /*
2 locale.h
3 Values appropriate for the formatting of monetary and other
4 numberic quantities.
5 */
7 #ifndef _LOCALE_H_
8 #define _LOCALE_H_
10 #include "_ansi.h"
11 #include <sys/cdefs.h>
13 #define __need_NULL
14 #include <stddef.h>
16 #define LC_ALL 0
17 #define LC_COLLATE 1
18 #define LC_CTYPE 2
19 #define LC_MONETARY 3
20 #define LC_NUMERIC 4
21 #define LC_TIME 5
22 #define LC_MESSAGES 6
24 #if __POSIX_VISIBLE >= 200809 || defined (_LIBC)
26 #include <sys/_locale.h>
28 #define LC_ALL_MASK (1 << LC_ALL)
29 #define LC_COLLATE_MASK (1 << LC_COLLATE)
30 #define LC_CTYPE_MASK (1 << LC_CTYPE)
31 #define LC_MONETARY_MASK (1 << LC_MONETARY)
32 #define LC_NUMERIC_MASK (1 << LC_NUMERIC)
33 #define LC_TIME_MASK (1 << LC_TIME)
34 #define LC_MESSAGES_MASK (1 << LC_MESSAGES)
36 #define LC_GLOBAL_LOCALE ((struct __locale_t *) -1)
38 #endif /* __POSIX_VISIBLE >= 200809 */
40 _BEGIN_STD_C
42 struct lconv
44 char *decimal_point;
45 char *thousands_sep;
46 char *grouping;
47 char *int_curr_symbol;
48 char *currency_symbol;
49 char *mon_decimal_point;
50 char *mon_thousands_sep;
51 char *mon_grouping;
52 char *positive_sign;
53 char *negative_sign;
54 char int_frac_digits;
55 char frac_digits;
56 char p_cs_precedes;
57 char p_sep_by_space;
58 char n_cs_precedes;
59 char n_sep_by_space;
60 char p_sign_posn;
61 char n_sign_posn;
62 char int_n_cs_precedes;
63 char int_n_sep_by_space;
64 char int_n_sign_posn;
65 char int_p_cs_precedes;
66 char int_p_sep_by_space;
67 char int_p_sign_posn;
70 struct _reent;
71 char *_setlocale_r (struct _reent *, int, const char *);
72 struct lconv *_localeconv_r (struct _reent *);
74 struct __locale_t *_newlocale_r (struct _reent *, int, const char *,
75 struct __locale_t *);
76 void _freelocale_r (struct _reent *, struct __locale_t *);
77 struct __locale_t *_duplocale_r (struct _reent *, struct __locale_t *);
78 struct __locale_t *_uselocale_r (struct _reent *, struct __locale_t *);
79 const char *_getlocalename_l_r (struct _reent *, int, struct __locale_t *);
81 #ifndef _REENT_ONLY
83 char *setlocale (int, const char *);
84 struct lconv *localeconv (void);
86 #if __POSIX_VISIBLE >= 200809
87 locale_t newlocale (int, const char *, locale_t);
88 void freelocale (locale_t);
89 locale_t duplocale (locale_t);
90 locale_t uselocale (locale_t);
91 #endif /* __POSIX_VISIBLE >= 200809 */
93 #if __POSIX_VISIBLE >= 202405
94 const char *getlocalename_l (int, struct __locale_t *);
95 #endif
97 #endif /* _REENT_ONLY */
99 _END_STD_C
101 #endif /* _LOCALE_H_ */