__nop_locale_mgmt.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. #ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
  11. #define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. // Patch over lack of extended locale support
  16. typedef void *locale_t;
  17. static inline locale_t duplocale(locale_t) {
  18. return NULL;
  19. }
  20. static inline void freelocale(locale_t) {
  21. }
  22. static inline locale_t newlocale(int, const char *, locale_t) {
  23. return NULL;
  24. }
  25. static inline locale_t uselocale(locale_t) {
  26. return NULL;
  27. }
  28. #define LC_COLLATE_MASK (1 << LC_COLLATE)
  29. #define LC_CTYPE_MASK (1 << LC_CTYPE)
  30. #define LC_MESSAGES_MASK (1 << LC_MESSAGES)
  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_ALL_MASK (LC_COLLATE_MASK|\
  35. LC_CTYPE_MASK|\
  36. LC_MONETARY_MASK|\
  37. LC_NUMERIC_MASK|\
  38. LC_TIME_MASK|\
  39. LC_MESSAGES_MASK)
  40. #ifdef __cplusplus
  41. } // extern "C"
  42. #endif
  43. #endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H