From 2176364a16d6cedcee3656ee423676a3f3a8351b Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 6 Aug 2017 12:19:33 -0400 Subject: [PATCH] windows: (maybe) patched to compile on Visual Studio. --- src/physfs_internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physfs_internal.h b/src/physfs_internal.h index 1deb9669..7895d05e 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -108,8 +108,8 @@ const void *__PHYSFS_winrtCalcPrefDir(void); #if defined(_MSC_VER) && (_MSC_VER >= 1500) #include 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)