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.
Comment #1 by tcdknutson — 2013-09-03T14:53:52Z
Comment #2 by github-bugzilla — 2013-10-24T14:43:46Z
Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/ce23685c0b4e66622230ab9031aba7500e162f83 Merge pull request #1538 from dymk/win64-fileio Fix Issue 10227: Add missing file I/O functions for Win64 DMD and Windows LDC