]> git.sesse.net Git - vlc/commitdiff
* Various Win32 compilation fixes.
authorXavier Marchesini <xav@videolan.org>
Sat, 2 Mar 2002 03:53:55 +0000 (03:53 +0000)
committerXavier Marchesini <xav@videolan.org>
Sat, 2 Mar 2002 03:53:55 +0000 (03:53 +0000)
 * DVD compiles, but doesn't work yet.
 * Fixed some typos in my previous Win32 multicast commit

include/common.h
include/input_ext-plugins.h
plugins/network/ipv4.c
src/input/input_ext-plugins.c

index d96099d16e48f8eb6faf9b41455afe31cfd3198e..2bf169fde1797ce57d6ce6cb02dcfdc877781b82 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.80 2002/03/01 00:33:17 massiot Exp $
+ * $Id: common.h,v 1.81 2002/03/02 03:53:54 xav Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -62,6 +62,12 @@ typedef int                 ptrdiff_t;
 #   endif
 #endif
 
+#ifndef _SSIZE_T
+typedef s64                ssize_t;
+#endif
+
+
+
 /* Counter for statistics and profiling */
 typedef unsigned long       count_t;
 
@@ -548,6 +554,7 @@ typedef struct module_symbols_s
                                       size_t );
     ssize_t ( * input_FDNetworkRead )   ( struct input_thread_s *, byte_t *,
                                       size_t );
+    
     void * ( * input_BuffersInit )( void );
     void ( * input_BuffersEnd )( struct input_buffers_s * );
     struct data_buffer_s * ( * input_NewBuffer )( struct input_buffers_s *, size_t );
index 44e464ac73467d145c53af8e906a82903f4200a5..57cd0f27e0c4036ad0acfa6113e85664b59e4321 100644 (file)
@@ -3,7 +3,7 @@
  *                      but exported to plug-ins
  *****************************************************************************
  * Copyright (C) 1999-2002 VideoLAN
- * $Id: input_ext-plugins.h,v 1.19 2002/03/02 03:51:23 sam Exp $
+ * $Id: input_ext-plugins.h,v 1.20 2002/03/02 03:53:54 xav Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -321,7 +321,7 @@ typedef struct input_socket_s
 #ifndef PLUGIN
 void input_FDClose( struct input_thread_s * );
 ssize_t input_FDRead( input_thread_t *, byte_t *, size_t );
-int input_FDNetworkRead( input_thread_t *, byte_t *, size_t );
+ssize_t input_FDNetworkRead( input_thread_t *, byte_t *, size_t );
 void input_FDSeek( struct input_thread_s *, off_t );
 #else
 #   define input_FDClose p_symbols->input_FDClose
index c226ee7fd3460febf96e62bad550be001886eead..293276f3d2da462bfec3dc2b8af0988a8d22d023 100644 (file)
@@ -2,7 +2,7 @@
  * ipv4.c: IPv4 network abstraction layer
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: ipv4.c,v 1.2 2002/03/01 01:59:18 xav Exp $
+ * $Id: ipv4.c,v 1.3 2002/03/02 03:53:55 xav Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -26,7 +26,6 @@
  *****************************************************************************/
 #include <stdlib.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <errno.h>
@@ -225,7 +224,7 @@ static int OpenUDP( network_socket_t * p_socket )
     
 /* Check if this is a multicast socket */
 
-    if (IN_MULTICAST( ntohl(psz_bind_address) ) )
+    if (IN_MULTICAST( ntohl( inet_addr(psz_bind_addr) ) ) )
     {
            psz_bind_win32 = NULL ;
     }
index 5ff468368f89728922c5c7e1ee32968a444078cd..95f87969f0887a69a7f125f7ce6675c6cbc8772e 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-plugins.c: useful functions for access and demux plug-ins
  *****************************************************************************
  * Copyright (C) 2001, 2002 VideoLAN
- * $Id: input_ext-plugins.c,v 1.1 2002/03/01 00:33:18 massiot Exp $
+ * $Id: input_ext-plugins.c,v 1.2 2002/03/02 03:53:55 xav Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -27,7 +27,6 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <sys/stat.h>
 #include <string.h>
 #include <errno.h>
 #   endif
 #endif
 
+#ifdef WIN32
+#   include <winsock2.h>
+#   include <ws2tcpip.h>
+#elif !defined( SYS_BEOS ) && !defined( SYS_NTO )
+#   include <netdb.h>                                         /* hostent ... */
+#   include <sys/socket.h>
+#   include <netinet/in.h>
+#   ifdef HAVE_ARPA_INET_H
+#       include <arpa/inet.h>                    /* inet_ntoa(), inet_aton() */
+#   endif
+#endif
+
+
+
 #include "stream_control.h"
 #include "input_ext-intf.h"
 #include "input_ext-dec.h"