mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
OpenBSD: Fix system feature definitions
Since commit f034b0f663
(CMake compilation: do not use compiler
extensions, 2020-03-14, v3.18.0-rc1~494^2), some sources explicitly
enable needed system APIs on some platforms using definitions like
`_POSIX_C_SOURCE` and `_XOPEN_SOURCE`. Drop the definitions for
OpenBSD, which provides the POSIX APIs by default.
This commit is contained in:

committed by
Brad King

parent
9765ccfa71
commit
317a477283
@@ -1,12 +1,12 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
|
||||
#if !defined(_WIN32) && !defined(__sun)
|
||||
#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
|
||||
// POSIX APIs are needed
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
// For isascii
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 700
|
||||
|
@@ -7,7 +7,8 @@
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun)
|
||||
#if !defined(_POSIX_C_SOURCE) && !defined(_WIN32) && !defined(__sun) && \
|
||||
!defined(__OpenBSD__)
|
||||
/* POSIX APIs are needed */
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
@@ -17,7 +18,7 @@
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
/* For isascii */
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 700
|
||||
|
@@ -1,13 +1,12 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
|
||||
#if !defined(_WIN32) && !defined(__sun)
|
||||
#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
|
||||
// POSIX APIs are needed
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__QNX__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__QNX__)
|
||||
// For isascii
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 700
|
||||
|
@@ -1,13 +1,12 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
|
||||
#if !defined(_WIN32) && !defined(__sun)
|
||||
#if !defined(_WIN32) && !defined(__sun) && !defined(__OpenBSD__)
|
||||
// POSIX APIs are needed
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__QNX__)
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__QNX__)
|
||||
// For isascii
|
||||
// NOLINTNEXTLINE(bugprone-reserved-identifier)
|
||||
# define _XOPEN_SOURCE 700
|
||||
|
Reference in New Issue
Block a user