From 991245b69c53b1e2f708af34b6f829182ebf5cf2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 18 Aug 2025 03:59:58 +0900 Subject: refactor: define va_start() as macro instead of special form --- include/stdarg.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/stdarg.h b/include/stdarg.h index 43138b6..bdc4101 100644 --- a/include/stdarg.h +++ b/include/stdarg.h @@ -3,7 +3,7 @@ // (With LP64 and ILP32 Programming Models) // Version 1.0 // Figure 3.34: va_list Type Declaration -struct __va_list__ { +struct __ducc_va_list { // unsigned int gp_offset; // unsigned int fp_offset; int gp_offset; @@ -12,9 +12,10 @@ struct __va_list__ { void* reg_save_area; }; // ducc currently does not support array type. -// typedef struct __va_list__ va_list[1]; -typedef struct __va_list__* va_list; +// typedef struct __ducc_va_list va_list[1]; +typedef struct __ducc_va_list* va_list; + +#define va_start(args, start) __ducc_va_start(args, start) -// va_start() is currently implemented as a special form due to the limitation of #define macro. void va_end(va_list args) { } -- cgit v1.2.3-70-g09d2