From: Ozkan S. <se...@gm...> - 2012-07-13 07:24:13
|
On Fri, Jul 13, 2012 at 10:09 AM, Kai Tietz <kti...@go...> wrote: > The cause for that I was suggesting __32LONG is that name is more > unlikely to be mixed-up with a real type. > Yuck, nonetheless.. Maybe WINLONG32, making it similar to the WINBOOL thing? > Regards, > Kai > O.S. > 2012/7/12 Ozkan Sezer <se...@gm...>: >> On 7/12/12, Corinna Vinschen <vin...@re...> wrote: >>> Hi, >>> >>> unused so far, but that's the obvious starting point for the entire >>> operation as discussed on IRC. >>> >>> >>> Corinna >>> >>> >>> * _mingw.h.in (__32LONG): Define. Explain what it's good for. >>> >> >> Any specific reason not to name it __LONG32 or something? >> >> Maybe Jacek has something to say, too: the directx headers from Wine >> somewhat recently started using __MSABI_LONG for a similar purpose >> (i.e. not as a type, but for type suffix, e.g. 1L vs. __MSABI_LONG(1)) >> >>> >>> Index: _mingw.h.in >>> =================================================================== >>> --- _mingw.h.in (revision 5223) >>> +++ _mingw.h.in (working copy) >>> @@ -17,6 +17,17 @@ >>> #include "_cygwin.h" >>> #endif >>> >>> +/* Target specific macro replacement for type "long". In the Windows API, >>> + the type long is always 32 bit, even if the target is 64 bit (LLP64). >>> + On 64 bit Cygwin, the type long is 64 bit (LP64). So, to get the right >>> + sized definitions and declarations, all usage of type long in the >>> Windows >>> + headers have to be replaced by the below defined macro __32LONG. */ >>> +#ifndef __LP64__ /* 32 bit target, 64 bit Mingw target */ >>> +#define __32LONG long >>> +#else /* 64 bit Cygwin target */ >>> +#define __32LONG int >>> +#endif >>> + >>> /* C/C++ specific language defines. */ >>> #ifdef _WIN64 >>> #ifdef __stdcall >> > |