Files
musl/src/stdio/remove.c

10 lines
192 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include <stdio.h>
#include <errno.h>
2011-02-12 00:22:29 -05:00
#include "syscall.h"
int remove(const char *path)
{
int r = syscall(SYS_unlink, path);
return (r && errno == EISDIR) ? syscall(SYS_rmdir, path) : r;
2011-02-12 00:22:29 -05:00
}