2014-12-22 12:35:05 +01:00
|
|
|
#ifndef __c_stdarg_h
|
|
|
|
#define __c_stdarg_h
|
|
|
|
|
2014-12-26 14:24:28 +01:00
|
|
|
#if defined(__GNUC__)
|
|
|
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
typedef char * va_list;
|
|
|
|
|
2019-02-17 19:26:29 +01:00
|
|
|
#define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
|
2014-12-22 12:35:05 +01:00
|
|
|
|
|
|
|
#define va_start(ap,v) (ap = (va_list)&v + _INTSIZEOF(v))
|
|
|
|
#define va_arg(ap,t) (*(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)))
|
|
|
|
#define va_end(ap) (ap = (va_list)0)
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2014-12-26 14:24:28 +01:00
|
|
|
#endif
|
|
|
|
|
2014-12-22 12:35:05 +01:00
|
|
|
/* end of c_stdarg.h */
|