summaryrefslogtreecommitdiff
path: root/nuttx/configs/rgmp/include/stdarg.h
blob: 8f879a819ebf27967be670d36c96e75e9a261655 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef _RGMP_STDARG_H
#define	_RGMP_STDARG_H

typedef char *va_list;

#define	__va_size(type) \
	(((sizeof(type) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))

#ifndef va_start
#define	va_start(ap, last) \
	((ap) = (va_list)&(last) + __va_size(last))
#endif

#ifndef va_arg
#define	va_arg(ap, type) \
	(*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
#endif

#ifndef va_end
#define	va_end(ap)	((void)0)
#endif

#endif