summary refs log tree commit diff stats
path: root/tinyc/win32/include/stdarg.h
diff options
context:
space:
mode:
Diffstat (limited to 'tinyc/win32/include/stdarg.h')
-rw-r--r--tinyc/win32/include/stdarg.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tinyc/win32/include/stdarg.h b/tinyc/win32/include/stdarg.h
new file mode 100644
index 000000000..a9b22b7b6
--- /dev/null
+++ b/tinyc/win32/include/stdarg.h
@@ -0,0 +1,16 @@
+#ifndef _STDARG_H
+#define _STDARG_H
+
+typedef char *va_list;
+
+/* only correct for i386 */
+#define va_start(ap,last) ap = ((char *)&(last)) + ((sizeof(last)+3)&~3)
+#define va_arg(ap,type) (ap += (sizeof(type)+3)&~3, *(type *)(ap - ((sizeof(type)+3)&~3)))
+#define va_copy(dest, src) (dest) = (src)
+#define va_end(ap)
+
+/* fix a buggy dependency on GCC in libio.h */
+typedef va_list __gnuc_va_list;
+#define _VA_LIST_DEFINED
+
+#endif