8sa1-gcc/gcc/ginclude/va-pa.h

39 lines
1.1 KiB
C
Raw Normal View History

1992-06-26 04:38:37 -04:00
#if __GNUC__ > 1
/* Define __gnuc_va_list. */
1992-06-26 04:38:37 -04:00
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef double *__gnuc_va_list;
1992-06-26 04:38:37 -04:00
#endif /* not __GNUC_VA_LIST */
/* If this is for internal libc use, don't define anything but
__gnuc_va_list. */
#if defined (_STDARG_H) || defined (_VARARGS_H)
#ifdef _STDARG_H
#define va_start(AP,LASTARG) ((AP) = (va_list)__builtin_saveregs())
1992-06-26 04:38:37 -04:00
#else
/* The ... causes current_function_varargs to be set in cc1. */
#define va_dcl long va_alist; ...
#define va_start(AP) ((AP) = (va_list)__builtin_saveregs())
#endif
#define va_arg(AP,TYPE) \
(sizeof(TYPE) > 8 ? \
((AP = (__gnuc_va_list) ((char *)AP - sizeof (int))), \
(*((TYPE *) (*((int *) (AP)))))) \
:((AP = \
(__gnuc_va_list) ((long)((char *)AP - sizeof (TYPE)) \
& (sizeof(TYPE) > 4 ? ~0x7 : ~0x3))), \
(*((TYPE *) ((char *)AP + ((8 - sizeof(TYPE)) % 4))))))
1992-06-26 04:38:37 -04:00
#define va_end(AP)
#endif /* defined (_STDARG_H) || defined (_VARARGS_H) */
#else /* not __GNUC__ > 1 */
#include "/usr/local/lib/gcc-include/va-hp9k8.h"
#define _VA_LIST_
#endif