This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
_WIN32_WINNT redux
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-patches at cygwin dot com
- Cc: mingw-users at lists dot sourceforge dot net
- Date: Sat, 7 Sep 2002 00:27:15 -0400
- Subject: _WIN32_WINNT redux
- Reply-to: cygwin-patches at cygwin dot com,mingw-users at lists dot sourceforge dot net
Before I actually said "I was wrong not to protect the definition of
GetConsoleHandle with a _WIN32_WINNT ifdef" I wanted to actually check
for myself how the Platform SDK does it.
Since it has been several years since I downloaded the Platform SDK,
I had to download it today, which due to its size, and other actual
revenue-producing activities on my part, took most of the day.
On finally checking I did find that this declaration should have been
protected by this guard and I was, indeed, wrong to check it in without
it.
I did find one disturbing thing however. The declaration for
GetConsoleProcessList is surrounded by a
#ifdef (_WIN32_WINNT >= 0x0501)
.
.
.
#endif
but guess what _WIN32_WINNT is set to?
AFAICT, it's set to 0x0500.
So, even in the Microsoft case, they are not setting the define to the
latest version. This invalidates my adopted position that w32api should
"emulate Microsoft" by setting this value to the highest possible legal
value. It appears that even Microsoft doesn't do that.
WINVER, OTOH, is set to 0x0501 in one header and is set to 0x0500 in
most others.
To me, that sounds like a confusing mess, but maybe there is some rhyme
and reason to it that is not immediately obvious.
Regardless, I retract my position. I think w32api should just try to be
reasonable and consistent and not worry about how Microsoft does things.
cgf