Rename printk() to printf().
[pintos-anon] / src / lib / stdarg.h
diff --git a/src/lib/stdarg.h b/src/lib/stdarg.h
new file mode 100644 (file)
index 0000000..690bb28
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef LIB_STDARG_H
+#define LIB_STDARG_H
+
+/* GCC has <stdarg.h> functionality as built-ins,
+   so all we need is to use it. */
+
+typedef __builtin_va_list va_list;
+
+#define va_start(LIST, ARG)    __builtin_va_start (LIST, ARG)
+#define va_end(LIST)            __builtin_va_end (LIST)
+#define va_arg(LIST, TYPE)     __builtin_va_arg (LIST, TYPE)
+#define va_copy(DST, SRC)      __builtin_va_copy (DST, SRC)
+
+#endif /* lib/stdarg.h */