summaryrefslogtreecommitdiff
path: root/euler/include/cstdio
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-27 16:57:39 -0400
committerBenji Dial <benji@benjidial.net>2024-07-27 16:57:39 -0400
commitfbfc078e9f44c1c1e95c9c484f1d5650bcf631b7 (patch)
treecab539c8cbbac81d895b6f8be695f3f53bf8f4d5 /euler/include/cstdio
parent9af5588c30c4126a2800aae1afcb0de2c373dc6c (diff)
downloadhilbert-os-fbfc078e9f44c1c1e95c9c484f1d5650bcf631b7.tar.gz
lots and lots of userspace stuff
Diffstat (limited to 'euler/include/cstdio')
-rw-r--r--euler/include/cstdio22
1 files changed, 9 insertions, 13 deletions
diff --git a/euler/include/cstdio b/euler/include/cstdio
index 75472c1..0dc42d0 100644
--- a/euler/include/cstdio
+++ b/euler/include/cstdio
@@ -1,20 +1,16 @@
#pragma once
#include <euler/stream.hpp>
-#include <stddef.h>
+#include <cstddef>
-namespace std {
+typedef euler::stream FILE;
- typedef euler::stream FILE;
+extern "C" FILE *fopen(const char *filename, const char *mode);
+extern "C" void fclose(FILE *stream);
- FILE *fopen(const char *filename, const char *mode);
- int fclose(FILE *stream);
+#define SEEK_CUR 2
+#define SEEK_END 1
+#define SEEK_SET 0
- int fseek(FILE *stream, long offset, int origin);
- #define SEEK_SET 0
- #define SEEK_CUR 2
- #define SEEK_END 1
-
- size_t fread(void *buffer, size_t size, size_t count, FILE *stream);
-
-}
+extern "C" int fseek(FILE *stream, long offset, int origin);
+extern "C" size_t fread(void *buffer, size_t size, size_t count, FILE *stream);