tinycc/stdarg.h

16 lines
391 B
C
Raw Normal View History

2001-11-11 02:54:21 +00:00
#ifndef _STDARG_H
#define _STDARG_H
typedef char *va_list;
/* only correct for i386 */
2001-11-11 18:01:29 +00:00
/* XXX: incorrect for type size different than 4 bytes*/
#define va_start(ap,last) ap = ((char *)&(last)) + sizeof(int);
#define va_arg(ap,type) (ap += sizeof(int), *(type *)(ap - sizeof(int)))
2001-11-11 02:54:21 +00:00
#define va_end(ap)
2001-11-11 18:01:29 +00:00
/* fix a buggy dependency on GCC in libio.h */
typedef va_list __gnuc_va_list;
2001-11-11 02:54:21 +00:00
#endif