Commit e03c2c0d authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/win32_specific.c: change the mode of stdin to _O_BINARY so we can use stdin to read files (thanks to Steve Li).
* modules/control/http.c: allow directories of the form "x:\" on win32.
parent 0758f5ea
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* http.c : http mini-server ;) * http.c : http mini-server ;)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.19 2003/07/30 21:09:06 gbazin Exp $ * $Id: http.c,v 1.20 2003/07/31 21:46:37 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -997,8 +997,12 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir ) ...@@ -997,8 +997,12 @@ static mvar_t *mvar_FileSetNew( char *name, char *psz_dir )
sep = '/'; sep = '/';
#endif #endif
/* remove trailling separoator */ /* remove trailling separator */
while( strlen( psz_dir ) > 1 && psz_dir[strlen( psz_dir ) -1 ] == sep ) while( strlen( psz_dir ) > 1 &&
#if defined( WIN32 )
!( strlen(psz_dir)==3 && psz_dir[1]==':' && psz_dir[2]==sep ) &&
#endif
psz_dir[strlen( psz_dir ) -1 ] == sep )
{ {
psz_dir[strlen( psz_dir ) -1 ] ='\0'; psz_dir[strlen( psz_dir ) -1 ] ='\0';
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_specific.c: Win32 specific features * win32_specific.c: Win32 specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: win32_specific.c,v 1.23 2003/07/18 20:52:11 gbazin Exp $ * $Id: win32_specific.c,v 1.24 2003/07/31 21:46:37 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -64,6 +64,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -64,6 +64,7 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
/* Set the default file-translation mode */ /* Set the default file-translation mode */
_fmode = _O_BINARY; _fmode = _O_BINARY;
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
/* WinSock Library Init. */ /* WinSock Library Init. */
if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) ) if( !WSAStartup( MAKEWORD( 2, 0 ), &Data ) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment