41 lines · c
1//===----------------------------------------------------------------------===//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 _LIBCPP___LOCALE_DIR_GET_C_LOCALE_H10#define _LIBCPP___LOCALE_DIR_GET_C_LOCALE_H11 12#include <__config>13#include <__locale_dir/locale_base_api.h>14 15#if _LIBCPP_HAS_LOCALIZATION16 17# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)18# pragma GCC system_header19# endif20 21_LIBCPP_BEGIN_NAMESPACE_STD22 23// FIXME: This should really be part of the locale base API24 25# if defined(__APPLE__) || defined(__FreeBSD__)26# define _LIBCPP_GET_C_LOCALE 027# elif defined(__NetBSD__)28# define _LIBCPP_GET_C_LOCALE LC_C_LOCALE29# else30# define _LIBCPP_GET_C_LOCALE __cloc()31// Get the C locale object32_LIBCPP_EXPORTED_FROM_ABI __locale::__locale_t __cloc();33# define __cloc_defined34# endif35 36_LIBCPP_END_NAMESPACE_STD37 38#endif // _LIBCPP_HAS_LOCALIZATION39 40#endif // _LIBCPP___LOCALE_DIR_GET_C_LOCALE_H41