X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/0f72c2ef41fe9a9307ae23e06586eef5392dd720..444224859ea03f9c74f07748b8a74f308764a211:/usr/src/include/stdarg.h diff --git a/usr/src/include/stdarg.h b/usr/src/include/stdarg.h index 9b3ce5a623..0bd863a7f7 100644 --- a/usr/src/include/stdarg.h +++ b/usr/src/include/stdarg.h @@ -4,26 +4,12 @@ * * %sccs.include.redist.c% * - * @(#)stdarg.h 5.2 (Berkeley) %G% + * @(#)stdarg.h 5.6 (Berkeley) %G% */ -typedef char *va_list; +#ifndef _STDARG_H +#define _STDARG_H -/* - * ANSI says: "If there is no actual next argument, or if type is not - * compatible with the type of the actual next argument (as promoted - * according to the default argument promotions), the behavior is - * undefined." We read this to mean that we're not allowed to do the - * promotion for the user, so shorts and chars drop core. - */ -#define va_arg(ap, type) \ - ((type *)(ap += sizeof(type) < sizeof(int) ? \ - abort() : sizeof(type)))[-1] - -#define va_end(ap) - -#define __va_promote(type) \ - (((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) +#include -#define va_start(ap, last) \ - (ap = ((char *)&(last) + __va_promote(last))) +#endif /* !_STDARG_H */