diff --git a/munit.c b/munit.c index 00ede07..f063d85 100644 --- a/munit.c +++ b/munit.c @@ -777,11 +777,13 @@ munit_clock_get_elapsed(struct PsnipClockTimespec* start, struct PsnipClockTimes * important that it be reproducible, so bug reports have a better * chance of being reproducible. */ -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__) && !defined(__EMSCRIPTEN__) && (!defined(__GNUC_MINOR__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) -# define HAVE_STDATOMIC -#elif defined(__clang__) -# if __has_extension(c_atomic) -# define HAVE_CLANG_ATOMICS +#if __STDC_VERSION__ >= 201112L +# if defined(__STDC_VERSION__) && !defined(__STDC_NO_ATOMICS__) && !defined(__EMSCRIPTEN__) && (!defined(__GNUC_MINOR__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ > 8)) +# define HAVE_STDATOMIC +# elif defined(__clang__) +# if __has_extension(c_atomic) +# define HAVE_CLANG_ATOMICS +# endif # endif #endif diff --git a/munit.h b/munit.h index 8460a45..2e557bf 100644 --- a/munit.h +++ b/munit.h @@ -131,7 +131,7 @@ extern "C" { # define MUNIT_UNUSED #endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__PGI) +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__PGI) && !defined(_MSC_VER) # define MUNIT_ARRAY_PARAM(name) name #else # define MUNIT_ARRAY_PARAM(name)