X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fmain.c;h=8b3212a4ede980fdc5044f6272a55b84823eaa21;hp=3a0525034aa09937b6b4f585ab0a2ee1f7b61c30;hb=d7991738d65a2f27c174a7e6fdc3e70ec9b96aa5;hpb=3fb4d068a7bf31c362ddeac1627c9253d2c1613f diff --git a/src/main.c b/src/main.c index 3a052503..8b3212a4 100644 --- a/src/main.c +++ b/src/main.c @@ -60,8 +60,13 @@ as that of the covered work. */ #include #include +#ifdef WINDOWS +# include +# include +#endif + #ifdef __VMS -#include "vms.h" +# include "vms.h" #endif /* __VMS */ #ifndef PATH_SEPARATOR @@ -1249,14 +1254,7 @@ for details.\n\n")); if (HYPHENP (opt.output_document)) { #ifdef WINDOWS - FILE *result; - result = freopen ("CONOUT$", "wb", stdout); - if (result == NULL) - { - logputs (LOG_NOTQUIET, _("\ -WARNING: Can't reopen standard output in binary mode;\n\ - downloaded file may contain inappropriate line endings.\n")); - } + _setmode (_fileno (stdout), _O_BINARY); #endif output_stream = stdout; }