blob: 4b3caa895fe59233a9a416b41934ed5e227a903c [file] [log] [blame]
Stephen Hinesc6ca60f2023-05-09 02:19:22 -07001// -*- C++ -*-
2//===-----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
11#define _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
12
13#include <__config>
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19// Patch over lack of extended locale support
20typedef void *locale_t;
21
22inline _LIBCPP_HIDE_FROM_ABI_C locale_t duplocale(locale_t) { return NULL; }
23
24inline _LIBCPP_HIDE_FROM_ABI_C void freelocale(locale_t) {}
25
26inline _LIBCPP_HIDE_FROM_ABI_C locale_t newlocale(int, const char*, locale_t) { return NULL; }
27
28inline _LIBCPP_HIDE_FROM_ABI_C locale_t uselocale(locale_t) { return NULL; }
29
30#define LC_COLLATE_MASK (1 << LC_COLLATE)
31#define LC_CTYPE_MASK (1 << LC_CTYPE)
32#define LC_MESSAGES_MASK (1 << LC_MESSAGES)
33#define LC_MONETARY_MASK (1 << LC_MONETARY)
34#define LC_NUMERIC_MASK (1 << LC_NUMERIC)
35#define LC_TIME_MASK (1 << LC_TIME)
36#define LC_ALL_MASK (LC_COLLATE_MASK|\
37 LC_CTYPE_MASK|\
38 LC_MONETARY_MASK|\
39 LC_NUMERIC_MASK|\
40 LC_TIME_MASK|\
41 LC_MESSAGES_MASK)
42
43#ifdef __cplusplus
44} // extern "C"
45#endif
46
47#endif // _LIBCPP___SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H