1 // -*- 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 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 // Patch over lack of extended locale support 18 typedef void *locale_t; duplocale(locale_t)19static inline locale_t duplocale(locale_t) { 20 return NULL; 21 } 22 freelocale(locale_t)23static inline void freelocale(locale_t) { 24 } 25 newlocale(int,const char *,locale_t)26static inline locale_t newlocale(int, const char *, locale_t) { 27 return NULL; 28 } 29 uselocale(locale_t)30static inline locale_t uselocale(locale_t) { 31 return NULL; 32 } 33 34 #define LC_COLLATE_MASK (1 << LC_COLLATE) 35 #define LC_CTYPE_MASK (1 << LC_CTYPE) 36 #define LC_MESSAGES_MASK (1 << LC_MESSAGES) 37 #define LC_MONETARY_MASK (1 << LC_MONETARY) 38 #define LC_NUMERIC_MASK (1 << LC_NUMERIC) 39 #define LC_TIME_MASK (1 << LC_TIME) 40 #define LC_ALL_MASK (LC_COLLATE_MASK|\ 41 LC_CTYPE_MASK|\ 42 LC_MONETARY_MASK|\ 43 LC_NUMERIC_MASK|\ 44 LC_TIME_MASK|\ 45 LC_MESSAGES_MASK) 46 47 #ifdef __cplusplus 48 } // extern "C" 49 #endif 50 51 #endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H 52