Bugzilla – Attachment 2842 Details for
Bug 2589
errors show when build openssh 6.7p1 on AIX 5.3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
move VA_COPY into openbsd-compat.h and use in sshbuf-getput-basic.c
openssh-aix-va_copy.patch (text/plain), 2.57 KB, created by
Darren Tucker
on 2016-06-20 13:53:08 AEST
(
hide
)
Description:
move VA_COPY into openbsd-compat.h and use in sshbuf-getput-basic.c
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2016-06-20 13:53:08 AEST
Size:
2.57 KB
patch
obsolete
>diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c >index 3368195..7b83448 100644 >--- a/openbsd-compat/bsd-asprintf.c >+++ b/openbsd-compat/bsd-asprintf.c >@@ -25,18 +25,6 @@ > #include <stdarg.h> > #include <stdlib.h> > >-#ifndef VA_COPY >-# ifdef HAVE_VA_COPY >-# define VA_COPY(dest, src) va_copy(dest, src) >-# else >-# ifdef HAVE___VA_COPY >-# define VA_COPY(dest, src) __va_copy(dest, src) >-# else >-# define VA_COPY(dest, src) (dest) = (src) >-# endif >-# endif >-#endif >- > #define INIT_SZ 128 > > int >diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c >index 23a6359..d95b6a4 100644 >--- a/openbsd-compat/bsd-snprintf.c >+++ b/openbsd-compat/bsd-snprintf.c >@@ -99,18 +99,6 @@ > # undef HAVE_VSNPRINTF > #endif > >-#ifndef VA_COPY >-# ifdef HAVE_VA_COPY >-# define VA_COPY(dest, src) va_copy(dest, src) >-# else >-# ifdef HAVE___VA_COPY >-# define VA_COPY(dest, src) __va_copy(dest, src) >-# else >-# define VA_COPY(dest, src) (dest) = (src) >-# endif >-# endif >-#endif >- > #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) > > #include <ctype.h> >diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h >index 8cc8a11..02b8891 100644 >--- a/openbsd-compat/openbsd-compat.h >+++ b/openbsd-compat/openbsd-compat.h >@@ -235,6 +235,23 @@ long long strtonum(const char *, long long, long long, const char **); > # include <stdarg.h> > #endif > >+/* >+ * Some platforms unconditionally undefine va_copy() so we define VA_COPY() >+ * instead. This is known to be the case on at least some configurations of >+ * AIX with the xlc compiler. >+ */ >+#ifndef VA_COPY >+# ifdef HAVE_VA_COPY >+# define VA_COPY(dest, src) va_copy(dest, src) >+# else >+# ifdef HAVE___VA_COPY >+# define VA_COPY(dest, src) __va_copy(dest, src) >+# else >+# define VA_COPY(dest, src) (dest) = (src) >+# endif >+# endif >+#endif >+ > #ifndef HAVE_VASPRINTF > int vasprintf(char **, const char *, va_list); > #endif >diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c >index 23e0fd7..eb63490 100644 >--- a/sshbuf-getput-basic.c >+++ b/sshbuf-getput-basic.c >@@ -268,7 +268,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap) > int r, len; > u_char *p; > >- va_copy(ap2, ap); >+ VA_COPY(ap2, ap); > if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) { > r = SSH_ERR_INVALID_ARGUMENT; > goto out; >@@ -278,7 +278,7 @@ sshbuf_putfv(struct sshbuf *buf, const char *fmt, va_list ap) > goto out; /* Nothing to do */ > } > va_end(ap2); >- va_copy(ap2, ap); >+ VA_COPY(ap2, ap); > if ((r = sshbuf_reserve(buf, (size_t)len + 1, &p)) < 0) > goto out; > if ((r = vsnprintf((char *)p, len + 1, fmt, ap2)) != len) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2589
:
2830
|
2831
|
2833
|
2835
| 2842