Note: the files in tcc/win32/include/winapi are now from the mingw-w64 project, however with this fix using mingw32 winapi should still work.
Unified · Split
| @@ -18,6 +18,13 @@ · 17 unmodified lines | ||
| 18 | 18 | #ifndef __MINGW_H |
| 19 | 19 | #define __MINGW_H |
| 20 | 20 | |
| 21 | +/* some winapi files define these before including _mingw.h --> */ | |
| 22 | +#undef NULL | |
| 23 | +#undef __cdecl | |
| 24 | +#undef _X86_ | |
| 25 | +#undef WIN32 | |
| 26 | +/* <-- */ | |
| 27 | + | |
| 21 | 28 | #include <stddef.h> |
| 22 | 29 | #include <stdarg.h> |
| 23 | 30 | |
| @@ -111,6 +118,10 @@ typedef struct threadmbcinfostruct *pthreadmbcinfo; · 87 unmodified lines | ||
| 111 | 118 | typedef struct localeinfo_struct _locale_tstruct,*_locale_t; |
| 112 | 119 | |
| 113 | 120 | /* for winapi */ |
| 121 | +#define _ANONYMOUS_UNION | |
| 122 | +#define _ANONYMOUS_STRUCT | |
| 123 | +#define DECLSPEC_NORETURN | |
| 124 | +#define DECLARE_STDCALL_P(type) __stdcall type | |
| 114 | 125 | #define WIN32_LEAN_AND_MEAN |
| 115 | 126 | #define NOSERVICE 1 |
| 116 | 127 | #define NOMCX 1 |