From: Roumen P. <bug...@ro...> - 2008-04-04 19:51:25
|
Earnie Boyd wrote: > Quoting Brian Dessent <br...@de...>: > >> You see the idiom "#if defined(_WIN32) && !defined(__CYGWIN__)" all over >> the place in response to this, but I think it's ugly to have to use this >> when inttypes.h exists and works. >> > > You bring up an interesting point. Should _WIN32 be defined in > windef.h? The compiler defines this already via its specs. Should we > remove the extraneous define in windef.h? IIRC this definition is in > the file for Cygwin users because the compiler specs doesn't define > _WIN32 unless you give -mno-cygwin or whatever the switch is (its been > a while since I used the Cygwin compiler). Good question. Let go one step further: What to expect from compiler for 64-bit platform? I guess that compiler define _WIN64 so in this case windef.h may not define _WIN32. > I think this definition should be removed from the windef.h file and if > a Cygwin program needs to include windows.h then it can define _WIN32 > if it wants it. The w32api headers themselves do not need the > definition that I'm aware of. This would cause the coding to be easier > for the more common use of _WIN32 as it relates to __CYGWIN__. > > Earnie Roumen |