msvcrt: Change internal buffer size to 4k.
This commit is contained in:
parent
147be95a68
commit
40067dd011
|
@ -81,6 +81,8 @@ static char utf16_bom[2] = { 0xff, 0xfe };
|
|||
#define MSVCRT_MAX_FILES 2048
|
||||
#define MSVCRT_FD_BLOCK_SIZE 32
|
||||
|
||||
#define MSVCRT_INTERNAL_BUFSIZ 4096
|
||||
|
||||
/* ioinfo structure size is different in msvcrXX.dll's */
|
||||
typedef struct {
|
||||
HANDLE handle;
|
||||
|
@ -619,9 +621,9 @@ static BOOL msvcrt_alloc_buffer(MSVCRT_FILE* file)
|
|||
&& MSVCRT__isatty(file->_file))
|
||||
return FALSE;
|
||||
|
||||
file->_base = MSVCRT_calloc(MSVCRT_BUFSIZ,1);
|
||||
file->_base = MSVCRT_calloc(MSVCRT_INTERNAL_BUFSIZ,1);
|
||||
if(file->_base) {
|
||||
file->_bufsiz = MSVCRT_BUFSIZ;
|
||||
file->_bufsiz = MSVCRT_INTERNAL_BUFSIZ;
|
||||
file->_flag |= MSVCRT__IOMYBUF;
|
||||
} else {
|
||||
file->_base = (char*)(&file->_charbuf);
|
||||
|
|
|
@ -2269,7 +2269,7 @@ static void test_write_flush(void)
|
|||
ok(file != NULL, "unable to create test file\n");
|
||||
iobuf[0] = 0;
|
||||
fwrite(iobuf, 1, 1, file); /* needed for wine to init _bufsiz */
|
||||
todo_wine ok(file->_bufsiz == 4096, "incorrect default buffer size: %d", file->_bufsiz);
|
||||
ok(file->_bufsiz == 4096, "incorrect default buffer size: %d", file->_bufsiz);
|
||||
test_write_flush_size(file, file->_bufsiz);
|
||||
setvbuf(file, iobuf, _IOFBF, sizeof(iobuf));
|
||||
test_write_flush_size(file, sizeof(iobuf));
|
||||
|
|
Loading…
Reference in New Issue