dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.147 2004/01/09 15:39:38 hartman Exp $
+dnl $Id: configure.ac,v 1.148 2004/01/09 18:32:03 gbazin Exp $
AC_INIT(vlc,0.7.1-cvs)
dnl Check for system libs needed
need_libc=false
-AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r)
+AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf asprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 if_nametoindex atoll getenv putenv setenv gmtime_r ctime_r)
dnl Check for usual libc functions
AC_CHECK_FUNCS(strdup strndup atof lseek)
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.100 2004/01/08 11:18:27 fenrir Exp $
+ * $Id: vlc_common.h,v 1.101 2004/01/09 18:32:03 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
# define vlc_vasprintf NULL
#endif
+#if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
+# define asprintf vlc_asprintf
+ VLC_EXPORT( int, vlc_asprintf, (char **, const char *, ... ) );
+#elif !defined(__PLUGIN__)
+# define vlc_asprintf NULL
+#endif
+
#ifndef HAVE_STRNDUP
# if defined(STRNDUP_IN_GNOME_H) && \
(defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main)||\
* libc.c: Extra libc function for some systems.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: libc.c,v 1.13 2004/01/08 11:36:40 jlj Exp $
+ * $Id: libc.c,v 1.14 2004/01/09 18:32:04 gbazin Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Samuel Hocevar <sam@zoy.org>
}
#endif
+/*****************************************************************************
+ * asprintf:
+ *****************************************************************************/
+#if !defined(HAVE_ASPRINTF) || defined(SYS_DARWIN) || defined(SYS_BEOS)
+int vlc_asprintf( char **strp, const char *fmt, ... )
+{
+ va_list args;
+ va_start( args, fmt );
+ vasprintf( strp, fmt, args );
+ va_end( args );
+}
+#endif
+
/*****************************************************************************
* atof: convert a string to a double.
*****************************************************************************/