The following commit has been merged in the master branch:
commit 7e8415be3f31884f3fb2c99ef9255344b67bec21
Author: Guillem Jover <[email protected]>
Date: Tue Sep 29 13:47:46 2009 +0200
build: Use memcpy instead of assignment to copy va_list
It's more portable that way. Remove now unneeded check for working
assignment.
diff --git a/lib/compat/compat.h b/lib/compat/compat.h
index 3af717d..7e99d05 100644
--- a/lib/compat/compat.h
+++ b/lib/compat/compat.h
@@ -44,7 +44,8 @@ extern "C" {
#endif
#ifndef HAVE_VA_COPY
-#define va_copy(dest, src) (dest) = (src)
+#include <string.h>
+#define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))
#endif
#include <strnlen.h>
diff --git a/m4/funcs.m4 b/m4/funcs.m4
index e1e48e1..4c2dd6b 100644
--- a/m4/funcs.m4
+++ b/m4/funcs.m4
@@ -19,16 +19,7 @@ exit (0);
[dpkg_cv_va_copy=no])])
AS_IF([test "x$dpkg_cv_va_copy" = "xyes"],
[AC_DEFINE([HAVE_VA_COPY], 1,
- [Define to 1 if the 'va_copy' macro exists])],
- [AC_CACHE_CHECK([for va_list assignment by copy],
- [dpkg_cv_va_list_copy],
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
-[[#include <stdarg.h>]],
-[[va_list v1, v2;
-v1 = v2;
-]])],
- [dpkg_cv_va_list_copy=yes],
- [dpkg_cv_va_list_copy=no])])])
+ [Define to 1 if the 'va_copy' macro exists])])
])# DPKG_FUNC_VA_COPY
# DPKG_CHECK_COMPAT_FUNCS(LIST)
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]