Skip to content

Commit dcf33ff

Browse files
ienaplisszpostfacto
authored andcommitted
Fixing compilation under Mingw32
Reorder preprocessor directives fixing compilation under mingw-32.
1 parent 54139bb commit dcf33ff

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/public/minbase/minbase_macros.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@
9696
// Used to step into the debugger
9797
#ifdef _WIN64
9898
#define DebuggerBreak() do { __debugbreak(); } while(0)
99-
#elif defined(_WIN32)
100-
#define DebuggerBreak() do { __asm { int 3 }; } while(0)
10199
#elif defined( COMPILER_GCC )
102100
#if defined( _PS3 )
103101
#if defined( _CERT )
@@ -110,6 +108,8 @@
110108
#else
111109
#define DebuggerBreak() do { } while(0)
112110
#endif
111+
#elif defined(_WIN32)
112+
#define DebuggerBreak() do { __asm { int 3 }; } while(0)
113113
#elif defined( COMPILER_SNC ) && defined( COMPILER_PS3 )
114114
static volatile bool sPS3_SuppressAssertsInThisFile = false; // you can throw this in the debugger to temporarily disable asserts inside any particular .cpp module.
115115
#define DebuggerBreak() if (!sPS3_SuppressAssertsInThisFile) __builtin_snpause(); // <sergiy> from SNC Migration Guide, tw 31,1,1
@@ -126,13 +126,6 @@ extern "C"
126126
#pragma intrinsic(__rdtsc)
127127
#define PLAT_CPU_TIME() __rdtsc()
128128

129-
#elif defined(_WIN32)
130-
131-
FORCEINLINE unsigned __int64 PLAT_CPU_TIME()
132-
{
133-
__asm rdtsc
134-
}
135-
136129
#elif defined(COMPILER_GCC) && ( defined(__i386__) || defined(__x86_64__) )
137130

138131
inline __attribute__ ((always_inline)) unsigned long long PLAT_CPU_TIME()
@@ -148,6 +141,14 @@ inline __attribute__ ((always_inline)) unsigned long long PLAT_CPU_TIME()
148141
#endif
149142
}
150143

144+
#elif defined(_WIN32)
145+
146+
FORCEINLINE unsigned __int64 PLAT_CPU_TIME()
147+
{
148+
__asm rdtsc
149+
}
150+
151+
151152
#elif defined(POSIX)
152153

153154
#include <sys/time.h>

0 commit comments

Comments
 (0)