clocale 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. #ifndef _LIBCPP_CLOCALE
  10. #define _LIBCPP_CLOCALE
  11. /*
  12. clocale synopsis
  13. Macros:
  14. LC_ALL
  15. LC_COLLATE
  16. LC_CTYPE
  17. LC_MONETARY
  18. LC_NUMERIC
  19. LC_TIME
  20. NULL
  21. namespace std
  22. {
  23. struct lconv;
  24. char* setlocale(int category, const char* locale);
  25. lconv* localeconv();
  26. } // std
  27. */
  28. #include <__assert> // all public C++ headers provide the assertion handler
  29. #include <__config>
  30. #include <locale.h>
  31. #ifndef _LIBCPP_LOCALE_H
  32. # error <clocale> tried including <locale.h> but didn't find libc++'s <locale.h> header. \
  33. This usually means that your header search paths are not configured properly. \
  34. The header search paths should contain the C++ Standard Library headers before \
  35. any C Standard Library, and you are probably using compiler flags that make that \
  36. not be the case.
  37. #endif
  38. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  39. # pragma GCC system_header
  40. #endif
  41. _LIBCPP_BEGIN_NAMESPACE_STD
  42. using ::lconv _LIBCPP_USING_IF_EXISTS;
  43. using ::setlocale _LIBCPP_USING_IF_EXISTS;
  44. using ::localeconv _LIBCPP_USING_IF_EXISTS;
  45. _LIBCPP_END_NAMESPACE_STD
  46. #endif // _LIBCPP_CLOCALE