Bug 10227 – _fileno, _setmode, _O_BINARY undefined when building x64 on windows
Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2013-06-01T03:57:00Z
Last change time
2013-10-24T14:45:20Z
Keywords
pull
Assigned to
nobody
Creator
yarrluben+dbugs
Comments
Comment #0 by yarrluben+dbugs — 2013-06-01T03:57:24Z
_fileno, _setmode and _O_BINARY are missing when compiling a program for x64 on windows with the microsoft linker.
Adding a few lines to src/phobos/std/stdio.d fixes the problem.
To reproduce the problem, use std.stdio.rawRead or std.stdio.rawWrite in any program.
On further inspecting the source, it seems that rawRead and rawWrite use different version statements for switching to binary; rawRead uses Win32 while rawWrite uses Windows.