From 63eded82e159f47db28cc793174250502252aeb6 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 30 Jul 2017 14:51:59 +0200 Subject: [PATCH] mescc: Tinycc support: fclose. * mlibc/libc-mes+tcc.c (fclose): Implement. --- mlibc/libc-mes+tcc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mlibc/libc-mes+tcc.c b/mlibc/libc-mes+tcc.c index 44e3bfbc..5e880a5b 100644 --- a/mlibc/libc-mes+tcc.c +++ b/mlibc/libc-mes+tcc.c @@ -98,15 +98,14 @@ execvp (char const *file, char *const argv[]) int fclose (FILE *stream) { - eputs ("fclose stub\n"); - return 0; + int fd = (int)stream; + return close (fd); } FILE * fdopen (int fd, char const *mode) { - eputs ("fdopen stub\n"); - return 0; + return (FILE*)fd; } int