summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-snprintf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-07-15 14:48:30 +1000
committerDarren Tucker <dtucker@zip.com.au>2016-07-15 14:54:16 +1000
commit5abfb15ced985c340359ae7fb65a625ed3692b3e (patch)
treebcde17550f213403000237c99a541ec43cae38b1 /openbsd-compat/bsd-snprintf.c
parent832b7443b7a8e181c95898bc5d73497b7190decd (diff)
Move VA_COPY macro into compat header.
Some AIX compilers unconditionally undefine va_copy but don't set it back to an internal function, causing link errors. In some compat code we already use VA_COPY instead so move the two existing instances into the shared header and use for sshbuf-getput-basic.c too. Should fix building with at lease some versions of AIX's compiler. bz#2589, ok djm@
Diffstat (limited to 'openbsd-compat/bsd-snprintf.c')
-rw-r--r--openbsd-compat/bsd-snprintf.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index 23a635989..d95b6a401 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -99,18 +99,6 @@
99# undef HAVE_VSNPRINTF 99# undef HAVE_VSNPRINTF
100#endif 100#endif
101 101
102#ifndef VA_COPY
103# ifdef HAVE_VA_COPY
104# define VA_COPY(dest, src) va_copy(dest, src)
105# else
106# ifdef HAVE___VA_COPY
107# define VA_COPY(dest, src) __va_copy(dest, src)
108# else
109# define VA_COPY(dest, src) (dest) = (src)
110# endif
111# endif
112#endif
113
114#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) 102#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
115 103
116#include <ctype.h> 104#include <ctype.h>