* Add support for other operating systems (kFreeBSD, FreeBSD, and OSX for now).
* Switch to autoconf from genconfig.sh.
This commit is contained in:
7
utils.c
7
utils.c
@ -19,7 +19,7 @@
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <linux/limits.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
@ -193,6 +193,11 @@ make_dir(char * path, mode_t mode)
|
||||
do {
|
||||
c = '\0';
|
||||
|
||||
/* Before we do anything, skip leading /'s, so we don't bother
|
||||
* trying to create /. */
|
||||
while (*s == '/')
|
||||
++s;
|
||||
|
||||
/* Bypass leading non-'/'s and then subsequent '/'s. */
|
||||
while (*s) {
|
||||
if (*s == '/') {
|
||||
|
Reference in New Issue
Block a user