Browse Source

move bug #5333 fix to headers

Ozkan Sezer 3 years ago
parent
commit
67f12ede3b
3 changed files with 8 additions and 6 deletions
  1. 4 0
      include/SDL_config_windows.h
  2. 4 0
      include/SDL_config_winrt.h
  3. 0 6
      src/atomic/SDL_spinlock.c

+ 4 - 0
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

+ 4 - 0
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

+ 0 - 6
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