#if !defined( UNDER_CE )
# include <io.h>
# include <fcntl.h>
-# include <winsock2.h>
#endif
+#include <winsock2.h>
+
/*****************************************************************************
* system_Init: initialize winsock and misc other things.
*****************************************************************************/
void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
{
-#if !defined( UNDER_CE )
WSADATA Data;
/* Get our full path */
+#if !defined( UNDER_CE )
if( ppsz_argv[0] )
{
char psz_path[MAX_PATH];
}
}
else
+#endif
{
p_this->p_libvlc->psz_vlcpath = strdup( "" );
}
/* Set the default file-translation mode */
+#if !defined( UNDER_CE )
_fmode = _O_BINARY;
+#endif
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
/* Call mdate() once to make sure it is initialized properly */
fprintf( stderr, "error: can't initialize WinSocks\n" );
return;
-
-#endif
}
/*****************************************************************************
*****************************************************************************/
void system_End( vlc_t *p_this )
{
-#if !defined( UNDER_CE )
WSACleanup();
-#endif
}