From: Greg C. <gch...@sb...> - 2011-11-15 23:08:18
|
On 2011-11-15 18:18Z, Earnie wrote: > I can't find this documented at MSDN, maybe used to have been. I only > find this reference page > http://msdn.microsoft.com/en-us/library/6sehtctf.aspx. Given that > should we wipe the use of _WIN32_WINDOWS? I'd be reluctant to wipe legacy stuff. Someone might depend on it. And it might even have been (and still be) correct, for reasons now generally forgotten. > How should we change the following? > > #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410) > > Maybe something like > > #if (_WIN32_WINNT >= 0x0410) > > 0x0410 is Windows 98. > 0x0500 is Windows ME and Windows 2000. > > Or should we just leave well enough alone? Perhaps it's not internally inconsistent. Raymond's blog: http://blogs.msdn.com/b/oldnewthing/archive/2007/04/11/2079137.aspx says version macros were originally complementary, and could indicate different versions of different families of the operating system. Following the advice here: http://ehsanakhgari.org/article/visual-c/windows-target-version-macros we could parse the guard above as: _WIN32_WINNT >= 0x0500 # If "NT" family: require 2000, not NT4 _WIN32_WINDOWS >= 0x0410 # If "95" family: require 98, not 95 I don't imagine anyone's writing new code like that anymore, but old code might rely on it. |