Skip to content

Commit 65d5b86

Browse files
authored
Merge pull request numpy#27650 from mtelka/STDC_VERSION
BLD: Do not set __STDC_VERSION__ to zero during build
2 parents 63abb04 + ff8be0c commit 65d5b86

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)