Add MODE=optlinux build mode (#141)

This commit is contained in:
Justine Tunney 2021-10-14 19:36:49 -07:00
parent 226aaf3547
commit 67b5200a0b
111 changed files with 934 additions and 854 deletions

View file

@ -31,8 +31,9 @@
* @see mkdir()
*/
int makedirs(const char *path, unsigned mode) {
int rc;
int e, rc;
char *dir;
e = errno;
if (mkdir(path, mode) != -1) return 0;
if (errno != ENOENT) return -1;
dir = xdirname(path);
@ -43,5 +44,6 @@ int makedirs(const char *path, unsigned mode) {
}
free(dir);
if (rc == -1) return -1;
errno = e;
return mkdir(path, mode);
}