From 14e7e331ae2e86910dbe3c2d9ecd50aa003dd195 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 6 Aug 2019 12:23:24 +0200 Subject: [PATCH] stdio.h: Use __acrt_iob_func to access standard stream files. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/msvcrt/stdio.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 014e68ae173..8d8f2089ad8 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -90,9 +90,11 @@ FILE* __cdecl __iob_func(void); # endif #endif /* _STDIO_DEFINED */ -#define stdin (_iob+STDIN_FILENO) -#define stdout (_iob+STDOUT_FILENO) -#define stderr (_iob+STDERR_FILENO) +FILE *__cdecl __acrt_iob_func(unsigned index); + +#define stdin (__acrt_iob_func(0)) +#define stdout (__acrt_iob_func(1)) +#define stderr (__acrt_iob_func(2)) /* return value for _get_output_format */ #define _TWO_DIGIT_EXPONENT 0x1