From: Todd C. Miller Date: Mon, 11 Nov 2013 21:35:10 +0000 (-0700) Subject: Move va_copy compat macro to missing.h X-Git-Tag: SUDO_1_8_9^2~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=702ec173ded59dc5cb98a348da4624aa9e4e3d5a;p=sudo Move va_copy compat macro to missing.h --- diff --git a/include/missing.h b/include/missing.h index c72f40d5e..8cdea34d0 100644 --- a/include/missing.h +++ b/include/missing.h @@ -99,6 +99,17 @@ # endif #endif +/* + * Pre-C99 compilers may lack a va_copy macro. + */ +#ifndef va_copy +# ifdef __va_copy +# define va_copy(d, s) __va_copy(d, s) +# else +# define va_copy(d, s) memcpy(&(d), &(s), sizeof(d)); +# endif +#endif + /* * Some systems lack full limit definitions. */ diff --git a/plugins/sudoers/logging.c b/plugins/sudoers/logging.c index 449eaee37..4cd4398f5 100644 --- a/plugins/sudoers/logging.c +++ b/plugins/sudoers/logging.c @@ -59,10 +59,6 @@ #include "sudoers.h" -#ifndef va_copy -# define va_copy(d, s) memcpy(&(d), &(s), sizeof(d)); -#endif - /* Special message for log_warning() so we know to use ngettext() */ #define INCORRECT_PASSWORD_ATTEMPT ((char *)0x01)