1
0
mirror of https://github.com/wine-mirror/wine synced 2024-06-29 06:14:34 +00:00

ucrtbase: Fix FILE _flag values.

This commit is contained in:
Shengdun Wang 2024-06-12 13:01:31 +02:00 committed by Alexandre Julliard
parent 90e59859ce
commit 1163e39937
3 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -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);

View File

@ -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