move bug #5333 fix to headers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
diff --git a/include/SDL_config_windows.h b/include/SDL_config_windows.h
index c9ed1cf..efb246d 100644
--- a/include/SDL_config_windows.h
+++ b/include/SDL_config_windows.h
@@ -90,6 +90,10 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
+#ifdef __clang__
+# define HAVE_GCC_ATOMICS 1
+#endif
+
#define HAVE_DDRAW_H 1
#define HAVE_DINPUT_H 1
#define HAVE_DSOUND_H 1
diff --git a/include/SDL_config_winrt.h b/include/SDL_config_winrt.h
index 690ffe1..c548fd6 100644
--- a/include/SDL_config_winrt.h
+++ b/include/SDL_config_winrt.h
@@ -92,6 +92,10 @@ typedef unsigned int uintptr_t;
# define SIZEOF_VOIDP 4
#endif
+#ifdef __clang__
+# define HAVE_GCC_ATOMICS 1
+#endif
+
/* Useful headers */
#define HAVE_DXGI_H 1
#if WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP
diff --git a/src/atomic/SDL_spinlock.c b/src/atomic/SDL_spinlock.c
index 4f10741..bdd347e 100644
--- a/src/atomic/SDL_spinlock.c
+++ b/src/atomic/SDL_spinlock.c
@@ -28,12 +28,6 @@
#include "SDL_mutex.h"
#include "SDL_timer.h"
-#if defined(__WIN32__) && defined(__clang__)
-# ifndef HAVE_GCC_ATOMICS
-# define HAVE_GCC_ATOMICS 1
-# endif
-#endif
-
#if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
#include <atomic.h>
#endif