Skip to content

Commit

Permalink
fix check and use of __has_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Jun 22, 2024
1 parent 6618b5b commit 22a9ade
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion w2c2/w2c2_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1103,9 +1103,16 @@ typedef struct wasmModuleInstance {
} wasmModuleInstance;


#ifndef __has_feature
#define __has_feature(x) 0
#endif
#ifndef __has_extension
#define __has_extension __has_feature
#endif

#ifdef _MSC_VER
#define WASM_ATOMICS_MSVC
#elif defined(__GNUC__) && (GCC_VERSION >= 40700 || (defined(__clang__) && defined(__has_extension) && __has_extension(c_atomic)))
#elif defined(__GNUC__) && (GCC_VERSION >= 40700 || __has_extension(c_atomic))
#define WASM_ATOMICS_GCC
#endif

Expand Down

0 comments on commit 22a9ade

Please sign in to comment.