Commit def05940 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove redumdant vlc_va_copy() and checks

parent 67fc58a5
......@@ -646,26 +646,6 @@ LIBS_save="${LIBS}"
AC_SEARCH_LIBS([getaddrinfo], [nsl],,, [${SOCKET_LIBS}])
LIBS="${LIBS_save}"
dnl Check for va_copy
AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
AC_TRY_LINK(
[#include <stdarg.h>],
[va_list ap1, ap2; va_copy(ap1,ap2);],
[ac_cv_c_va_copy="yes"],
[ac_cv_c_va_copy="no"]))
if test "${ac_cv_c_va_copy}" = "yes"; then
AC_DEFINE(HAVE_VA_COPY, 1, [Define if <stdarg.h> defines va_copy.])
fi
AC_CACHE_CHECK([for __va_copy], ac_cv_c___va_copy,
AC_TRY_LINK(
[#include <stdarg.h>],
[va_list ap1, ap2; __va_copy(ap1,ap2);],
[ac_cv_c___va_copy="yes"],
[ac_cv_c___va_copy="no"]))
if test "${ac_cv_c___va_copy}" = "yes"; then
AC_DEFINE(HAVE___VA_COPY, 1, [Define if <stdarg.h> defines __va_copy.])
fi
AC_CHECK_FUNCS(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,[
VLC_ADD_LIBS([libvlccore],[-lresolv])
......
......@@ -55,17 +55,6 @@
#include <vlc_charset.h>
#include "../libvlc.h"
/*****************************************************************************
* Local macros
*****************************************************************************/
#if defined(HAVE_VA_COPY)
# define vlc_va_copy(dest,src) va_copy(dest,src)
#elif defined(HAVE___VA_COPY)
# define vlc_va_copy(dest,src) __va_copy(dest,src)
#else
# define vlc_va_copy(dest,src) (dest)=(src)
#endif
static inline msg_bank_t *libvlc_bank (libvlc_int_t *inst)
{
return (libvlc_priv (inst))->msg_bank;
......@@ -251,12 +240,9 @@ void msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
* is full). If the message can't be converted to string in memory, it issues
* a warning.
*/
void msg_GenericVa (vlc_object_t *p_this, int i_type,
const char *psz_module,
const char *psz_format, va_list _args)
void msg_GenericVa (vlc_object_t *p_this, int i_type, const char *psz_module,
const char *psz_format, va_list args)
{
va_list args;
assert (p_this);
if( p_this->i_flags & OBJECT_FLAGS_QUIET )
......@@ -328,10 +314,8 @@ void msg_GenericVa (vlc_object_t *p_this, int i_type,
static const char nomemstr[] = "<not enough memory to format message>";
char *str;
vlc_va_copy( args, _args );
if (unlikely(vasprintf (&str, psz_format, args) == -1))
str = (char *)nomemstr;
va_end( args );
uselocale (locale);
freelocale (c);
......
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