Update to varargs/stdarg implementation; conform to the SVR4 calling
convention.
This commit is contained in:
parent
d78ae3859a
commit
88e2d78a5c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ansi.h,v 1.2 1996/11/15 22:38:57 jtc Exp $ */
|
||||
/* $NetBSD: ansi.h,v 1.3 1997/04/16 22:51:22 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -52,8 +52,15 @@
|
||||
#define _BSD_SIZE_T_ unsigned int /* sizeof() */
|
||||
#define _BSD_SSIZE_T_ int /* byte count or error */
|
||||
#define _BSD_TIME_T_ long /* time() */
|
||||
struct __gnuc_va_list__;
|
||||
|
||||
/*
|
||||
* Actually va_list is an array, but this wouldn't work as a #define.
|
||||
* Fortunately this is used only for formal parameters,
|
||||
* so we can use a pointer instead.
|
||||
*/
|
||||
struct __gnuc_va_list__; /* forward declaration to prohibit gcc warning XXX */
|
||||
#define _BSD_VA_LIST_ struct __gnuc_va_list__ * /* va_list */
|
||||
|
||||
#define _BSD_CLOCKID_T_ int
|
||||
#define _BSD_TIMER_T_ int
|
||||
|
||||
|
@ -17,7 +17,7 @@ typedef struct __gnuc_va_list__ {
|
||||
char *overflow_arg_area; /* location on stack that holds the next
|
||||
overflow argument */
|
||||
char *reg_save_area; /* where r3:r10 and f1:f8, if saved are stored */
|
||||
} *__gnuc_va_list;
|
||||
} __gnuc_va_list[1];
|
||||
#endif /* not __GNUC_VA_LIST */
|
||||
|
||||
/* If this is for internal libc use, don't define anything but
|
||||
@ -59,7 +59,6 @@ typedef struct {
|
||||
#define __va_start_common(AP, FAKE) \
|
||||
__extension__ ({ \
|
||||
register int __words = __va_words - FAKE; \
|
||||
(AP) = (__gnuc_va_list)__builtin_alloca(sizeof(__gnuc_va_list *)); \
|
||||
\
|
||||
(AP)->gpr = (__words < 8) ? __words : 8; \
|
||||
(AP)->fpr = __va_fregno - 33; \
|
||||
|
Loading…
Reference in New Issue
Block a user