master
 1/*
 2 * Copyright (c) 2005 - 2025 Apple Computer, Inc. All rights reserved.
 3 *
 4 * @APPLE_LICENSE_HEADER_START@
 5 * 
 6 * This file contains Original Code and/or Modifications of Original Code
 7 * as defined in and that are subject to the Apple Public Source License
 8 * Version 2.0 (the 'License'). You may not use this file except in
 9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 * 
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 * 
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24#ifndef __LOCALE_POSIX2008_H_
25#define __LOCALE_POSIX2008_H_
26
27#include <sys/cdefs.h>
28#include <_types.h>
29
30_LIBC_SINGLE_BY_DEFAULT()
31
32/*
33 * These definitions were all historically provided by <xlocale.h>, but they
34 * became standardized in POSIX.1-2008.  We make them available via either
35 * <xlocale.h> or <locale.h> at the appropriate conformance level.
36 */
37#define LC_ALL_MASK			(  LC_COLLATE_MASK \
38					 | LC_CTYPE_MASK \
39					 | LC_MESSAGES_MASK \
40					 | LC_MONETARY_MASK \
41					 | LC_NUMERIC_MASK \
42					 | LC_TIME_MASK )
43#define LC_COLLATE_MASK			(1 << 0)
44#define LC_CTYPE_MASK			(1 << 1)
45#define LC_MESSAGES_MASK		(1 << 2)
46#define LC_MONETARY_MASK		(1 << 3)
47#define LC_NUMERIC_MASK			(1 << 4)
48#define LC_TIME_MASK			(1 << 5)
49
50#define _LC_NUM_MASK			6
51#define _LC_LAST_MASK			(1 << (_LC_NUM_MASK - 1))
52
53#define LC_GLOBAL_LOCALE		((locale_t)-1)
54#define LC_C_LOCALE				((locale_t)NULL)
55
56#include <_types/_locale_t.h>
57
58__BEGIN_DECLS
59locale_t	duplocale(locale_t);
60int		freelocale(locale_t);
61locale_t	newlocale(int, __const char *, locale_t);
62locale_t	uselocale(locale_t);
63__END_DECLS
64
65#endif /* __LOCALE_POSIX2008_H_ */