code: plan9front

Download patch

ref: f7a296922b2616ddd5c3d753d4f0f165a2ea5215
parent: 6d9a739ab64ff1c33b336569708e2736957bcaf9
author: adventuresin9 <adventuresin9@gmail.com>
date: Mon Mar 6 23:20:38 EST 2023

/spim/include/ape/stdarg.h: ape for spim

--- /dev/null
+++ b/spim/include/ape/stdarg.h
@@ -1,0 +1,12 @@
+#ifndef __STDARG
+#define __STDARG
+
+typedef char *va_list;
+
+#define va_start(list, start) list = (char *)(&(start)+1)
+#define va_end(list)
+#define va_arg(list, mode) (sizeof(mode)==1 ? ((mode *) (list += 4))[-4] : \
+sizeof(mode)==2 ? ((mode *) (list += 4))[-2] : ((mode *) (list += sizeof(mode)))[-1])
+#define va_copy(dst, src) ((dst) = (src))
+
+#endif /* __STDARG */