X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmakepath.c;h=3ca5c97654ac29e5073bf359afbff2abef36c223;hb=c1e84a1314394b86dd121372a6656bb6c6df349b;hp=5c6112414ca8fe90e03e26f35e281cfd511a60e4;hpb=d87c39464604e74f580c7fae835be31a4c125c36;p=gnulib.git diff --git a/lib/makepath.c b/lib/makepath.c index 5c6112414..3ca5c9765 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -49,9 +49,11 @@ char *alloca (); extern int errno; #endif -#if defined(USG) || defined(STDC_HEADERS) +#if defined(STDC_HEADERS) || defined(HAVE_STRING_H) #include +#ifndef index #define index strchr +#endif #else #include #endif @@ -127,7 +129,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string) slash = dirpath; while (*slash == '/') slash++; - while (slash = index (slash, '/')) + while ((slash = index (slash, '/'))) { *slash = '\0'; if (stat (dirpath, &stats))