[vlc-commits] Win32: setmode(stdin) belongs in the app, not the library
Rémi Denis-Courmont
git at videolan.org
Tue Nov 22 17:17:53 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 22 18:09:51 2011 +0200| [7ac7fbccf5b43164cca46ebc5ee01e1cfbe30c94] | committer: Rémi Denis-Courmont
Win32: setmode(stdin) belongs in the app, not the library
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ac7fbccf5b43164cca46ebc5ee01e1cfbe30c94
---
bin/winvlc.c | 4 ++++
src/win32/specific.c | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/bin/winvlc.c b/bin/winvlc.c
index 66d322c..c7bfaf6 100644
--- a/bin/winvlc.c
+++ b/bin/winvlc.c
@@ -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];
diff --git a/src/win32/specific.c b/src/win32/specific.c
index abe76b4..2d82256 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -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
More information about the vlc-commits
mailing list