1 /* 2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 #pragma ident "%Z%%M% %I% %E% SMI" 6 7 8 /* 9 * What follows is an attempt to unify varargs.h and stdarg.h. I'd rather 10 * have this than #ifdefs all over the code. 11 */ 12 13 #ifdef __STDC__ 14 #include <stdarg.h> 15 #define VARARGS(func,type,arg) func(type arg, ...) 16 #define VASTART(ap,type,name) va_start(ap,name) 17 #define VAEND(ap) va_end(ap) 18 #else 19 #include <varargs.h> 20 #define VARARGS(func,type,arg) func(va_alist) va_dcl 21 #define VASTART(ap,type,name) {type name; va_start(ap); name = va_arg(ap, type) 22 #define VAEND(ap) va_end(ap);} 23 #endif 24 25 extern char *percent_m(); 26