Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
windows: (maybe) patched to compile on Visual Studio.
  • Loading branch information
icculus committed Aug 6, 2017
1 parent 36c51d4 commit 2176364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/physfs_internal.h
Expand Up @@ -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)
Expand Down

0 comments on commit 2176364

Please sign in to comment.