2 * remove.c - remove a file
9 int _rmdir(const char *path
);
10 int _unlink(const char *path
);
13 remove(const char *filename
) {
14 int saved_errno
, retval
;
18 retval
= _rmdir(filename
);
20 if (retval
== -1 && errno
== ENOTDIR
) {
23 retval
= _unlink(filename
);