[Issue 18816] [betterC] Standard Streams Unlinkable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 16 02:33:20 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18816

--- Comment #2 from dd86k <devddstuff at gmail.com> ---
Forgot about this ticket.

I made it work under Windows, see
https://github.com/dd86k/dd-dos/blob/master/src/ddc/ddc.d#L63-L69 (and _NFILE).
I almost pulled the repo and make a pull request, so feel free to base a pull
request off of my ddc.d source.

For people refusing to click on the Github link:
enum _NFILE = 20;
...
private extern extern(C) shared FILE[_NFILE] _iob;

shared stdin  = &_iob[0];
shared stdout = &_iob[1];
shared stderr = &_iob[2];
shared stdaux = &_iob[3];
shared stdprn = &_iob[4];

I had to play with the source a lot, but I'm happy to say my (temporary?)
source works for -m32mscoff and -m64 under DMD and LDC2. -m32 under DMD remains
unaffected since it uses the DigitalMars C runtime.

Works on my Windows 10 1506 machine. Might be different runtime version, who
knows.

--


More information about the Digitalmars-d-bugs mailing list