Commit 4283e470 authored by Gildas Bazin's avatar Gildas Bazin

* src/misc/win32_specific.c: WinCE build fixes.

parent 16b99ba1
...@@ -35,18 +35,19 @@ ...@@ -35,18 +35,19 @@
#if !defined( UNDER_CE ) #if !defined( UNDER_CE )
# include <io.h> # include <io.h>
# include <fcntl.h> # include <fcntl.h>
# include <winsock2.h>
#endif #endif
#include <winsock2.h>
/***************************************************************************** /*****************************************************************************
* system_Init: initialize winsock and misc other things. * system_Init: initialize winsock and misc other things.
*****************************************************************************/ *****************************************************************************/
void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
{ {
#if !defined( UNDER_CE )
WSADATA Data; WSADATA Data;
/* Get our full path */ /* Get our full path */
#if !defined( UNDER_CE )
if( ppsz_argv[0] ) if( ppsz_argv[0] )
{ {
char psz_path[MAX_PATH]; char psz_path[MAX_PATH];
...@@ -65,12 +66,15 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -65,12 +66,15 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
} }
} }
else else
#endif
{ {
p_this->p_libvlc->psz_vlcpath = strdup( "" ); p_this->p_libvlc->psz_vlcpath = strdup( "" );
} }
/* Set the default file-translation mode */ /* Set the default file-translation mode */
#if !defined( UNDER_CE )
_fmode = _O_BINARY; _fmode = _O_BINARY;
#endif
_setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */ _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
/* Call mdate() once to make sure it is initialized properly */ /* Call mdate() once to make sure it is initialized properly */
...@@ -111,8 +115,6 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] ) ...@@ -111,8 +115,6 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
fprintf( stderr, "error: can't initialize WinSocks\n" ); fprintf( stderr, "error: can't initialize WinSocks\n" );
return; return;
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -346,7 +348,5 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, ...@@ -346,7 +348,5 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
*****************************************************************************/ *****************************************************************************/
void system_End( vlc_t *p_this ) void system_End( vlc_t *p_this )
{ {
#if !defined( UNDER_CE )
WSACleanup(); WSACleanup();
#endif
} }
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