windows: (maybe) patched to compile on Visual Studio.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 06 Aug 2017 12:19:33 -0400
changeset 1541 600636c452ac
parent 1540 7ee52240b696
child 1542 1027fe6accf1
windows: (maybe) patched to compile on Visual Studio.
src/physfs_internal.h
--- a/src/physfs_internal.h	Sun Aug 06 10:33:21 2017 -0400
+++ b/src/physfs_internal.h	Sun Aug 06 12:19:33 2017 -0400
@@ -108,8 +108,8 @@
 #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)