]> git.sesse.net Git - vlc/commitdiff
* src/misc/win32_specific.c: WinCE build fixes.
authorGildas Bazin <gbazin@videolan.org>
Mon, 4 Oct 2004 16:04:54 +0000 (16:04 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 4 Oct 2004 16:04:54 +0000 (16:04 +0000)
src/misc/win32_specific.c

index 36fc102c6c859433b51de886b3f5f262613e1703..3d8de5fad5a81321c0aceac9fc025b82f2212bcc 100644 (file)
 #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];
@@ -65,12 +66,15 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
         }
     }
     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 */
@@ -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" );
 
     return;
-
-#endif
 }
 
 /*****************************************************************************
@@ -346,7 +348,5 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
  *****************************************************************************/
 void system_End( vlc_t *p_this )
 {
-#if !defined( UNDER_CE )
     WSACleanup();
-#endif
 }