X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=tokens.inc;h=22990df16c2d33f1d2c77d823276a553ed4b9e2e;hb=2e7e36a9f01d1dc07e450ab3ecf082a133b3099e;hp=bca37bb40fd6a3738323499cb6d248369400c7ca;hpb=02f47f268839c472e23095ac0025e5ccbb5ed70a;p=cparser diff --git a/tokens.inc b/tokens.inc index bca37bb..22990df 100644 --- a/tokens.inc +++ b/tokens.inc @@ -125,6 +125,34 @@ S(_MS, __FUNCDNAME__) #undef __ptr64 #endif +/* needed on MinGW */ +#ifdef __MINGW32__ +#ifdef __int8 +#undef __int8 +#endif +#ifdef __int16 +#undef __int16 +#endif +#ifdef __int32 +#undef __int32 +#endif +#ifdef __int64 +#undef __int64 +#endif +#endif + +#if defined(__MINGW32__) || defined(__CYGWIN__) +#ifdef __cdecl +#undef __cdecl +#endif +#ifdef __stdcall +#undef __stdcall +#endif +#ifdef __fastcall +#undef __fastcall +#endif +#endif + /* needed on darwin... */ #ifdef __signed #undef __signed @@ -228,3 +256,10 @@ S(_MS, __int64, = T__int64) S(_MS, _int128, ) S(_MS, __int128, = T__int128) #undef S + +/* Redefine required macros for MinGW headers */ +#if defined(__MINGW32__) || defined(__CYGWIN__) +#define __stdcall __attribute__((__stdcall__)) +#define __fastcall __attribute__((__fastcall__)) +#define __cdecl __attribute__((__cdecl__)) +#endif