Files
musl/src/stdio/remove.c

10 lines
182 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)
{
return (syscall(SYS_unlink, path) && errno == EISDIR)
? syscall(SYS_rmdir, path) : 0;
2011-02-12 00:22:29 -05:00
}