aboutsummaryrefslogtreecommitdiff
path: root/stdarg.h
diff options
context:
space:
mode:
authorbellard <bellard>2001-11-11 18:01:29 +0000
committerbellard <bellard>2001-11-11 18:01:29 +0000
commiteb0e3e70dcb42dd60122158e1b9dbdcd0fac3a3e (patch)
treeb8eaf1e4989bd4627c43cf639019e9572524644c /stdarg.h
parent605a028bf4454b4c31a6f6b13b78e9974cdfd9c0 (diff)
downloadtinycc-eb0e3e70dcb42dd60122158e1b9dbdcd0fac3a3e.tar.gz
tinycc-eb0e3e70dcb42dd60122158e1b9dbdcd0fac3a3e.tar.bz2
update
Diffstat (limited to 'stdarg.h')
-rw-r--r--stdarg.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/stdarg.h b/stdarg.h
index 67b9c71..5e5d028 100644
--- a/stdarg.h
+++ b/stdarg.h
@@ -4,8 +4,12 @@
typedef char *va_list;
/* only correct for i386 */
-#define va_start(ap,last) ap=(char *)&(last);
-#define va_arg(ap,type) (ap-=sizeof (type), *(type *)(ap))
+/* XXX: incorrect for type size different than 4 bytes*/
+#define va_start(ap,last) ap = ((char *)&(last)) + sizeof(int);
+#define va_arg(ap,type) (ap += sizeof(int), *(type *)(ap - sizeof(int)))
#define va_end(ap)
+/* fix a buggy dependency on GCC in libio.h */
+typedef va_list __gnuc_va_list;
+
#endif