From d8a772794266ff6cdb13790b294dab0f9f28c2b2 Mon Sep 17 00:00:00 2001 From: elrood Date: Sun, 14 Dec 2008 17:53:20 +0100 Subject: [PATCH] added a patch to tango's stdio for ldc on win32 --- runtime/ldc.diff | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/runtime/ldc.diff b/runtime/ldc.diff index fd299f1f..acdd89af 100644 --- a/runtime/ldc.diff +++ b/runtime/ldc.diff @@ -864,3 +864,32 @@ Index: tango/stdc/stdarg.d else { alias void* va_list; +Index: tango/stdc/stdio.d +=================================================================== +--- tango/stdc/stdio.d (revision 4155) ++++ tango/stdc/stdio.d (working copy) +@@ -249,6 +249,24 @@ + stdprn = &(*_imp___iob)[4]; + } + } ++ else version (LDC) { ++ extern FILE[_NFILE]* _imp___iob; ++ ++ auto FILE* stdin; ++ auto FILE* stdout; ++ auto FILE* stderr; ++ auto FILE* stdaux; ++ auto FILE* stdprn; ++ ++ static this() ++ { ++ stdin = &(*_imp___iob)[0]; ++ stdout = &(*_imp___iob)[1]; ++ stderr = &(*_imp___iob)[2]; ++ stdaux = &(*_imp___iob)[3]; ++ stdprn = &(*_imp___iob)[4]; ++ } ++ } + else + { + extern FILE[_NFILE] _iob;