Hi,

On windows, when running inside a terminal, there are two "outputs":
stdout and console output (CONOUT). They are bound together by default
but currently, wget changes CONOUT instead of stdout and that prevents
redirection (content will always go to CONOUT and won't be
redirected).

The following patch changes that by using "_setmode(_fileno(stdout),
_O_BINARY);", which is also much simpler.

Available on cgit and attached to this mail.
http://cgit.notk.org/adrien/mingw-builds/slackware64-current/tree/slackware64-current/source/n/wget/0005-Properly-set-stdout-to-binary-mode.patch


Also, is there a reason setvbuf isn't used in wget?


Regards,

Adrien Nader

Attachment: 0005-Properly-set-stdout-to-binary-mode.patch
Description: Binary data

Reply via email to