libcxx: Fix locale-related compilation errors on NetBSD.

llvm/llvm-project#143055
This commit is contained in:
Alex Rønne Petersen 2025-06-06 03:14:03 +02:00
parent 98cf81d51c
commit b6d9046242
5 changed files with 26 additions and 2 deletions

View File

@ -115,6 +115,8 @@
# include <__locale_dir/support/apple.h> # include <__locale_dir/support/apple.h>
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
# include <__locale_dir/support/freebsd.h> # include <__locale_dir/support/freebsd.h>
#elif defined(__NetBSD__)
# include <__locale_dir/support/netbsd.h>
#elif defined(_LIBCPP_MSVCRT_LIKE) #elif defined(_LIBCPP_MSVCRT_LIKE)
# include <__locale_dir/support/windows.h> # include <__locale_dir/support/windows.h>
#elif defined(__Fuchsia__) #elif defined(__Fuchsia__)

View File

@ -15,6 +15,8 @@
# pragma GCC system_header # pragma GCC system_header
#endif #endif
#include <xlocale.h>
#include <__locale_dir/support/bsd_like.h> #include <__locale_dir/support/bsd_like.h>
#endif // _LIBCPP___LOCALE_DIR_SUPPORT_APPLE_H #endif // _LIBCPP___LOCALE_DIR_SUPPORT_APPLE_H

View File

@ -24,8 +24,6 @@
# include <wctype.h> # include <wctype.h>
#endif #endif
#include <xlocale.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header # pragma GCC system_header
#endif #endif

View File

@ -15,6 +15,8 @@
# pragma GCC system_header # pragma GCC system_header
#endif #endif
#include <xlocale.h>
#include <__locale_dir/support/bsd_like.h> #include <__locale_dir/support/bsd_like.h>
#endif // _LIBCPP___LOCALE_DIR_SUPPORT_FREEBSD_H #endif // _LIBCPP___LOCALE_DIR_SUPPORT_FREEBSD_H

View File

@ -0,0 +1,20 @@
//===-----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___LOCALE_DIR_SUPPORT_NETBSD_H
#define _LIBCPP___LOCALE_DIR_SUPPORT_NETBSD_H
#include <__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#include <__locale_dir/support/bsd_like.h>
#endif // _LIBCPP___LOCALE_DIR_SUPPORT_NETBSD_H