1 //===-- Implementation header for the locale --------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLVM_LIBC_SRC_LOCALE_LOCALECONV_H 10 #define LLVM_LIBC_SRC_LOCALE_LOCALECONV_H 11 12 #include "src/__support/macros/attributes.h" 13 #include "src/__support/macros/config.h" 14 15 #include "hdr/types/locale_t.h" 16 17 #include <stddef.h> 18 19 namespace LIBC_NAMESPACE_DECL { 20 21 // We only support the "C" locale right now. 22 static constexpr size_t MAX_LOCALE_NAME_SIZE = 2; 23 24 struct __locale_data { 25 char name[MAX_LOCALE_NAME_SIZE]; 26 }; 27 28 // The pointer to the default "C" locale. 29 extern __locale_t c_locale; 30 31 // The global locale instance. 32 extern locale_t locale; 33 34 } // namespace LIBC_NAMESPACE_DECL 35 36 #endif // LLVM_LIBC_SRC_LOCALE_LOCALECONV_H 37