13
0

Also define casting macro when using mingw compiler

This commit is contained in:
Tim Mayberry 2013-07-17 16:47:29 +10:00
parent 0444c40053
commit e1d2f70704

View File

@ -35,7 +35,7 @@
/* POSIX guarantees casting between void* and function pointers, ISO C doesn't /* POSIX guarantees casting between void* and function pointers, ISO C doesn't
* We can work around warnings by going one step deeper in our casts * We can work around warnings by going one step deeper in our casts
*/ */
#ifdef _POSIX_VERSION #if defined(_POSIX_VERSION) || defined(__MINGW32__)
#define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object)) #define POSIX_FUNC_PTR_CAST(type, object) *((type*) &(object))
#endif // _POSIX_VERSION #endif // _POSIX_VERSION