Skip to content

Commit bd350a8

Browse files
added more robust check for __STDC_NO_ATOMICS__
1 parent 6353b7b commit bd350a8

File tree

11 files changed

+12
-12
lines changed

11 files changed

+12
-12
lines changed

examples/include/_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
extern "C" {
3131
#endif /* __cplusplus */
3232

33-
#ifndef __STDC_NO_ATOMICS__
33+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
3434
#include <stdatomic.h>
3535
#endif
3636

@@ -242,7 +242,7 @@ typedef enum {
242242
/** Maximum number of spherical harmonic components/signals supported */
243243
#define MAX_NUM_SH_SIGNALS ( MAX_NUM_CHANNELS )
244244

245-
#ifndef __STDC_NO_ATOMICS__
245+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
246246
typedef _Atomic CH_ORDER _Atomic_CH_ORDER;
247247
typedef _Atomic NORM_TYPES _Atomic_NORM_TYPES;
248248
typedef _Atomic SH_ORDERS _Atomic_SH_ORDERS;

examples/src/ambi_bin/ambi_bin_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern "C" {
7777
# error "AMBI_BIN_FRAME_SIZE must be an integer multiple of HOP_SIZE"
7878
#endif
7979

80-
#ifndef __STDC_NO_ATOMICS__
80+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
8181
typedef _Atomic AMBI_BIN_PREPROC _Atomic_AMBI_BIN_PREPROC;
8282
typedef _Atomic AMBI_BIN_DECODING_METHODS _Atomic_AMBI_BIN_DECODING_METHODS;
8383
#else

examples/src/ambi_dec/ambi_dec_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extern "C" {
7777
# error "AMBI_DEC_FRAME_SIZE must be an integer multiple of HOP_SIZE"
7878
#endif
7979

80-
#ifndef __STDC_NO_ATOMICS__
80+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
8181
typedef _Atomic AMBI_DEC_DECODING_METHODS _Atomic_AMBI_DEC_DECODING_METHODS;
8282
typedef _Atomic AMBI_DEC_DIFFUSE_FIELD_EQ_APPROACH _Atomic_AMBI_DEC_DIFFUSE_FIELD_EQ_APPROACH;
8383
#else

examples/src/array2sh/array2sh_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extern "C" {
8181
# error "ARRAY2SH_FRAME_SIZE must be an integer multiple of HOP_SIZE"
8282
#endif
8383

84-
#ifndef __STDC_NO_ATOMICS__
84+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
8585
typedef _Atomic ARRAY2SH_MICROPHONE_ARRAY_PRESETS _Atomic_ARRAY2SH_MICROPHONE_ARRAY_PRESETS;
8686
typedef _Atomic ARRAY2SH_FILTER_TYPES _Atomic_ARRAY2SH_FILTER_TYPES;
8787
typedef _Atomic ARRAY2SH_ARRAY_TYPES _Atomic_ARRAY2SH_ARRAY_TYPES;

examples/src/binauraliser/binauraliser_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern "C" {
6161
# error "BINAURALISER_FRAME_SIZE must be an integer multiple of HOP_SIZE"
6262
#endif
6363

64-
#ifndef __STDC_NO_ATOMICS__
64+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
6565
typedef _Atomic INTERP_MODES _Atomic_INTERP_MODES;
6666
#else
6767
typedef INTERP_MODES _Atomic_INTERP_MODES;

examples/src/dirass/dirass_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern "C" {
6161
#define MAX_NUM_DISPLAY_SH_SIGNALS ( (MAX_DISPLAY_SH_ORDER+1)*(MAX_DISPLAY_SH_ORDER+1) ) /**< Maximum number of SH signals for the display/upscaling SH output */
6262
#define NUM_DISP_SLOTS ( 2 ) /**< Number of display slots */
6363

64-
#ifndef __STDC_NO_ATOMICS__
64+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
6565
typedef _Atomic DIRASS_UPSCALE_ORDERS _Atomic_DIRASS_UPSCALE_ORDERS;
6666
typedef _Atomic DIRASS_GRID_OPTIONS _Atomic_DIRASS_GRID_OPTIONS;
6767
typedef _Atomic DIRASS_REASS_MODES _Atomic_DIRASS_REASS_MODES;

examples/src/pitch_shifter/pitch_shifter_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extern "C" {
4646
# endif
4747
#endif
4848

49-
#ifndef __STDC_NO_ATOMICS__
49+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
5050
typedef _Atomic PITCH_SHIFTER_FFTSIZE_OPTIONS _Atomic_PITCH_SHIFTER_FFTSIZE_OPTIONS;
5151
typedef _Atomic PITCH_SHIFTER_OSAMP_OPTIONS _Atomic_PITCH_SHIFTER_OSAMP_OPTIONS;
5252
#else

examples/src/powermap/powermap_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern "C" {
6262
# error "POWERMAP_FRAME_SIZE must be an integer multiple of HOP_SIZE"
6363
#endif
6464

65-
#ifndef __STDC_NO_ATOMICS__
65+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
6666
typedef _Atomic POWERMAP_MODES _Atomic_POWERMAP_MODES;
6767
#else
6868
typedef POWERMAP_MODES _Atomic_POWERMAP_MODES;

examples/src/rotator/rotator_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ typedef enum {
6565
M_ROT_RECOMPUTE_QUATERNION /**< Use Quaternions to recompute M_rot */
6666
} M_ROT_STATUS;
6767

68-
#ifndef __STDC_NO_ATOMICS__
68+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
6969
typedef _Atomic M_ROT_STATUS _Atomic_M_ROT_STATUS;
7070
#else
7171
typedef M_ROT_STATUS _Atomic_M_ROT_STATUS;

examples/src/spreader/spreader_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extern "C" {
6161
# error "SPREADER_FRAME_SIZE must be an integer multiple of HOP_SIZE"
6262
#endif
6363

64-
#ifndef __STDC_NO_ATOMICS__
64+
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
6565
typedef _Atomic SPREADER_PROC_MODES _Atomic_SPREADER_PROC_MODES;
6666
#else
6767
typedef SPREADER_PROC_MODES _Atomic_SPREADER_PROC_MODES;

0 commit comments

Comments
 (0)