From 73a7e8f53d07da982ca1e90c25b2cdbf502a4c10 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 30 Dec 2011 01:13:41 +0100 Subject: [PATCH] Forgot to actually add remove(3) in the previous commit. --- libmaxsi/c/fdio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libmaxsi/c/fdio.c b/libmaxsi/c/fdio.c index 947e4a03..e82e356f 100644 --- a/libmaxsi/c/fdio.c +++ b/libmaxsi/c/fdio.c @@ -191,3 +191,14 @@ FILE* fopen(const char* path, const char* mode) return fp; } +int remove(const char* pathname) +{ + int result = unlink(pathname); + if ( result && errno == EISDIR ) + { + // TODO: rmdir is unimplemented. + // result = rmdir(pathname); + } + return result; +} +