(main) [_WIN32]: Windows putchar() screws up when printing multibyte
strings bytewise unless the stream is buffered. Switch stdout to line-buffered mode. (login): Explicitly flush stdout, because Windows doesn't implement line-buffering faithfully.
This commit is contained in:
parent
b239d6e3b1
commit
dfe767e7e0
2 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,7 @@ main(int ac, char **av)
|
|||
int utf8 = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
setvbuf(stdout, NULL, _IOLBF, 4096);
|
||||
err = WSAStartup(0x0101, &WsaData);
|
||||
if (err == SOCKET_ERROR) {
|
||||
printf("WSAStartup Failed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue