From fbfc078e9f44c1c1e95c9c484f1d5650bcf631b7 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 27 Jul 2024 16:57:39 -0400 Subject: lots and lots of userspace stuff --- euler/include/cstdio | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'euler/include/cstdio') 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 -#include +#include -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); -- cgit v1.2.3