diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-03-14 16:20:49 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-03-23 09:29:58 (GMT) |
commit | f034b0f66338f37d4f637916cc42b9c4a4f30a32 (patch) | |
tree | 1c4fead35ad677f82cc9fd7e837c773b00bbbf61 /Source/cmSystemTools.cxx | |
parent | 7099db5dd48d36e5d39ab17219278d834c8a88a7 (diff) | |
download | CMake-f034b0f66338f37d4f637916cc42b9c4a4f30a32.zip CMake-f034b0f66338f37d4f637916cc42b9c4a4f30a32.tar.gz CMake-f034b0f66338f37d4f637916cc42b9c4a4f30a32.tar.bz2 |
CMake compilation: do not use compiler extensions
For now, compiler extensions are no longer activated on CMake sources.
However these extensions are still used for various third parties.
This MR is a partial answer to the issue #20454.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index d8cd705..81f76ca 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1,5 +1,15 @@ /* 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) +// POSIX APIs are needed +# define _POSIX_C_SOURCE 200809L +#endif +#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) +// For isascii +# define _XOPEN_SOURCE 700 +#endif + #include "cmSystemTools.h" #include <cmext/algorithm> |