Skip to content

Commit 9a6f88f

Browse files
authored
Merge pull request #57 from stefano-p/fix/static-assertion-failures
Fix type size mismatches for MinGW builds
2 parents a7a37c3 + 8a1c389 commit 9a6f88f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tau/types.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ typedef tau_i32 tau_bool32; // Prefer this!
8989
#if defined(_WIN64)
9090
typedef signed __int64 tau_iptr;
9191
typedef unsigned __int64 tau_uptr;
92+
#elif defined(_WIN32) && (defined(__MINGW32__) || defined(__MINGW64__))
93+
// MinGW: Use standard types to match tau_ll/tau_ull
94+
typedef tau_i64 tau_iptr;
95+
typedef tau_u64 tau_uptr;
9296
#elif defined(_WIN32)
9397
// To mark types changing their size, e.g. tau_iptr
9498
#ifndef TAU__W64
@@ -102,8 +106,8 @@ typedef tau_i32 tau_bool32; // Prefer this!
102106
typedef TAU__W64 signed int tau_iptr;
103107
typedef TAU__W64 unsigned int tau_uptr;
104108
#else
105-
typedef uintptr_t tau_uptr;
106109
typedef intptr_t tau_iptr;
110+
typedef uintptr_t tau_uptr;
107111
#endif
108112

109113
// More Useful types/

0 commit comments

Comments
 (0)