From d5e1fa835e46dac2e1729e73c5e6743ef78714c7 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 18:35:35 -0500 Subject: fix to compile under c89 --- src/stdio/remove.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/stdio/remove.c') diff --git a/src/stdio/remove.c b/src/stdio/remove.c index 2ac91743..8b6c5925 100644 --- a/src/stdio/remove.c +++ b/src/stdio/remove.c @@ -1,13 +1,16 @@ -#if 0 #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #define POSIX_FORCED #endif #include +#include "_stdio.h" + +#if 0 #include #include #include +#endif #ifdef POSIX_FORCED #include "_syscall.h" @@ -20,15 +23,20 @@ int remove(const char *filename) { - struct stat st; + /* struct stat st; */ SIGNAL_SAFE(0); + /* stat(filename, &st); if (S_ISDIR(st.st_mode)) { return rmdir(filename); } return unlink(filename); + */ + + (void)filename; + return -1; } /*** @@ -40,5 +48,3 @@ open that file will fail unless creating a new file. IMPLEMENTATION(Whether the file is removed if it is open) STDC(1) */ - -#endif -- cgit v1.2.1