September 02, 2012
As I understand it, right now, with 32-bit Windows, we're using dmc's C runtime, which means that whatever C functions we need from the C runtime come from dmc's runtime ( http://www.digitalmars.com/rtl/rtl.html ) and may or may not match what Microsoft has. For instance, there's _open. Both dmc and Micosoft have it, but not only is it ill-advised to use char functions rather than wchar_t functions with Microsoft's runtime, but you're actually supposed to use the "secure" version (_wsopen_s) with Microsoft's runtime. As far as I can tell, dmc doesn't have any variants of _open, let alone _wsopen_s. So, you can't just use one of them and have it be right for both runtimes.

So, how is this sort of thing going to be handled with the new Windows 64 stuff, since it's supposed to be using Microsoft's runtime? Are we going to have a version identifiers to distinguish Microsoft's runtime vs dmc's? Or do we have that already, and I missed it?

I don't know how much work will need to be done in the short term with regards to different Windows functions in druntime for dmc's and Microsoft's C runtime libraries, but if I understand the situation correctly, we're definitely going to need to do _some_ work there.

I'm in a position where I need to use _open (or _wsopen_s) in Phobos, which means adding it to druntime, and I'd like to know how we're going to handle this problem so that I can add it correctly.

- Jonathan M Davis
_______________________________________________
dmd-internals mailing list
dmd-internals@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-internals