From 6acb2490ded2d5f0145c40130dfe09f9243fdf11 Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Sat, 20 Sep 2003 00:57:39 +0000 Subject: [PATCH] * lib/varbuf.c, configure.in: Fix va_copy detection. * scripts/dpkg-buildpackage.sh: Back out debian/rules build-arch detection. It is *not* possible *at all* to detect available targets in a rules file. Period. --- ChangeLog | 7 +++++++ configure.in | 10 +++++----- debian/changelog | 4 ++++ lib/varbuf.c | 6 +----- scripts/dpkg-buildpackage.sh | 6 ++---- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c8dcf6c..4512eac8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Sep 19 19:56:48 CDT 2003 Adam Heath + + * lib/varbuf.c, configure.in: Fix va_copy detection. + * scripts/dpkg-buildpackage.sh: Back out debian/rules build-arch + detection. It is *not* possible *at all* to detect available targets + in a rules file. Period. + Fri Sep 19 12:26:54 CDT 2003 Adam Heath * scripts/{controllib,dpkg-{source,checkbuilddeps,control}}.pl: diff --git a/configure.in b/configure.in index 477973a5..f729bccd 100644 --- a/configure.in +++ b/configure.in @@ -207,18 +207,18 @@ AC_TRY_COMPILE([ AC_TRY_COMPILE(,[ } inline int foo (int x) {], AC_DEFINE(HAVE_INLINE,,[Define if inline functions a la GCC are available.])) -AC_MSG_CHECKING([for __va_copy]) -# OpenBSD passes AC_TRY_COMPILE for __va_copy even though +AC_MSG_CHECKING([for va_copy]) +# OpenBSD passes AC_TRY_COMPILE for va_copy even though # it doesn't seem to exist, which is odd. We need to use # AC_TRY_RUN. AC_TRY_RUN([ #include main(){ va_list v1,v2; -__va_copy(v1, v2); +va_copy(v1, v2); exit(0);} ], [AC_MSG_RESULT(yes) -AC_DEFINE(HAVE_VA_COPY)],[AC_MSG_RESULT(no) +AC_DEFINE(HAVE_VA_COPY,,[Whether the va_copy macro exists])],[AC_MSG_RESULT(no) AC_MSG_CHECKING([for va_list assignment copy]) AC_TRY_COMPILE([ #include @@ -407,7 +407,7 @@ void unsetenv(const char *x); #endif #ifndef HAVE_VA_COPY -#define __va_copy(dest,src) (dest) = (src) +#define va_copy(dest,src) (dest) = (src) #endif /* Define WCOREDUMP if we don't have it already - coredumps won't be diff --git a/debian/changelog b/debian/changelog index bd4bac50..1361c2ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ dpkg (1.10.15) unstable; urgency=low + * Fix detection of va_copy. + * Back out debian/rules build-arch detection. It is *not* possible *at + all* to detect available targets in a rules file. Period. + -- Adam Heath UNRELEASED dpkg (1.10.14) unstable; urgency=low diff --git a/lib/varbuf.c b/lib/varbuf.c index 41fbb0d4..1831d92e 100644 --- a/lib/varbuf.c +++ b/lib/varbuf.c @@ -27,10 +27,6 @@ #include #include -#ifndef HAVE_VA_COPY -#define __va_copy(dest,src) (dest) = (src) -#endif - inline void varbufaddc(struct varbuf *v, int c) { if (v->used >= v->size) varbufextend(v); v->buf[v->used++]= c; @@ -74,7 +70,7 @@ int varbufvprintf(struct varbuf *v, const char *fmt, va_list va) { do { varbufextend(v); - __va_copy(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; diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index a6302a0d..37c8f9f9 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -60,7 +60,6 @@ signchanges='withecho signfile' cleansource=false checkbuilddep=true checkbuilddep_args='' -buildtarget=build binarytarget=binary sourcestyle='' version='' @@ -71,7 +70,6 @@ noclean=false usepause=false warnable_error=0 passopts='' -debian/rules -qn build-arch 2>/dev/null && buildarchavailable=true || buildarchavailable=false while [ $# != 0 ] do @@ -99,7 +97,7 @@ do -nc) noclean=true; if [ -z "$binaryonly" ]; then binaryonly=-b; fi ;; -b) binaryonly=-b; [ "$sourceonly" ] && \ { echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;; - -B) binaryonly=-B; binarytarget=binary-arch; if $buildarchavailable; then checkbuilddep_args=-B; fi; [ "$sourceonly" ] && \ + -B) binaryonly=-B; checkbuilddep_args=-B; binarytarget=binary-arch; [ "$sourceonly" ] && \ { echo >&2 "$progname: cannot combine $1 and -S" ; exit 2 ; } ;; -S) sourceonly=-S; checkbuilddep=false; [ "$binaryonly" ] && \ { echo >&2 "$progname: cannot combine $binaryonly and $1" ; exit 2 ; } ;; @@ -198,7 +196,7 @@ if [ x$binaryonly = x ]; then cd ..; withecho dpkg-source $passopts $diffignore $tarignore -b "$dirn"; cd "$dirn" fi if [ x$sourceonly = x ]; then - withecho debian/rules $buildtarget + withecho debian/rules build withecho $rootcommand debian/rules $binarytarget fi if [ "$usepause" = "true" ] && \ -- 2.39.5