/*	@(#)stdarg.h	13.2 (RC International) 12/12/90	*/

/* ------------------------------------------------------------------ */
/* | Copyright Unpublished, MIPS Computer Systems, Inc.  All Rights | */
/* | Reserved.  This software contains proprietary and confidential | */
/* | information of MIPS and its suppliers.  Use, disclosure or     | */
/* | reproduction is prohibited without the prior express written   | */
/* | consent of MIPS.                                               | */
/* ------------------------------------------------------------------ */
/* $Header: stdarg.h,v 2010.6.1.6 90/02/22 19:54:31 bettina Exp $ */
/*	@(#)stdarg.h	1.1	*/

/* 4.8 Variable arguments */

#ifndef _STDARG_H
#define _STDARG_H
 
typedef char *va_list;
#define va_end(list)

#ifdef host_mips

	/* va_start makes list point past the parmN */
#define va_start(list, parmN) (list = ((char *)&parmN + sizeof(parmN)))

        /* va_arg aligns list and points past data */
#define va_arg(list, mode) ((mode *)(list =\
 (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\
 (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1]

/*  +++++++++++++++++++++++++++++++++++++++++++
    Because of parameter passing conventions in C:
    use mode=int for char, and short types
    use mode=double for float types
    use a pointer for array types
    +++++++++++++++++++++++++++++++++++++++++++ */


#endif

#endif 
