Win32: setmode(stdin) belongs in the app, not the library

This commit is contained in:
Rémi Denis-Courmont 2011-11-22 18:09:51 +02:00
parent 709b755fa8
commit 7ac7fbccf5
2 changed files with 4 additions and 2 deletions

View File

@ -36,6 +36,8 @@
# ifndef _WIN32_IE
# define _WIN32_IE 0x501
# endif
# include <fcntl.h>
# include <io.h>
# include <shlobj.h>
# include <wininet.h>
# define PSAPI_VERSION 1
@ -187,6 +189,8 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
SetUnhandledExceptionFilter(vlc_exception_filter);
}
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
#else /* UNDER_CE */
char **argv, psz_cmdline[wcslen(lpCmdLine) * 4];

View File

@ -83,8 +83,6 @@ void system_Init( void )
/* Set the default file-translation mode */
#if !defined( UNDER_CE )
_fmode = _O_BINARY;
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
timeBeginPeriod(5);
#endif