From 7d0c93158d1afb34538de30802f9542b04db0b55 Mon Sep 17 00:00:00 2001 From: Gildas Bazin <gbazin@videolan.org> Date: Sun, 21 Sep 2003 10:23:59 +0000 Subject: [PATCH] * include/vlc_common.h: ssize_t is now typedefed in new mingw headers. * modules/access/dshow/dshow.cpp: compilation fix related to ssize_t. * share/vlc_win32_rc.rc: stringify version number. * mozilla/*: compilation fix and cosmetic changes to the .rc. --- include/vlc_common.h | 4 ++-- modules/access/dshow/dshow.cpp | 13 +++++++------ mozilla/Makefile.am | 2 +- mozilla/npvlc_rc.rc | 23 +++++++++++++++-------- mozilla/vlcpeer.cpp | 7 ++++++- share/vlc_win32_rc.rc | 7 +++++-- 6 files changed, 36 insertions(+), 20 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index ff3edfbbea8c..506a3341f47c 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -3,7 +3,7 @@ * Collection of useful common types and macros definitions ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN - * $Id: vlc_common.h,v 1.79 2003/09/18 17:54:02 zorglub Exp $ + * $Id: vlc_common.h,v 1.80 2003/09/21 10:23:59 gbazin Exp $ * * Authors: Samuel Hocevar <sam@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr> @@ -113,7 +113,7 @@ typedef int ptrdiff_t; #define PATH_MAX MAX_PATH #endif -#if defined( WIN32 ) || defined( UNDER_CE ) +#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( _SSIZE_T_ ) typedef int ssize_t; #endif diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp index 8124e1f94ae3..c81faf80be13 100644 --- a/modules/access/dshow/dshow.cpp +++ b/modules/access/dshow/dshow.cpp @@ -1,8 +1,8 @@ /***************************************************************************** - * dshow.c : DirectShow access module for vlc + * dshow.cpp : DirectShow access module for vlc ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: dshow.cpp,v 1.8 2003/09/07 22:49:05 fenrir Exp $ + * $Id: dshow.cpp,v 1.9 2003/09/21 10:23:59 gbazin Exp $ * * Author: Gildas Bazin <gbazin@netcourrier.com> * @@ -37,9 +37,9 @@ /***************************************************************************** * Local prototypes *****************************************************************************/ -static int AccessOpen ( vlc_object_t * ); -static void AccessClose ( vlc_object_t * ); -static int Read ( input_thread_t *, byte_t *, size_t ); +static int AccessOpen ( vlc_object_t * ); +static void AccessClose ( vlc_object_t * ); +static ssize_t Read ( input_thread_t *, byte_t *, size_t ); static int DemuxOpen ( vlc_object_t * ); static void DemuxClose ( vlc_object_t * ); @@ -821,7 +821,8 @@ static AM_MEDIA_TYPE EnumDeviceCaps( vlc_object_t *p_this, * Returns -1 in case of error, 0 in case of EOF, otherwise the number of * bytes. *****************************************************************************/ -static int Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) +static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, + size_t i_len ) { access_sys_t *p_sys = p_input->p_access_data; dshow_stream_t *p_stream = p_sys->pp_streams[p_sys->i_current_stream]; diff --git a/mozilla/Makefile.am b/mozilla/Makefile.am index 0e384ec66113..a1cff4f6a27a 100644 --- a/mozilla/Makefile.am +++ b/mozilla/Makefile.am @@ -82,7 +82,7 @@ DATA_npvlc_rc = $(noinst_npvlc_rc_DATA) noinst_npvlc_rc_DATA = npvlc_rc.$(OBJEXT) noinst_npvlc_rcdir = $(libdir) npvlc_rc.$(OBJEXT): npvlc_rc.rc - $(WINDRES) --include-dir $(srcdir) -i $< -o $@ + $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir) -i $< -o $@ endif if HAVE_DARWIN VLC\ Plugin.plugin: diff --git a/mozilla/npvlc_rc.rc b/mozilla/npvlc_rc.rc index f8d8033b6803..5eb718e11ddc 100644 --- a/mozilla/npvlc_rc.rc +++ b/mozilla/npvlc_rc.rc @@ -1,13 +1,21 @@ - ///////////////////////////////////////////////////////////////////////////// // // VLC Plugin description. // +#ifndef VERSION_NUMBER +#define VERSION_NUMBER 0,0,0,0 +#endif +#ifndef VERSION +#define VERSION 0.0.0 +#endif + +#define STRINGIFY( z ) UGLY_KLUDGE( z ) +#define UGLY_KLUDGE( z ) #z //VS_VERSION_INFO VERSIONINFO 1 VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 + FILEVERSION VERSION_NUMBER + PRODUCTVERSION VERSION_NUMBER FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -24,12 +32,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "ProductName", "VLC Multimedia Plugin\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" + VALUE "ProductVersion", STRINGIFY( VERSION ) VALUE "OriginalFilename", "npvlc.dll\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "FileDescription", "VLC multimedia plugin<br><br>VideoLAN WWW: <a href=""http://www.videolan.org/"">http://www.videolan.org/</a>\0" + VALUE "FileVersion", STRINGIFY( VERSION ) + VALUE "FileDescription", "VLC multimedia plugin Version "STRINGIFY( VERSION )"<br><br>VideoLAN WWW: <a href=""http://www.videolan.org/"">http://www.videolan.org/</a>\0" VALUE "InternalName", "npvlc\0" - VALUE "CompanyName", "VideoLAN\0" + VALUE "CompanyName", "VideoLAN Team\0" VALUE "LegalCopyright", "Copyright VideoLAN \251 1996-2003\0" VALUE "MIMEType", "audio/mpeg|audio/x-mpeg|video/mpeg|video/x-mpeg|video/mpeg-system|video/x-mpeg-system|video/mpeg4|audio/mpeg4|application/mpeg4-iod|application/mpeg4-muxcodetable|video/x-msvideo|video/quicktime|application/x-ogg|application/x-vlc-plugin|video/x-ms-asf-plugin|application/x-mplayer2|video/x-ms-wmv\0" VALUE "FileExtents", "mp2,mp3,mpga,mpega|mp2,mp3,mpga,mpega|mpg,mpeg,mpe|mpg,mpeg,mpe|mpg,mpeg,vob|mpg,mpeg,vob|mp4,mpg4|mp4,mpg4|mp4,mpg4|mp4,mpg4|avi|mov,qt|ogg|\0" @@ -41,4 +49,3 @@ BEGIN VALUE "Translation", 0x409, 1252 END END - diff --git a/mozilla/vlcpeer.cpp b/mozilla/vlcpeer.cpp index 06fc59135d0d..ff68781a21d2 100644 --- a/mozilla/vlcpeer.cpp +++ b/mozilla/vlcpeer.cpp @@ -2,7 +2,7 @@ * vlcpeer.cpp: scriptable peer descriptor ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: vlcpeer.cpp,v 1.7 2003/08/19 14:07:51 garf Exp $ + * $Id: vlcpeer.cpp,v 1.8 2003/09/21 10:23:59 gbazin Exp $ * * Authors: Samuel Hocevar <sam@zoy.org> * @@ -26,6 +26,11 @@ *****************************************************************************/ #include <vlc/vlc.h> +#ifdef DEBUG +/* We do not want to use nsDebug.h */ +# undef DEBUG +#endif + #include <nsISupports.h> #include <nsMemory.h> #include <npapi.h> diff --git a/share/vlc_win32_rc.rc b/share/vlc_win32_rc.rc index d3f4ba11ae73..8954aee5e092 100644 --- a/share/vlc_win32_rc.rc +++ b/share/vlc_win32_rc.rc @@ -6,6 +6,9 @@ VLC_ICON ICON "vlc48x48.ico" #define VERSION 0.0.0 #endif +#define STRINGIFY( z ) UGLY_KLUDGE( z ) +#define UGLY_KLUDGE( z ) #z + 1 VERSIONINFO FILETYPE 1 FILEOS 4 @@ -16,8 +19,8 @@ BEGIN BEGIN BLOCK "040904E4" BEGIN - VALUE "CompanyName", "VideoLAN" - VALUE "FileVersion", "0.6.2" + VALUE "CompanyName", "VideoLAN Team" + VALUE "FileVersion", STRINGIFY( VERSION ) VALUE "FileDescription", "VLC media player" VALUE "LegalCopyright", "(c) 1996-2003 VideoLAN" END -- GitLab