Home | History | Annotate | Download | only in xlocale
      1 // -*- C++ -*-
      2 //===------------  support/xlocale/__nop_locale_mgmt.h -----------------===//
      3 //
      4 //                     The LLVM Compiler Infrastructure
      5 //
      6 // This file is dual licensed under the MIT and the University of Illinois Open
      7 // Source Licenses. See LICENSE.TXT for details.
      8 //
      9 //===----------------------------------------------------------------------===//
     10 
     11 #ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
     12 #define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
     13 
     14 #ifdef __cplusplus
     15 extern "C" {
     16 #endif
     17 
     18 // Patch over lack of extended locale support
     19 typedef void *locale_t;
     20 static inline locale_t duplocale(locale_t) {
     21   return NULL;
     22 }
     23 
     24 static inline void freelocale(locale_t) {
     25 }
     26 
     27 static inline locale_t newlocale(int, const char *, locale_t) {
     28   return NULL;
     29 }
     30 
     31 static inline locale_t uselocale(locale_t) {
     32   return NULL;
     33 }
     34 
     35 #define LC_COLLATE_MASK  (1 << LC_COLLATE)
     36 #define LC_CTYPE_MASK    (1 << LC_CTYPE)
     37 #define LC_MESSAGES_MASK (1 << LC_MESSAGES)
     38 #define LC_MONETARY_MASK (1 << LC_MONETARY)
     39 #define LC_NUMERIC_MASK  (1 << LC_NUMERIC)
     40 #define LC_TIME_MASK     (1 << LC_TIME)
     41 #define LC_ALL_MASK (LC_COLLATE_MASK|\
     42                      LC_CTYPE_MASK|\
     43                      LC_MONETARY_MASK|\
     44                      LC_NUMERIC_MASK|\
     45                      LC_TIME_MASK|\
     46                      LC_MESSAGES_MASK)
     47 
     48 #ifdef __cplusplus
     49 } // extern "C"
     50 #endif
     51 
     52 #endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
     53