From 085f9b4de880efef92ae5a678c16fa8f05c8a579 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 21 Dec 2025 19:05:16 -0500 Subject: usr: sdk: Add sdk/stdarg.h Signed-off-by: Ian Moffett --- usr/sdk/inc/sdk/stdarg.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 usr/sdk/inc/sdk/stdarg.h (limited to 'usr') diff --git a/usr/sdk/inc/sdk/stdarg.h b/usr/sdk/inc/sdk/stdarg.h new file mode 100644 index 0000000..09c538f --- /dev/null +++ b/usr/sdk/inc/sdk/stdarg.h @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025, Ian Moffett. + * Provided under the BSD-3 clause. + */ + +#ifndef _LIB_STDARG_H_ +#define _LIB_STDARG_H_ 1 + +#ifndef __GNUC_VA_LIST +#define __GNUC_VA_LIST +typedef __builtin_va_list __gnuc_va_list; +#endif /* __GNUC_VA_LIST */ + +typedef __gnuc_va_list va_list; + +#define va_start(ap, last) __builtin_va_start((ap), last) +#define va_end(ap) __builtin_va_end((ap)) +#define va_arg(ap, type) __builtin_va_arg((ap), type) + +#endif /* !_LIB_STDARG_H_ */ -- cgit v1.2.3