diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/snprintf.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/lib/snprintf.c b/source4/lib/snprintf.c index 1eae2f09b9..fd31870162 100644 --- a/source4/lib/snprintf.c +++ b/source4/lib/snprintf.c @@ -81,6 +81,15 @@ #include <stdlib.h> #endif +#ifndef VA_COPY +#ifdef HAVE_VA_COPY +#define VA_COPY(dest, src) __va_copy(dest, src) +#else +#define VA_COPY(dest, src) (dest) = (src) +#endif +#endif + + #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ #include <stdio.h> @@ -105,14 +114,6 @@ #define SAFE_FREE(x) do { if ((x) != NULL) {free((x)); (x)=NULL;} } while(0) #endif -#ifndef VA_COPY -#ifdef HAVE_VA_COPY -#define VA_COPY(dest, src) __va_copy(dest, src) -#else -#define VA_COPY(dest, src) (dest) = (src) -#endif -#endif - static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args_in); static void fmtstr(char *buffer, size_t *currlen, size_t maxlen, |