[vlc-commits] Remove redumdant vlc_va_copy() and checks
Rémi Denis-Courmont
git at videolan.org
Thu Aug 18 21:57:02 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 18 22:55:43 2011 +0300| [def059402926f82c9d2474a0a0e2feb95e7c644a] | committer: Rémi Denis-Courmont
Remove redumdant vlc_va_copy() and checks
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=def059402926f82c9d2474a0a0e2feb95e7c644a
---
configure.ac | 20 --------------------
src/misc/messages.c | 20 ++------------------
2 files changed, 2 insertions(+), 38 deletions(-)
diff --git a/configure.ac b/configure.ac
index 242eb09..063ca37 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
diff --git a/src/misc/messages.c b/src/misc/messages.c
index dfc9ff6..c6bcf4a 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -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);
More information about the vlc-commits
mailing list