|
@@ -70,9 +70,11 @@
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(BH_PLATFORM_LINUX_SGX)
|
|
#if !defined(BH_PLATFORM_LINUX_SGX)
|
|
|
|
|
+
|
|
|
/* Clang's __GNUC_PREREQ macro has a different meaning than GCC one,
|
|
/* Clang's __GNUC_PREREQ macro has a different meaning than GCC one,
|
|
|
so we have to handle this case specially */
|
|
so we have to handle this case specially */
|
|
|
#if defined(__clang__)
|
|
#if defined(__clang__)
|
|
|
|
|
+
|
|
|
/* Clang provides stdatomic.h since 3.6.0
|
|
/* Clang provides stdatomic.h since 3.6.0
|
|
|
See https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html */
|
|
See https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html */
|
|
|
#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
|
|
#if __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 6)
|
|
@@ -80,7 +82,9 @@ See https://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html */
|
|
|
#else
|
|
#else
|
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+
|
|
|
#elif defined(__GNUC_PREREQ)
|
|
#elif defined(__GNUC_PREREQ)
|
|
|
|
|
+
|
|
|
/* Even though older versions of GCC support C11, atomics were
|
|
/* Even though older versions of GCC support C11, atomics were
|
|
|
not implemented until 4.9. See
|
|
not implemented until 4.9. See
|
|
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58016 */
|
|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58016 */
|
|
@@ -89,11 +93,21 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58016 */
|
|
|
#else /* else of __GNUC_PREREQ(4, 9) */
|
|
#else /* else of __GNUC_PREREQ(4, 9) */
|
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
|
#endif /* end of __GNUC_PREREQ(4, 9) */
|
|
#endif /* end of __GNUC_PREREQ(4, 9) */
|
|
|
-#else /* else of defined(__GNUC_PREREQ) */
|
|
|
|
|
|
|
+
|
|
|
|
|
+#elif defined(_MSC_VER)
|
|
|
|
|
+
|
|
|
|
|
+#define CONFIG_HAS_STD_ATOMIC 0
|
|
|
|
|
+
|
|
|
|
|
+#else
|
|
|
|
|
+
|
|
|
#define CONFIG_HAS_STD_ATOMIC 1
|
|
#define CONFIG_HAS_STD_ATOMIC 1
|
|
|
-#endif /* end of defined(__GNUC_PREREQ) */
|
|
|
|
|
-#else /* else of !defined(BH_PLATFORM_LINUX_SGX) */
|
|
|
|
|
|
|
+
|
|
|
|
|
+#endif /* end of defined(__clang__) */
|
|
|
|
|
+
|
|
|
|
|
+#else /* else of !defined(BH_PLATFORM_LINUX_SGX) */
|
|
|
|
|
+
|
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
#define CONFIG_HAS_STD_ATOMIC 0
|
|
|
|
|
+
|
|
|
#endif /* end of !defined(BH_PLATFORM_LINUX_SGX) */
|
|
#endif /* end of !defined(BH_PLATFORM_LINUX_SGX) */
|
|
|
|
|
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif /* end of SSP_CONFIG_H */
|