Browse Source

Add our own trivial version of stdarg.h. This makes our build

entirely self-hosted (which avoids problems when building the same
tree on multiple systems - e.g. when you have /home NFS-mounted).

Also saves around 50 bytes in total - not sure why.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
1ae549b892
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      src/arch/i386/include/stdarg.h

+ 22
- 0
src/arch/i386/include/stdarg.h View File

@@ -0,0 +1,22 @@
1
+#ifndef _STDARG_H
2
+#define _STDARG_H
3
+
4
+typedef void * va_list;
5
+
6
+#define va_start( ap, last ) do {	\
7
+		ap = ( &last + 1 );	\
8
+	} while ( 0 )
9
+
10
+#define va_arg( ap, type ) ({		\
11
+		type *_this = ap;	\
12
+		ap = ( _this + 1 );	\
13
+		*(_this);		\
14
+	})
15
+
16
+#define va_end( ap ) do { } while ( 0 )
17
+
18
+#define va_copy( dest, src ) do {	\
19
+		dest = src;		\
20
+	} while ( 0 )
21
+
22
+#endif /* _STDARG_H */

Loading…
Cancel
Save