Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Stewart Gordon
I've made some changes following recentish discussion. The changes are: - Do away with Windows 9x versioning, given that Windows 9x is no longer supported either by Microsoft or by DMD (implemented). - a DECLARE_HANDLE template to declare handle types (I think it's fully implemented, please

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-19 Thread Stewart Gordon
On 02/08/2013 06:51, Sönke Ludwig wrote: I would seriously take into consideration to just drop the "A" versions. D is unicode by nature, the "W" versions are supported by all NT systems (since Windows 95 using MSLU), and using an ANSI version of a function also just begs for bugs if typed as

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-19 Thread Stewart Gordon
On 01/08/2013 21:59, Stewart Gordon wrote: - Just use the D const pointer syntax where we need it, rather than this CPtr template that was made for D1 compatibility. Now implemented. - Declare all constants as enums, in order to force inlining. Now in the translation instructions, but mos

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Stewart Gordon
Moreover, while getting rid of Windows 9x has simplified the versioning, I was just thinking about how far back along the NT line we should go. At the moment, we go back to NT4. But it's now harder to verify whether it supports a given API since the MSDN docs now seem to start at Win2k (even f

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Walter Bright
On 8/1/2013 3:28 PM, Stewart Gordon wrote: What do people think we should do? Opinions please! Even supporting XP is problematic because of the badly broken thread local storage support for DLLs in it, which D heavily relies on. I wouldn't say this for a C++ compiler, but for D, I kinda feel

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Adam Wilson
On Thu, 01 Aug 2013 16:00:09 -0700, Walter Bright wrote: On 8/1/2013 3:28 PM, Stewart Gordon wrote: What do people think we should do? Opinions please! Even supporting XP is problematic because of the badly broken thread local storage support for DLLs in it, which D heavily relies on. I

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Mike Parker
On Thursday, 1 August 2013 at 23:00:09 UTC, Walter Bright wrote: On 8/1/2013 3:28 PM, Stewart Gordon wrote: What do people think we should do? Opinions please! Even supporting XP is problematic because of the badly broken thread local storage support for DLLs in it, which D heavily relies o

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Mike Parker
On Thursday, 1 August 2013 at 20:59:31 UTC, Stewart Gordon wrote: Along these lines, I'm thinking of making a few more changes: - Just use the D const pointer syntax where we need it, rather than this CPtr template that was made for D1 compatibility. - Declare all constants as enums, in orde

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Jonathan M Davis
On Thursday, August 01, 2013 16:00:09 Walter Bright wrote: > On 8/1/2013 3:28 PM, Stewart Gordon wrote: > > What do people think we should do? Opinions please! > > Even supporting XP is problematic because of the badly broken thread local > storage support for DLLs in it, which D heavily relies o

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Walter Bright
On 8/1/2013 10:17 PM, Jonathan M Davis wrote: Regardless, the biggest gain by far will be being able to ditch support for XP and require at least Vista. As bad as Vista was, it had some major improvements to the Win32 API (like adding a proper condition variable). As a practical matter, we do n

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Sönke Ludwig
Am 01.08.2013 22:59, schrieb Stewart Gordon: - Define a mixin template along the lines of __AW in newer versions of MinGW, so that version (Unicode) { alias QwertW Qwert; } else { alias QwertA Qwert; } can become simply mixin DECLARE_AW!("Qwert"); I wou

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Brad Roberts
On 8/1/13 10:41 PM, Walter Bright wrote: On 8/1/2013 10:17 PM, Jonathan M Davis wrote: Regardless, the biggest gain by far will be being able to ditch support for XP and require at least Vista. As bad as Vista was, it had some major improvements to the Win32 API (like adding a proper condition v

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Manu
On 2 August 2013 15:51, Sönke Ludwig wrote: > Am 01.08.2013 22:59, schrieb Stewart Gordon: > > - Define a mixin template along the lines of __AW in newer versions of >> MinGW, so that >> >> version (Unicode) { >> alias QwertW Qwert; >> } else { >> alias QwertA Qwert;

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-01 Thread Tavi Cacina
On Friday, 2 August 2013 at 05:51:50 UTC, Sönke Ludwig wrote: I would seriously take into consideration to just drop the "A" versions. +1 or at least, the W version should be aliased by default.

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/1/2013 11:10 PM, Brad Roberts wrote: On 8/1/13 10:41 PM, Walter Bright wrote: On 8/1/2013 10:17 PM, Jonathan M Davis wrote: Regardless, the biggest gain by far will be being able to ditch support for XP and require at least Vista. As bad as Vista was, it had some major improvements to the

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Jonathan M Davis
On Thursday, August 01, 2013 22:41:14 Walter Bright wrote: > On 8/1/2013 10:17 PM, Jonathan M Davis wrote: > > Regardless, the biggest gain by far will be being able to ditch support > > for XP and require at least Vista. As bad as Vista was, it had some major > > improvements to the Win32 API (lik

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/2/2013 12:50 AM, Jonathan M Davis wrote: Well, if you want to do that, I'm not against it. I'd actually like to make some changes to std.datetime which require Vista or later, so being able to not bother with XP would be nice (though I've managed to work around the problems caused by not hav

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Jonathan M Davis
On Friday, August 02, 2013 01:27:11 Walter Bright wrote: > On 8/2/2013 12:50 AM, Jonathan M Davis wrote: > > Well, if you want to do that, I'm not against it. I'd actually like to > > make > > some changes to std.datetime which require Vista or later, so being able > > to > > not bother with XP wou

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Stewart Gordon
On 02/08/2013 09:47, Jonathan M Davis wrote: I'm not sure. Possibly. Given that we previously had code that checked the version of Windows and used the A functions if it was running on Windows 9x, there's probably a decent chance that something similar could be done with the Vista vs pre-Vista t

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Stewart Gordon
On 02/08/2013 02:55, Mike Parker wrote: - Define a mixin template along the lines of __AW in newer versions of MinGW, so that version (Unicode) { alias QwertW Qwert; } else { alias QwertA Qwert; } can become simply mixin DECLARE_AW!("Qwert"); I would be cau

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Jonathan M Davis
On Friday, August 02, 2013 10:06:34 Stewart Gordon wrote: > But that does suggest that good old C macros are considerably quicker to > compile than mixins. Strings get allocated and operated on when you're doing string mixins rather than simply doing textual replacement like occurs with macros.

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Dejan Lekic
On Thursday, 1 August 2013 at 23:00:09 UTC, Walter Bright wrote: On 8/1/2013 3:28 PM, Stewart Gordon wrote: What do people think we should do? Opinions please! Even supporting XP is problematic because of the badly broken thread local storage support for DLLs in it, which D heavily relies o

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Dejan Lekic
On Friday, 2 August 2013 at 09:28:46 UTC, Dejan Lekic wrote: On Thursday, 1 August 2013 at 23:00:09 UTC, Walter Bright wrote: On 8/1/2013 3:28 PM, Stewart Gordon wrote: What do people think we should do? Opinions please! Even supporting XP is problematic because of the badly broken thread l

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Dmitry Olshansky
02-Aug-2013 09:51, Sönke Ludwig пишет: Am 01.08.2013 22:59, schrieb Stewart Gordon: - Define a mixin template along the lines of __AW in newer versions of MinGW, so that version (Unicode) { alias QwertW Qwert; } else { alias QwertA Qwert; } can become simply

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Adam D. Ruppe
On Friday, 2 August 2013 at 09:28:46 UTC, Dejan Lekic wrote: Windows XP user-base is still very big. I would vote against ditching the XP support. Me too. I guess I'd be ok with it being "supported" rather than /supported/, but XP is still a *lot* of users and can't be completely ignored.

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Daniel Murphy
"Walter Bright" wrote in message news:ktfgps$2ghh$1...@digitalmars.com... > On 8/1/2013 10:17 PM, Jonathan M Davis wrote: >> Regardless, the biggest gain by far will be being able to ditch support >> for XP >> and require at least Vista. As bad as Vista was, it had some major >> improvements to

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/2/2013 1:53 AM, Stewart Gordon wrote: On 02/08/2013 09:47, Jonathan M Davis wrote: I'm not sure. Possibly. Given that we previously had code that checked the version of Windows and used the A functions if it was running on Windows 9x, there's probably a decent chance that something similar

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Dicebot
On Friday, 2 August 2013 at 14:26:12 UTC, Daniel Murphy wrote: It would be rather silly to stop officially supporting the second most popular desktop operating system. Well, it is no longer supported by Microsoft itself, isn't it? There is a difference between formally supporting and spendin

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/2/2013 2:28 AM, Dejan Lekic wrote: All I am trying to say is - XP is not dead, yet... Is it feeling much better?

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/2/2013 6:41 AM, Adam D. Ruppe wrote: On Friday, 2 August 2013 at 09:28:46 UTC, Dejan Lekic wrote: Windows XP user-base is still very big. I would vote against ditching the XP support. Me too. I guess I'd be ok with it being "supported" rather than /supported/, but XP is still a *lot* of u

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Hans Mustermann
On Friday, 2 August 2013 at 19:05:30 UTC, Walter Bright wrote: I'm not suggesting breaking support for XP. Just unofficial support, meaning we won't break it, and we'll accept pull requests to fix issues with it. Just to be sure that I understand correctly what this thread is about: Are you

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Walter Bright
On 8/2/2013 3:25 PM, Hans Mustermann wrote: On Friday, 2 August 2013 at 19:05:30 UTC, Walter Bright wrote: I'm not suggesting breaking support for XP. Just unofficial support, meaning we won't break it, and we'll accept pull requests to fix issues with it. Just to be sure that I understand co

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-02 Thread Daniel Murphy
"Hans Mustermann" wrote in message news:ntjgrchqcyedtkjed...@forum.dlang.org... > On Friday, 2 August 2013 at 19:05:30 UTC, Walter Bright wrote: > >> I'm not suggesting breaking support for XP. Just unofficial support, >> meaning we won't break it, and we'll accept pull requests to fix issues >

Re: Updates to the WindowsAPI translation instructions; D2 only?

2013-08-03 Thread Mike Parker
On Friday, 2 August 2013 at 08:47:31 UTC, Jonathan M Davis wrote: Is it possible to test at runtime if those newer functions are available, use them if so, and a workaround if not? I'm not sure. Possibly. Given that we previously had code that checked the version of Windows and used the A fun