learned something new - remove is supposed to support directories on POSIX
[musl] / src / stdio / remove.c
1 #include <stdio.h>
2 #include <errno.h>
3 #include "syscall.h"
4
5 int remove(const char *path)
6 {
7         return (syscall(SYS_unlink, path) && errno == EISDIR)
8                 ? syscall(SYS_rmdir, path) : 0;
9 }