What's up with the windows headers?

Jonathan M Davis jmdavisProg at gmx.com
Thu Dec 27 05:52:50 PST 2012


On Thursday, December 27, 2012 13:20:14 Stewart Gordon wrote:
> On 27/12/2012 11:40, Jonathan M Davis wrote:
> <snip>
> 
> > Transition is one issue, but as I understand it, there are issues
> > with regards to versioning, since druntime tends assume that
> > there's only one OS version instead of asking you which version
> > you're building for,
> 
> Are you talking about issues like this?
> http://d.puremagic.com/issues/show_bug.cgi?id=6024

No. There was ifdef stuff of some kind, but I don't recall the details. You'd 
probably know more about that sort of stuff than I would. I'm just recalling 
stuff from previous discussions and not necessarily all that accurately.

We're not supporting anything older than XP, but we're still supporting XP, so 
whatever is done with the bindings needs to be in line with that.

> This is an issue that needs to be resolved by using code that works in
> all 32-bit Windows versions or, if this can't be done, detecting the OS
> version at runtime.  Not by getting the programmer to specify the target
> version of Windows, since such specification doesn't belong in a program
> that is written to be platform-agnostic.
> 
> As such, no version identifiers in druntime for Windows versions
> (besides Win32/Win64) is exactly how it should be at the moment.  Once
> we add Windows API bindings, only _then_ should we worry about adding
> these version identifiers.  And, unless there's something else I've
> missed, we can take care of it by simply migrating WindowsAPI across as
> it is.
> 
> If the fix to bug 6024 (and any similar issues) involves calling an
> XP-specific function that is currently declared in c.s.w.w without
> versioning, the module in druntime could have its own private
> redeclaration of this function.
> 
> <snip>
> 
> > I think that there were also issues with
> > different approaches for handling types between what the Windows API
> > project is doing now and what druntime is doing now.
> 
> When you say "handling types", what kinds of stuff you mean?

IIRC, stuff relating to HANDLE, void*, and possibly some other stuff was being 
debated as to the best way to handle it. I don't recall the details.

> > We need a D developer who's familiar with Windows and the Windows
> > API project to step up and take it on.
> 
> I believe we already have that somebody - me.  What we're lacking is:
> - somebody who is in this position and actually has plenty of time to
> look into it
> - a clear decision on what is the minimum Windows version D2 is to
> support (given that the abandonment of D1 is imminent)

XP. I think that it's fairly clear at this point that at minimum, we're going 
to support whatever versions of Windows Microsoft still supports. What's not 
clear is how long after Microsoft ceases to support a version we'll cease 
supporting that version. But since XP is around until at least sometime 2014, 
we don't have to make that decision right now.

> - a clear decision on when to do the migration - get it over with as
> soon as we can and then pull updates as and when, wait until the
> bindings are finished, or somewhere between the two extremes?

Ideally, the bindings would end up in druntime as soon as possible, but 
obviously, that's highly dependent on the schedule of anyone who's working on 
that. I have no idea what that will ultimately meaning for the Windows API 
bindings project. I would think that it would become irrelevant and that 
anything that would have needed to be done there would just be done in 
druntime, but others may feel differently, and I'm not a Windows developer, so 
I don't know any of the nitty-gritty details here.

> > The last, major discussion on it was instigated by someone
> > interested in doing it, but they weren't all that familiar with the
> > Windows side of things, and it seems that some issues weren't
> > properly sorted out, so it never went anywhere.
> 
> Which discussion are you referring to as "the last, major discussion on it"?

I believe that it was the "WinAPI for druntime and OpenGL for deimos" thread 
that Gor Gyolchanyan started, though it looks like it got chopped up funny in 
the archives:

http://forum.dlang.org/post/mailman.2156.1353669352.5162.digitalmars-
d at puremagic.com

http://forum.dlang.org/post/mailman.2157.1353670441.5162.digitalmars-
d at puremagic.com

- Jonathan M Davis


More information about the Digitalmars-d mailing list