@@ -84,6 +84,7 @@ OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o
second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o \
second/iso_util.o \
+ lib/nonstd.o \
lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
ifeq ($(USE_MD5_PASSWORDS),y)
new file mode 100644
@@ -0,0 +1,16 @@
+/* Copyright */
+
+#ifndef NONSTD_H
+#define NONSTD_H
+
+typedef int FILE;
+
+extern FILE *stdout;
+
+int printf(const char *format, ...);
+int fprintf(FILE *stream, const char *format, ...);
+int fputs(const char *s, FILE *stream);
+int fflush(FILE *stream);
+char *getenv(const char *name);
+
+#endif
new file mode 100644
@@ -0,0 +1,49 @@
+/* Copyright */
+
+
+#include "ctype.h"
+#include "types.h"
+#include "stddef.h"
+#include "stdlib.h"
+#include "ctype.h"
+#include "prom.h"
+#include "nonstd.h"
+
+FILE *stdout;
+
+int printf(const char *format, ...)
+{
+ va_list ap;
+ va_start (ap, format);
+ prom_vfprintf (prom_stdout, format, ap);
+ va_end (ap);
+
+ return 0;
+}
+
+int fprintf(FILE *stream, const char *format, ...)
+{
+ va_list ap;
+ va_start (ap, format);
+ prom_vfprintf (prom_stdout, format, ap);
+ va_end (ap);
+
+ return 0;
+}
+
+int fputs(const char *s, FILE *stream)
+{
+ prom_printf("%s", s);
+
+ return 0;
+}
+
+int fflush(FILE *stream)
+{
+ return 0;
+}
+
+char *getenv(const char *name)
+{
+ return NULL;
+}