Move va_copy compat macro to missing.h

This commit is contained in:
Todd C. Miller
2013-11-11 14:35:10 -07:00
parent 87e1ae76af
commit 702ec173de
2 changed files with 11 additions and 4 deletions

View File

@@ -99,6 +99,17 @@
# endif # endif
#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. * Some systems lack full limit definitions.
*/ */

View File

@@ -59,10 +59,6 @@
#include "sudoers.h" #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() */ /* Special message for log_warning() so we know to use ngettext() */
#define INCORRECT_PASSWORD_ATTEMPT ((char *)0x01) #define INCORRECT_PASSWORD_ATTEMPT ((char *)0x01)