Re: [GD-General] Clean way of generalizing CDECL
Brought to you by:
vexxed72
From: brian s. <pud...@po...> - 2004-07-06 23:40:47
|
I never came up with anything better than CDECL_PRE and CDECL_POST but that solution sure won't win any beauty contests :). What did the MingW people do for this? All of the Windows API functions are stdcall, and surely they didn't modify every Windows header to change the declarations. They must be able parse them as-is. Maybe there's a solution to be found there? --brian > I'd like to be able specify CDECL in a cross-platform manner. On most > x86 compilers there's just the __cdecl keywod: > > void __cdecl foo( int x, int y, int z ); > > GCC, of course, does it completely differently: > > void foo( int x, int y, int z ) __attribute((cdecl)); > > So a simple #define won't work. Now, you can do a kind of convoluted > thing using a define, but damn, it's REAL ugly. > > Is there a cleaner way of doing this? > |