37 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIBC_SRC_LOCALE_LOCALECONV_H10#define LLVM_LIBC_SRC_LOCALE_LOCALECONV_H11 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 19namespace LIBC_NAMESPACE_DECL {20 21// We only support the "C" locale right now.22static constexpr size_t MAX_LOCALE_NAME_SIZE = 2;23 24struct __locale_data {25 char name[MAX_LOCALE_NAME_SIZE];26};27 28// The pointer to the default "C" locale.29extern __locale_t c_locale;30 31// The global locale instance.32extern locale_t locale;33 34} // namespace LIBC_NAMESPACE_DECL35 36#endif // LLVM_LIBC_SRC_LOCALE_LOCALECONV_H37