Commit 6cbaf162 authored by Jon Lech Johansen's avatar Jon Lech Johansen

The default file-translation mode was not being set under win32.

In other words, file playback in 0.2.91 does not work. For de-
scheduling threads use a 0ms sleep instead of 1ms, as it was
causing problems under WinXP. I hope this does not introduce
problems under previous windows versions. I noticed it was
originally 0ms, but later changed to 1ms...
parent 50366aa6
......@@ -3,7 +3,7 @@
* This header provides a portable threads implementation.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: threads.h,v 1.25 2001/10/01 12:48:01 massiot Exp $
* $Id: threads.h,v 1.26 2001/11/14 00:01:36 jlj Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr>
......@@ -534,7 +534,7 @@ static __inline__ int vlc_cond_signal( vlc_cond_t *p_condvar )
&& p_condvar->i_waiting_threads == i_waiting_threads )
{
PulseEvent( p_condvar->signal );
Sleep( 1 ); /* deschedule the current thread */
Sleep( 0 ); /* deschedule the current thread */
}
return 0;
......@@ -608,7 +608,7 @@ static __inline__ int vlc_cond_broadcast( vlc_cond_t *p_condvar )
while( p_condvar->i_waiting_threads )
{
PulseEvent( p_condvar->signal );
Sleep( 1 ); /* deschedule the current thread */
Sleep( 0 ); /* deschedule the current thread */
}
return 0;
......
......@@ -4,7 +4,7 @@
* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: main.c,v 1.124 2001/11/12 22:42:56 sam Exp $
* $Id: main.c,v 1.125 2001/11/14 00:01:36 jlj Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -295,9 +295,6 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
#if defined( SYS_BEOS ) || defined( SYS_DARWIN ) || defined( WIN32 )
system_Init( &i_argc, ppsz_argv, ppsz_env );
#elif defined( WIN32 )
_fmode = _O_BINARY; /* sets the default file-translation mode on Win32 */
#elif defined( SYS_LINUX )
# ifdef DEBUG
/* Activate malloc checking routines to detect heap corruptions. */
......
......@@ -2,7 +2,7 @@
* win32_specific.c: Win32 specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: win32_specific.c,v 1.1 2001/11/12 22:42:56 sam Exp $
* $Id: win32_specific.c,v 1.2 2001/11/14 00:01:36 jlj Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -24,6 +24,7 @@
#include <string.h> /* strdup() */
#include <stdlib.h> /* free() */
#include <fcntl.h>
#include <winsock2.h>
......@@ -48,6 +49,8 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
{
fprintf( stderr, "error: can't initiate WinSocks, error %i", i_err );
}
_fmode = _O_BINARY; /* sets the default file-translation mode */
}
/*****************************************************************************
......
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