From 97d84d1a47e7bec5ed5f05cdfa500da5101861ce Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Tue, 2 Dec 2003 12:57:36 +0000 Subject: [PATCH] ALL: MSVC compilation fixes to libvlc. --- include/variables.h | 4 ++-- include/vlc/vlc.h | 7 ++++++- src/input/es_out.c | 4 ++-- src/input/input.c | 6 +++--- src/input/subtitles.c | 10 ++++++++-- src/misc/win32_specific.c | 3 ++- src/playlist/playlist.c | 4 ++-- 7 files changed, 25 insertions(+), 13 deletions(-) diff --git a/include/variables.h b/include/variables.h index 80610e4d68..a37dcdc6c0 100644 --- a/include/variables.h +++ b/include/variables.h @@ -2,7 +2,7 @@ * variables.h: variables handling ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: variables.h,v 1.18 2003/10/29 01:33:27 gbazin Exp $ + * $Id: variables.h,v 1.19 2003/12/02 12:57:35 gbazin Exp $ * * Authors: Samuel Hocevar * @@ -255,7 +255,7 @@ static inline int __var_SetInteger( vlc_object_t *p_obj, const char *psz_name, i * \param psz_name The name of the variable * \param i The new time value of this variable */ -static inline int __var_SetTime( vlc_object_t *p_obj, const char *psz_name, signed long long i ) +static inline int __var_SetTime( vlc_object_t *p_obj, const char *psz_name, int64_t i ) { vlc_value_t val; val.i_time = i; diff --git a/include/vlc/vlc.h b/include/vlc/vlc.h index 46b26d1a89..bf4437fb9f 100644 --- a/include/vlc/vlc.h +++ b/include/vlc/vlc.h @@ -2,7 +2,7 @@ * vlc.h: global header for vlc ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc.h,v 1.27 2003/09/20 19:37:53 hartman Exp $ + * $Id: vlc.h,v 1.28 2003/12/02 12:57:35 gbazin Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,12 @@ typedef union void * p_address; vlc_object_t * p_object; vlc_list_t * p_list; + +#if defined( WIN32 ) && !defined( __MINGW32__ ) + signed __int64 i_time; +# else signed long long i_time; +#endif struct { char *psz_name; int i_object_id; } var; diff --git a/src/input/es_out.c b/src/input/es_out.c index 8bdfd81224..58fa5b95a8 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -2,7 +2,7 @@ * es_out.c: Es Out handler for input. ***************************************************************************** * Copyright (C) 2003 VideoLAN - * $Id: es_out.c,v 1.5 2003/11/30 17:29:56 fenrir Exp $ + * $Id: es_out.c,v 1.6 2003/12/02 12:57:35 gbazin Exp $ * * Authors: Laurent Aimar * @@ -228,7 +228,7 @@ static es_out_id_t *EsOutAdd( es_out_t *out, es_format_t *fmt ) input_thread_t *p_input = p_sys->p_input; es_out_id_t *es = malloc( sizeof( es_out_id_t ) ); pgrm_descriptor_t *p_prgm = NULL; - char psz_cat[strlen( "Stream " ) + 10]; + char psz_cat[sizeof( "Stream " ) + 10]; input_info_category_t *p_cat; vlc_mutex_lock( &p_input->stream.stream_lock ); diff --git a/src/input/input.c b/src/input/input.c index d56ea5c29e..5a778380fb 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -4,7 +4,7 @@ * decoders. ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: input.c,v 1.269 2003/11/30 16:00:24 fenrir Exp $ + * $Id: input.c,v 1.270 2003/12/02 12:57:35 gbazin Exp $ * * Authors: Christophe Massiot * @@ -43,7 +43,7 @@ #include "vlc_interface.h" #include "codecs.h" -#include "modules/demux/util/sub.h" +#include "../../modules/demux/util/sub.h" /***************************************************************************** * Local prototypes @@ -509,7 +509,7 @@ static int RunThread( input_thread_t *p_input ) subtitle_Demux( p_input->p_sys->sub[i], i_time ); } - i_update_next = mdate() + 150000LL; + i_update_next = mdate() + I64C(150000); } } diff --git a/src/input/subtitles.c b/src/input/subtitles.c index 85a5c7e867..0fd22cec24 100644 --- a/src/input/subtitles.c +++ b/src/input/subtitles.c @@ -2,7 +2,7 @@ * subtitles.c ***************************************************************************** * Copyright (C) 2003 VideoLAN - * $Id: subtitles.c,v 1.4 2003/10/11 22:40:05 hartman Exp $ + * $Id: subtitles.c,v 1.5 2003/12/02 12:57:36 gbazin Exp $ * * Authors: Derk-Jan Hartman * This is adapted code from the GPL'ed MPlayer (http://mplayerhq.hu) @@ -32,7 +32,13 @@ #include #include "ninput.h" -#include + +#ifdef HAVE_DIRENT_H +# include +#else +# include "../extras/dirent.h" +#endif + #include /** diff --git a/src/misc/win32_specific.c b/src/misc/win32_specific.c index 16c21b5f80..4782f2059c 100644 --- a/src/misc/win32_specific.c +++ b/src/misc/win32_specific.c @@ -2,7 +2,7 @@ * win32_specific.c: Win32 specific features ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: win32_specific.c,v 1.26 2003/10/03 13:35:56 sam Exp $ + * $Id: win32_specific.c,v 1.27 2003/12/02 12:57:36 gbazin Exp $ * * Authors: Samuel Hocevar * Gildas Bazin @@ -32,6 +32,7 @@ #endif #if !defined( UNDER_CE ) +# include # include # include #endif diff --git a/src/playlist/playlist.c b/src/playlist/playlist.c index f17990b7d3..0653e9c5b3 100644 --- a/src/playlist/playlist.c +++ b/src/playlist/playlist.c @@ -2,7 +2,7 @@ * playlist.c : Playlist management functions ***************************************************************************** * Copyright (C) 1999-2001 VideoLAN - * $Id: playlist.c,v 1.66 2003/11/29 11:12:46 fenrir Exp $ + * $Id: playlist.c,v 1.67 2003/12/02 12:57:36 gbazin Exp $ * * Authors: Samuel Hocevar * @@ -249,7 +249,7 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, if( *pi_obj_destroyed_date == 0 ) { /* give a little time */ - *pi_obj_destroyed_date = mdate() + 300000LL; + *pi_obj_destroyed_date = mdate() + I64C(300000); } else { -- 2.39.2