From: Shengdun Wang uwgghhbcad@gmail.com
--- dlls/msvcrt/msvcrt.h | 8 ++++++++ dlls/ucrtbase/tests/file.c | 2 +- include/msvcrt/stdio.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 35e6e8233a1..e95b824f3f3 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -34,6 +34,14 @@ typedef struct _iobuf int _bufsiz; char* _tmpfname; } FILE; + +#define _IOREAD 0x0001 +#define _IOWRT 0x0002 +#define _IORW 0x0004 +#define _IOEOF 0x0008 +#define _IOERR 0x0010 +#define _IOMYBUF 0x0040 +#define _IOSTRG 0x1000 #endif #endif
diff --git a/dlls/ucrtbase/tests/file.c b/dlls/ucrtbase/tests/file.c index c36ea51e825..e739934de02 100644 --- a/dlls/ucrtbase/tests/file.c +++ b/dlls/ucrtbase/tests/file.c @@ -110,7 +110,7 @@ static void test_iobuf_layout(void) ok(!(fp.iobuf->_flag & 0x40), "fp.iobuf->_flag = %x\n", fp.iobuf->_flag); r = fprintf(fp.f, "%s", "init"); ok(r == 4, "fprintf returned %d\n", r); - todo_wine ok(fp.iobuf->_flag & 0x40, "fp.iobuf->_flag = %x\n", fp.iobuf->_flag); + ok(fp.iobuf->_flag & 0x40, "fp.iobuf->_flag = %x\n", fp.iobuf->_flag); ok(fp.iobuf->_cnt + 4 == fp.iobuf->_bufsiz, "_cnt = %d, _bufsiz = %d\n", fp.iobuf->_cnt, fp.iobuf->_bufsiz);
diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 745257ea5cc..73058a7b135 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -11,6 +11,7 @@ #include <corecrt_wstdio.h>
/* file._flag flags */ +#ifndef _UCRT #define _IOREAD 0x0001 #define _IOWRT 0x0002 #define _IOMYBUF 0x0008 @@ -18,6 +19,7 @@ #define _IOERR 0x0020 #define _IOSTRG 0x0040 #define _IORW 0x0080 +#endif
#define STDIN_FILENO 0 #define STDOUT_FILENO 1