Просмотр исходного кода

Check for __va_copy, and use it, instead of a direct assignment, for broken
arches, like ppc.

Adam Heath лет назад: 25
Родитель
Сommit
c6485f0453
6 измененных файлов с 36 добавлено и 1 удалено
  1. 6 0
      ChangeLog
  2. 3 0
      acconfig.h
  3. 4 0
      config.h.bot
  4. 16 0
      configure.in
  5. 6 0
      debian/changelog
  6. 1 1
      lib/varbuf.c

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+Tue May  1 00:24:49 CDT 2001 Adam Heath <doogie@debian.org>
+
+  * acconfig.h, config.h.bot, configure.in, lib/varbuf.c, debian/changelog:
+    Check for __va_copy, and use it, instead of a direct assignment, for
+    broken arches, like ppc.
+  
 Mon Apr 30 17:34:47 CEST 2001 Wichert Akkerman <wakkerma@debian.org>
 
   * configure.in: remove last list reference.

+ 3 - 0
acconfig.h

@@ -62,3 +62,6 @@
 
 /* Define if start-stop-daemon is compiled */
 #undef USE_START_STOP_DAEMON
+
+/* Define if you have the __va_copy macro */
+#undef HAVE_VA_COPY

+ 4 - 0
config.h.bot

@@ -112,6 +112,10 @@ void unsetenv(const char *x);
 #define strtoul strtol
 #endif
 
+#ifndef HAVE_VA_COPY
+#define __va_copy(dest,src)	(dest) = (src)
+#endif
+
 /* Define WCOREDUMP if we don't have it already - coredumps won't be
  * detected, though.
  */

+ 16 - 0
configure.in

@@ -169,6 +169,22 @@ AC_TRY_COMPILE([
 AC_TRY_COMPILE(,[
 } inline int foo (int x) {], AC_DEFINE(HAVE_INLINE))
 
+AC_MSG_CHECKING([for __va_copy])
+AC_TRY_COMPILE([
+#include <stdarg.h>
+],[
+va_list v1,v2;
+__va_copy(v1, v2);
+], [AC_MSG_RESULT(yes)
+AC_DEFINE(HAVE_VA_COPY)],[AC_MSG_RESULT(no)
+AC_MSG_CHECKING([for va_list assignment copy])
+AC_TRY_COMPILE([
+#include <stdarg.h>
+],[
+va_list v1,v2;
+v1 = v2;
+], AC_MSG_RESULT(yes),AC_MSG_ERROR(no))])
+
 DPKG_CACHED_TRY_COMPILE(__attribute__((,,)),dpkg_cv_c_attribute_supported,,
  [extern int testfunction(int x) __attribute__((,,))],
  AC_MSG_RESULT(yes)

+ 6 - 0
debian/changelog

@@ -5,6 +5,12 @@ dpkg (1.10) unstable; urgency=low
 
  -- Wichert Akkerman <wakkerma@debian.org>  UNRELEASED
  
+dpkg (1.9.3) unstable; urgency=low
+
+  * Fix compiles on ppc. Closes: Bug#95918.
+
+ -- Adam Heath <doogie@debian.org>  Tue,  1 May 2001 00:29:45 -0500
+   
 dpkg (1.9.2) unstable; urgency=low
 
   * Recompile, to fix incorrect path 1.9.1/dpkg-divert. Closes: Bug#95845

+ 1 - 1
lib/varbuf.c

@@ -70,7 +70,7 @@ int varbufvprintf(struct varbuf *v, const char *fmt, va_list va) {
 
   do {
     varbufextend(v);
-    al= va;
+    __va_copy(al, va);
     r= vsnprintf(v->buf+ou,v->size-ou,fmt,al);
     if (r < 0) r= (v->size-ou+1) * 2;
     v->used= ou+r;