]> git.sesse.net Git - vlc/commitdiff
Do not use vasprintf under Mac OS X because OS X.1 doesn't have that (how
authorChristophe Massiot <massiot@videolan.org>
Thu, 10 Oct 2002 22:46:20 +0000 (22:46 +0000)
committerChristophe Massiot <massiot@videolan.org>
Thu, 10 Oct 2002 22:46:20 +0000 (22:46 +0000)
lame...).

modules/demux/mp4/libmp4.c
src/input/input_info.c
src/misc/messages.c

index 68ab9ff80bed18e5658a189c5b9de7fa61c8e7e9..ca340618106892272bc46a5cdba802c1fbabfcb9 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.c : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: libmp4.c,v 1.6 2002/09/18 23:34:28 fenrir Exp $
+ * $Id: libmp4.c,v 1.7 2002/10/10 22:46:20 massiot Exp $
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  * 
  * This program is free software; you can redistribute it and/or modify
@@ -2390,7 +2390,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
                           MP4_Box_t *p_box, char *psz_fmt, va_list args)
 {
     char    *psz_path;
-#ifndef HAVE_VASPRINTF
+#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
     int     i_size;
 #endif
 
@@ -2401,7 +2401,7 @@ static void __MP4_BoxGet( MP4_Box_t **pp_result,
         return;
     }
 
-#ifdef HAVE_VASPRINTF
+#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
     vasprintf( &psz_path, psz_fmt, args );
 #else
     i_size = strlen( psz_fmt ) + 1024;
index 40ee191894d8be6c7923f58d6dd3b8e77b52559f..9f166351d52e1fa2355256ef2c666bb0ee9737d2 100644 (file)
@@ -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.5 2002/08/18 13:16:51 sigmunau Exp $
+ * $Id: input_info.c,v 1.6 2002/10/10 22:46:20 massiot Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -103,7 +103,7 @@ int input_AddInfo( input_info_category_t * p_category, char * psz_name,
     /*
      * Convert message to string
      */
-#ifdef HAVE_VASPRINTF
+#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
     vasprintf( &psz_str, psz_format, args );
 #else
     psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
index c1f137cd33dfdacc082077038ef74911751c1fc1..79cbdf0769f730a9cfae1fadc1a57c41fb3c1d8f 100644 (file)
@@ -4,7 +4,7 @@
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.13 2002/10/08 18:10:10 sam Exp $
+ * $Id: messages.c,v 1.14 2002/10/10 22:46:20 massiot Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -259,14 +259,14 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
 #ifdef WIN32
     char *       psz_temp;
 #endif
-#ifndef HAVE_VASPRINTF
+#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
     int          i_size = strlen(psz_format) + INTF_MAX_MSG_SIZE;
 #endif
 
     /*
      * Convert message to string
      */
-#ifdef HAVE_VASPRINTF
+#if defined(HAVE_VASPRINTF) && !defined(SYS_DARWIN)
     vasprintf( &psz_str, psz_format, args );
 #else
     psz_str = (char*) malloc( i_size * sizeof(char) );
@@ -281,7 +281,7 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
         return;
     }
 
-#ifndef HAVE_VASPRINTF
+#if !defined(HAVE_VASPRINTF) || defined(SYS_DARWIN)
 #   ifdef WIN32
     psz_temp = ConvertPrintfFormatString( psz_format );
     if( !psz_temp )