summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--include/printf.h4
-rw-r--r--kern/printf.c7
3 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e861e1..7001f26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-11-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ [task #5726 --- ``GCC built-in functions'']
+ * include/printf.h (iprintf): Fix prototype.
+ (vprintf): Add prototype.
+ * kern/printf.c: Include `printf.h'.
+ (vprintf, printf): Fix prototype and return a dumb value.
+
2006-11-07 Barry deFreese <bddebian@comcast.net>
[task #5726 --- ``GCC built-in functions'']
diff --git a/include/printf.h b/include/printf.h
index e309d21..f5930dc 100644
--- a/include/printf.h
+++ b/include/printf.h
@@ -44,7 +44,9 @@ extern int sprintf (char *buf, const char *fmt, ...);
extern int printf (const char *fmt, ...);
extern int indent;
-extern int iprintf (const char *fmt, ...);
+extern void iprintf (const char *fmt, ...);
+
+extern int vprintf(const char *fmt, va_list listp);
#endif /* _MACH_SA_SYS_PRINTF_H_ */
diff --git a/kern/printf.c b/kern/printf.c
index a1f18b0..37543b3 100644
--- a/kern/printf.c
+++ b/kern/printf.c
@@ -114,6 +114,7 @@
*/
#include <string.h>
+#include <printf.h>
#include <mach/boolean.h>
#include <kern/lock.h>
#include <stdarg.h>
@@ -511,18 +512,20 @@ void _doprnt(
*/
extern void cnputc( char, /*not really*/vm_offset_t);
-void vprintf(const char *fmt, va_list listp)
+int vprintf(const char *fmt, va_list listp)
{
_doprnt(fmt, &listp, cnputc, 16, 0);
+ return 0;
}
/*VARARGS1*/
-void printf(const char *fmt, ...)
+int printf(const char *fmt, ...)
{
va_list listp;
va_start(listp, fmt);
vprintf(fmt, listp);
va_end(listp);
+ return 0;
}
int indent = 0;