summaryrefslogtreecommitdiff
path: root/src/user/lib/stdio/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/stdio/file.c')
-rw-r--r--src/user/lib/stdio/file.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/user/lib/stdio/file.c b/src/user/lib/stdio/file.c
index 63b004d..8c0fc57 100644
--- a/src/user/lib/stdio/file.c
+++ b/src/user/lib/stdio/file.c
@@ -1,11 +1,12 @@
#include "file.h"
-#include <camellia/syscalls.h>
#include <camellia/flags.h>
+#include <camellia/syscalls.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <user/lib/panic.h>
static FILE _stdin_null = { .fd = STDIN_FILENO };
static FILE _stdout_null = { .fd = STDOUT_FILENO };
@@ -124,6 +125,13 @@ int pclose(FILE *f) {
return -1;
}
+// TODO tmpfile()
+FILE *tmpfile(void) {
+ errno = ENOSYS;
+ return NULL;
+}
+
+
int fextflags(FILE *f, int extflags) {
int old = f->extflags;
f->extflags = extflags;
@@ -227,6 +235,12 @@ int fputc(int c, FILE *f) {
}
int putc(int c, FILE *f) { return fputc(c, f); }
+// TODO ungetc
+int ungetc(int c, FILE *f) {
+ (void)c; (void)f;
+ __libc_panic("unimplemented");
+}
+
int fseek(FILE *f, long offset, int whence) {
return fseeko(f, offset, whence);
}