1 /* $NetBSD: compat_va_copy.h,v 1.1.1.1 2014/07/06 19:27:57 tron Exp $ */ 2 3 #ifndef _COMPAT_VA_COPY_H_INCLUDED_ 4 #define _COMPAT_VA_COPY_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* compat_va_copy 3h 9 /* SUMMARY 10 /* compatibility 11 /* SYNOPSIS 12 /* #include <compat_va_copy.h> 13 /* DESCRIPTION 14 /* .nf 15 16 /* 17 * C99 defines va_start and va_copy as macros, so we can probe the 18 * compilation environment with #ifdef etc. Some environments define 19 * __va_copy so we probe for that, too. 20 */ 21 #if !defined(va_start) 22 #error "include <stdarg.h> first" 23 #endif 24 25 #if !defined(VA_COPY) 26 #if defined(va_copy) 27 #define VA_COPY(dest, src) va_copy(dest, src) 28 #elif defined(__va_copy) 29 #define VA_COPY(dest, src) __va_copy(dest, src) 30 #else 31 #define VA_COPY(dest, src) (dest) = (src) 32 #endif 33 #endif /* VA_COPY */ 34 35 /* LICENSE 36 /* .ad 37 /* .fi 38 /* The Secure Mailer license must be distributed with this software. 39 /* AUTHOR(S) 40 /* Wietse Venema 41 /* IBM T.J. Watson Research 42 /* P.O. Box 704 43 /* Yorktown Heights, NY 10598, USA 44 /*--*/ 45 46 #endif 47