Commit c1c8211f authored by Gildas Bazin's avatar Gildas Bazin

* ALL: MSVC compilation fixes.

parent 614e91f2
...@@ -318,7 +318,7 @@ SOURCES_libvlc_common = \ ...@@ -318,7 +318,7 @@ SOURCES_libvlc_common = \
src/playlist/group.c \ src/playlist/group.c \
src/playlist/item.c \ src/playlist/item.c \
src/playlist/item-ext.c \ src/playlist/item-ext.c \
src/playlist/info.c \ src/playlist/info.c \
src/input/input.c \ src/input/input.c \
src/input/es_out.c \ src/input/es_out.c \
src/input/stream.c \ src/input/stream.c \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module. * modules_inner.h : Macros used from within a module.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.42 2003/12/15 15:06:23 hartman Exp $ * $Id: modules_inner.h,v 1.43 2004/01/09 12:23:47 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -93,6 +93,7 @@ ...@@ -93,6 +93,7 @@
{ \ { \
int i_shortcut = 1, i_config = -1; \ int i_shortcut = 1, i_config = -1; \
module_config_t *p_config = NULL; \ module_config_t *p_config = NULL; \
static module_config_t config_end = {CONFIG_HINT_END}; \
STORE_SYMBOLS; \ STORE_SYMBOLS; \
p_module->b_submodule = VLC_FALSE; \ p_module->b_submodule = VLC_FALSE; \
p_module->b_unloadable = VLC_TRUE; \ p_module->b_unloadable = VLC_TRUE; \
...@@ -114,11 +115,11 @@ ...@@ -114,11 +115,11 @@
} \ } \
if( p_config ) \ if( p_config ) \
{ \ { \
p_config[ ++i_config ] = (module_config_t){ CONFIG_HINT_END }; \ p_config[ ++i_config ] = config_end; \
config_Duplicate( p_module, p_config ); \ config_Duplicate( p_module, p_config ); \
free( p_config ); \ free( p_config ); \
} \ } \
else config_Duplicate(p_module, &(module_config_t){CONFIG_HINT_END}); \ else config_Duplicate( p_module, &config_end ); \
if( p_module->p_config == NULL ) \ if( p_module->p_config == NULL ) \
{ \ { \
return VLC_EGENERIC; \ return VLC_EGENERIC; \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in * http.c: HTTP access plug-in
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: http.c,v 1.51 2004/01/07 15:21:27 fenrir Exp $ * $Id: http.c,v 1.52 2004/01/09 12:23:47 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -234,12 +234,15 @@ static int Open ( vlc_object_t *p_this ) ...@@ -234,12 +234,15 @@ static int Open ( vlc_object_t *p_this )
} }
} }
if( ( p_sys->i_code == 301 || p_sys->i_code == 302 || p_sys->i_code == 303 || p_sys->i_code == 307 ) && if( ( p_sys->i_code == 301 || p_sys->i_code == 302 ||
p_sys->i_code == 303 || p_sys->i_code == 307 ) &&
p_sys->psz_location && *p_sys->psz_location ) p_sys->psz_location && *p_sys->psz_location )
{ {
playlist_t * p_playlist;
msg_Dbg( p_input, "redirection to %s", p_sys->psz_location ); msg_Dbg( p_input, "redirection to %s", p_sys->psz_location );
playlist_t * p_playlist = (playlist_t *)vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT ); p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
if( !p_playlist ) if( !p_playlist )
{ {
msg_Err( p_input, "redirection failed: can't find playlist" ); msg_Err( p_input, "redirection failed: can't find playlist" );
...@@ -399,8 +402,11 @@ static void ParseURL( access_sys_t *p_sys, char *psz_url ) ...@@ -399,8 +402,11 @@ static void ParseURL( access_sys_t *p_sys, char *psz_url )
/* Parse auth */ /* Parse auth */
if( ( p = strchr( psz, '@' ) ) ) if( ( p = strchr( psz, '@' ) ) )
{ {
char *comma;
*p++ = '\0'; *p++ = '\0';
char *comma = strchr( psz, ':' ); comma = strchr( psz, ':' );
/* Retreive user:password */ /* Retreive user:password */
if( comma ) if( comma )
{ {
...@@ -477,9 +483,11 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_ ...@@ -477,9 +483,11 @@ static int Connect( input_thread_t *p_input, vlc_bool_t *pb_seekable, off_t *pi_
/* Authentification */ /* Authentification */
if( p_sys->psz_user && *p_sys->psz_user ) if( p_sys->psz_user && *p_sys->psz_user )
{ {
char buf[strlen(p_sys->psz_user ) + 1 + strlen( p_sys->psz_passwd ? p_sys->psz_passwd : "" ) + 1]; char *buf;
char *b64; char *b64;
sprintf( buf, "%s:%s", p_sys->psz_user, p_sys->psz_passwd ? p_sys->psz_passwd : "" );
vasprintf( &buf, "%s:%s", p_sys->psz_user,
p_sys->psz_passwd ? p_sys->psz_passwd : "" );
b64 = b64_encode( buf ); b64 = b64_encode( buf );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* net.c: * net.c:
***************************************************************************** *****************************************************************************
* Copyright (C) 2004 VideoLAN * Copyright (C) 2004 VideoLAN
* $Id: net.c,v 1.4 2004/01/07 23:39:41 fenrir Exp $ * $Id: net.c,v 1.5 2004/01/09 12:23:46 gbazin Exp $
* *
* Authors: Laurent Aimar <fenrir@videolan.org> * Authors: Laurent Aimar <fenrir@videolan.org>
* *
...@@ -51,7 +51,10 @@ ...@@ -51,7 +51,10 @@
# include <sys/socket.h> # include <sys/socket.h>
#endif #endif
#include <unistd.h> #ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#include "network.h" #include "network.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_specific.c: Win32 specific features * win32_specific.c: Win32 specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2004 VideoLAN * Copyright (C) 2001-2004 VideoLAN
* $Id: win32_specific.c,v 1.30 2004/01/06 12:02:06 zorglub Exp $ * $Id: win32_specific.c,v 1.31 2004/01/09 12:23:46 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -329,7 +329,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam, ...@@ -329,7 +329,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
for( j = 0 ; j < i_options ; j++ ) for( j = 0 ; j < i_options ; j++ )
{ {
playlist_AddOption( p_playlist, i_pos , playlist_AddOption( p_playlist, i_pos ,
&ppsz_argv[i_opt+1+j] ); ppsz_argv[i_opt+1+j] );
} }
i_opt += i_options; i_opt += i_options;
} }
......
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