Skip to content
Permalink
Browse files
windows: (maybe) patched to compile on Visual Studio.
  • Loading branch information
icculus committed Aug 6, 2017
1 parent 36c51d4 commit 2176364a16d6cedcee3656ee423676a3f3a8351b
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/physfs_internal.h
@@ -108,8 +108,8 @@ const void *__PHYSFS_winrtCalcPrefDir(void);
#if defined(_MSC_VER) && (_MSC_VER >= 1500)
#include <intrin.h>
PHYSFS_COMPILE_TIME_ASSERT(LongEqualsInt, sizeof (int) == sizeof (long));
#define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedIncrement((long*)ptrval)
#define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedDecrement((long*)ptrval)
#define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedIncrement((long*)(ptrval))
#define __PHYSFS_ATOMIC_INCR(ptrval) _InterlockedDecrement((long*)(ptrval))
#elif defined(__clang__) || (defined(__GNUC__) && (((__GNUC__ * 10000) + (__GNUC_MINOR__ * 100)) >= 40100))
#define __PHYSFS_ATOMIC_INCR(ptrval) __sync_fetch_and_add(ptrval, 1)
#define __PHYSFS_ATOMIC_DECR(ptrval) __sync_fetch_and_add(ptrval, -1)

0 comments on commit 2176364

Please sign in to comment.