What's up with the windows headers?
Stewart Gordon
smjg_1998 at yahoo.com
Sun Dec 30 17:41:38 PST 2012
On 30/12/2012 22:27, Jonathan M Davis wrote:
> On Sunday, December 30, 2012 18:33:01 Stewart Gordon wrote:
>> On 30/12/2012 00:49, Jonathan M Davis wrote:
<snip>
>>> We specifically decided not to support Win2K. It requires extra
>>> effort that we don't want to go to, and almost no one uses it
>>> anymore.
>>
>> What extra effort is that? The versioning to support Win2000 (and even
>> NT4) is already in both the C headers and the D modules that have so far
>> been done. It's just another value of the constant _WIN32_WINNT. My
>> common sense tells me that it is _removing_ it that requires extra effort.
>
> There's stuff in druntime that doesn't work on Win2K right now.
Your comment was posted as a reply to my statement that was about the
Windows API bindings, not anything that is already in druntime. As
such, what you ended up saying was that we would need to go to some
extra effort to have Win2K-compatible Windows API bindings. So that
isn't what you meant to say. I see now.
> For instance,
> per this bug report, the stack trace stuff doesn't work on Win2K:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6024
It was me that mentioned this to you actually. Besides, it claims
something far more serious, that compiled programs don't work at all on
Win2K. Is it wrong or OOD in this respect?
But as you seem to be saying later on, whether we're going to fix it to
work again on Win2K and whether Walter's going to make us remove the 9x
vs. NT4 vs. 2K vs. XP versioning from the Windows API bindings before
allowing them to be dropped in are two different matters.
Though I am inclined to remove the versioning for 9x, considering that
- doing so would simplify the versioning quite a bit
- character sets under Win9x are a PITA, especially in a language where
you're meant to use only Unicode
- some of it seems wrong anyway, in such matters as which W functions
are supported
<snip>
> I'd expect that druntime contain the function declarations for the entire
> Windows system API which is supported with XP with no care whatsoever to what
> was or wasn't supported before XP (because we're not supporting anything prior
> to XP). If those functions happened to be on Win2k, then fine, but it doesn't
> matter one way or the other, because we don't suppport it. Newer functions
> that are not in XP would then presumably be added in a way which they're only
> there if you've defined the right version to enable them (e.g. a version
> identifier indicating Vista would enable all of the functions added in Vista).
So you think the view Walter will take is that, if somebody wants to
build a WinXP app (which may have been written by a DMD user) with a D
compiler that happens to support Win2K, it's that somebody's
responsibility to make sure -version=WindowsXP (or the equivalent switch
for that compiler) has been set.
<snip>
> I suppose that you can add Win2K bindings to druntime if you really want to go
> to that extra effort, but only if it's not going to complicate things. And
> we're not supporting anything related to Win2K, so any bindings which are 2k-
> specific are just icing on the cake.
Are there APIs that have been removed in XP? I wasn't thinking about
those ... and don't even know how the MS or MinGW C headers would deal
with such a scenario.
Stewart.
More information about the Digitalmars-d
mailing list