浏览代码

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 年前
父节点
当前提交
adf6c8e2a6
共有 1 个文件被更改,包括 22 次插入0 次删除
  1. 22
    0
      src/arch/i386/include/stdarg.h

+ 22
- 0
src/arch/i386/include/stdarg.h 查看文件

@@ -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 */

正在加载...
取消
保存