Skip to content

Commit ff8be0c

Browse files
committed
BLD: Do not set __STDC_VERSION__ to zero during build
The __STDC_VERSION__ set to zero prevents successful build on at least one platform - OpenIndiana. In addiiton, zero is not a valid value for __STDC_VERSION__ and it is unclear why the setting was added. Closes numpy#25366.
1 parent 63abb04 commit ff8be0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

numpy/_core/meson.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ c_args_common = [
681681

682682
# Same as NPY_CXX_FLAGS (TODO: extend for what ccompiler_opt adds)
683683
cpp_args_common = c_args_common + [
684-
'-D__STDC_VERSION__=0', # for compatibility with C headers
685684
]
686685
if cc.get_argument_syntax() != 'msvc'
687686
cpp_args_common += [

numpy/_core/src/common/npy_atomic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
#include "numpy/npy_common.h"
1111

12-
#if __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)
12+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L \
13+
&& !defined(__STDC_NO_ATOMICS__)
1314
// TODO: support C++ atomics as well if this header is ever needed in C++
1415
#include <stdatomic.h>
1516
#include <stdint.h>

0 commit comments

Comments
 (0)