fix imports for dmd 2.071 + update win bat

This commit is contained in:
Basile Burg 2016-04-14 21:08:24 +02:00
parent 0f7727e31b
commit 2d18ded428
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@ set CORE=
set STD=
set STDD=
set STDE=
set OBIN=bin\dfmt
for %%x in (src\dfmt\*.d) do set CORE=!CORE! %%x
for %%x in (libdparse\src\std\experimental\*.d) do set STD=!STD! %%x
@ -14,4 +15,6 @@ for %%x in (libdparse\experimental_allocator\src\std\experimental\allocator\*.d)
for %%x in (libdparse\experimental_allocator\src\std\experimental\allocator\building_blocks\*.d) do set STDE=!STDE! %%x
@echo on
dmd %CORE% %STD% %STDD% %STDE% %DFLAGS% -ofbin\dfmt.exe
dmd %CORE% %STD% %STDD% %STDE% %DFLAGS% -of%OBIN%.exe
if exist %OBIN%.obj del %OBIN%.obj

View File

@ -111,13 +111,14 @@ else
// On Windows, set stdout to binary mode (needed for correct EOL writing)
// See Phobos' stdio.File.rawWrite
{
import std.stdio : fileno, _O_BINARY, setmode;
import std.stdio: fileno, _O_BINARY, setmode;
immutable fd = fileno(output.getFP());
setmode(fd, _O_BINARY);
version (CRuntime_DigitalMars)
{
import core.atomic : atomicOp;
import core.stdc.stdio: __fhnd_info, FHND_TEXT;
atomicOp!"&="(__fhnd_info[fd], ~FHND_TEXT);
}