Commit 28f793de authored by Eric Petit's avatar Eric Petit

ALL: fixed BeOS-specific warnings (ssize_t is not a int but a long,

vasprintf if defined but not declared in the system headers...)
parent 9e3078ae
......@@ -2,7 +2,7 @@
* access.c: access capabilities for dvdplay plugin.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: access.c,v 1.17 2003/05/04 22:42:14 gbazin Exp $
* $Id: access.c,v 1.18 2003/05/08 19:06:44 titer Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -54,12 +54,12 @@
* Local prototypes
*****************************************************************************/
/* called from outside */
static int dvdplay_SetArea ( input_thread_t *, input_area_t * );
static int dvdplay_SetProgram ( input_thread_t *, pgrm_descriptor_t * );
static int dvdplay_Read ( input_thread_t *, byte_t *, size_t );
static void dvdplay_Seek ( input_thread_t *, off_t );
static int dvdplay_SetArea ( input_thread_t *, input_area_t * );
static int dvdplay_SetProgram ( input_thread_t *, pgrm_descriptor_t * );
static ssize_t dvdplay_Read ( input_thread_t *, byte_t *, size_t );
static void dvdplay_Seek ( input_thread_t *, off_t );
static void pf_vmg_callback ( void*, dvdplay_event_t );
static void pf_vmg_callback ( void*, dvdplay_event_t );
/* only from inside */
static int dvdNewArea( input_thread_t *, input_area_t * );
......@@ -331,7 +331,7 @@ static int dvdplay_SetArea( input_thread_t * p_input, input_area_t * p_area )
* Returns -1 in case of error, the number of bytes read if everything went
* well.
*****************************************************************************/
static int dvdplay_Read( input_thread_t * p_input,
static ssize_t dvdplay_Read( input_thread_t * p_input,
byte_t * p_buffer, size_t i_count )
{
dvd_data_t * p_dvd;
......@@ -342,7 +342,7 @@ static int dvdplay_Read( input_thread_t * p_input,
vlc_mutex_lock( &p_input->stream.stream_lock );
i_read = LB2OFF( dvdplay_read( p_dvd->vmg, p_buffer, OFF2LB( i_count ) ) );
vlc_mutex_unlock( &p_input->stream.stream_lock );
return i_read;
}
......
......@@ -6,7 +6,7 @@
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
* $Id: input.c,v 1.21 2003/05/05 22:23:33 gbazin Exp $
* $Id: input.c,v 1.22 2003/05/08 19:06:44 titer Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -84,18 +84,18 @@ struct demux_sys_t
* Local prototypes
*****************************************************************************/
/* called from outside */
static int DvdReadDemux ( input_thread_t * );
static int DvdReadRewind ( input_thread_t * );
static int DvdReadDemux ( input_thread_t * );
static int DvdReadRewind ( input_thread_t * );
static int DvdReadSetArea ( input_thread_t *, input_area_t * );
static int DvdReadSetProgram ( input_thread_t *, pgrm_descriptor_t * );
static int DvdReadRead ( input_thread_t *, byte_t *, size_t );
static void DvdReadSeek ( input_thread_t *, off_t );
static int DvdReadSetArea ( input_thread_t *, input_area_t * );
static int DvdReadSetProgram ( input_thread_t *, pgrm_descriptor_t * );
static ssize_t DvdReadRead ( input_thread_t *, byte_t *, size_t );
static void DvdReadSeek ( input_thread_t *, off_t );
/* called only from here */
static void DvdReadLauchDecoders( input_thread_t * p_input );
static void DvdReadHandleDSI( thread_dvd_data_t * p_dvd, uint8_t * p_data );
static void DvdReadFindCell ( thread_dvd_data_t * p_dvd );
static void DvdReadLauchDecoders( input_thread_t * p_input );
static void DvdReadHandleDSI( thread_dvd_data_t * p_dvd, uint8_t * p_data );
static void DvdReadFindCell ( thread_dvd_data_t * p_dvd );
/*
* Data demux functions
......@@ -856,8 +856,8 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
* Returns -1 in case of error, 0 in case of EOF, otherwise the number of
* bytes.
*****************************************************************************/
static int DvdReadRead( input_thread_t * p_input,
byte_t * p_buffer, size_t i_count )
static ssize_t DvdReadRead( input_thread_t * p_input,
byte_t * p_buffer, size_t i_count )
{
thread_dvd_data_t * p_dvd;
byte_t * p_buf;
......
......@@ -2,7 +2,7 @@
* ftp.c:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: ftp.c,v 1.16 2003/04/30 09:11:13 gbazin Exp $
* $Id: ftp.c,v 1.17 2003/05/08 19:06:33 titer Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -64,12 +64,12 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static int Open ( vlc_object_t * );
static void Close ( vlc_object_t * );
static int Read ( input_thread_t * p_input, byte_t * p_buffer,
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len );
static void Seek ( input_thread_t *, off_t );
static void Seek ( input_thread_t *, off_t );
static ssize_t NetRead ( input_thread_t *, input_socket_t *, byte_t *, size_t );
......@@ -438,7 +438,7 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
vlc_mutex_unlock( &p_input->stream.stream_lock );
}
static int Read ( input_thread_t * p_input, byte_t * p_buffer,
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len )
{
access_t *p_access = (access_t*)p_input->p_access_data;
......@@ -454,13 +454,13 @@ static int ftp_SendCommand( input_thread_t *p_input, char *psz_fmt, ... )
access_t *p_access = (access_t*)p_input->p_access_data;
va_list args;
char *psz_buffer;
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
size_t i_size;
#endif
va_start( args, psz_fmt );
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined(SYS_BEOS)
vasprintf( &psz_buffer, psz_fmt, args );
#else
i_size = strlen( psz_fmt ) + 2048;
......
......@@ -2,7 +2,7 @@
* mmsh.c:
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmsh.c,v 1.2 2003/04/25 17:33:57 fenrir Exp $
* $Id: mmsh.c,v 1.3 2003/05/08 19:06:45 titer Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -75,9 +75,9 @@
int E_( MMSHOpen ) ( input_thread_t * );
void E_( MMSHClose ) ( input_thread_t * );
static int Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len );
static void Seek ( input_thread_t *, off_t );
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len );
static void Seek ( input_thread_t *, off_t );
/****************************************************************************
****************************************************************************
......@@ -432,8 +432,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
/*****************************************************************************
* Read:
*****************************************************************************/
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;
size_t i_copy;
......
......@@ -2,7 +2,7 @@
* mms.c: MMS access plug-in
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: mmstu.c,v 1.1 2003/04/20 19:29:43 fenrir Exp $
* $Id: mmstu.c,v 1.2 2003/05/08 19:06:45 titer Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -77,24 +77,24 @@ int E_( MMSTUOpen ) ( input_thread_t * );
void E_( MMSTUClose ) ( input_thread_t * );
static int Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len );
static void Seek ( input_thread_t *, off_t );
static ssize_t Read ( input_thread_t * p_input, byte_t * p_buffer,
size_t i_len );
static void Seek ( input_thread_t *, off_t );
static int MMSOpen( input_thread_t *, url_t *, int, char * );
static int MMSOpen( input_thread_t *, url_t *, int, char * );
static int MMSStart ( input_thread_t *, uint32_t );
static int MMSStop ( input_thread_t *p_input );
static int MMSStart ( input_thread_t *, uint32_t );
static int MMSStop ( input_thread_t *p_input );
static int MMSClose ( input_thread_t * );
static int MMSClose ( input_thread_t * );
static int mms_CommandRead( input_thread_t *p_input, int i_command1, int i_command2 );
static int mms_CommandSend( input_thread_t *, int, uint32_t, uint32_t, uint8_t *, int );
static int mms_CommandRead( input_thread_t *p_input, int i_command1, int i_command2 );
static int mms_CommandSend( input_thread_t *, int, uint32_t, uint32_t, uint8_t *, int );
static int mms_HeaderMediaRead( input_thread_t *, int );
static int mms_HeaderMediaRead( input_thread_t *, int );
static int mms_ReceivePacket( input_thread_t * );
static int mms_ReceivePacket( input_thread_t * );
//static void mms_ParseURL( url_t *p_url, char *psz_url );
......@@ -356,8 +356,8 @@ static void Seek( input_thread_t * p_input, off_t i_pos )
vlc_mutex_unlock( &p_input->stream.stream_lock );
}
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;
size_t i_data;
......
......@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.25 2003/05/07 02:31:20 fenrir Exp $
* $Id: libmp4.c,v 1.26 2003/05/08 19:06:46 titer Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -2565,7 +2565,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
MP4_Box_t *p_box, char *psz_fmt, va_list args)
{
char *psz_path;
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
size_t i_size;
#endif
......@@ -2575,7 +2575,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
return;
}
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined(SYS_BEOS)
vasprintf( &psz_path, psz_fmt, args );
#else
i_size = strlen( psz_fmt ) + 1024;
......
......@@ -2,7 +2,7 @@
* input_info.c: Convenient functions to handle the input info structures
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_info.c,v 1.9 2002/11/11 14:39:12 sam Exp $
* $Id: input_info.c,v 1.10 2003/05/08 19:06:46 titer Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -100,7 +100,7 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name,
/*
* Convert message to string
*/
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined(SYS_BEOS)
vasprintf( &psz_str, psz_format, args );
#else
psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
......
......@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: messages.c,v 1.30 2003/04/09 19:58:25 gbazin Exp $
* $Id: messages.c,v 1.31 2003/05/08 19:06:47 titer Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -251,14 +251,14 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
msg_item_t * p_item = NULL; /* pointer to message */
msg_item_t item; /* message in case of a full queue */
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
int i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE;
#endif
/*
* Convert message to string
*/
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN) && !defined( SYS_BEOS )
vasprintf( &psz_str, psz_format, args );
#else
psz_str = (char*) malloc( i_size * sizeof(char) );
......
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