X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmakepath.c;h=e61579021c204d7a613dae11b92091610003131c;hb=6b89992dbb9ec71f4505b47447bde264e3035056;hp=3ca5c97654ac29e5073bf359afbff2abef36c223;hpb=b06578954912a7dcfbe0c6f6efca230b04ad0e7f;p=gnulib.git diff --git a/lib/makepath.c b/lib/makepath.c index 3ca5c9765..e61579021 100644 --- a/lib/makepath.c +++ b/lib/makepath.c @@ -43,9 +43,14 @@ char *alloca (); #endif #ifdef STDC_HEADERS -#include #include -#else +#endif + +#ifdef HAVE_ERRNO_H +#include +#endif + +#ifndef STDC_HEADERS extern int errno; #endif @@ -95,7 +100,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string) int retval = 0; int oldmask = umask (0); - dirpath = alloca (strlen (argpath) + 1); + dirpath = (char *) alloca (strlen (argpath) + 1); strcpy (dirpath, argpath); if (stat (dirpath, &stats)) @@ -147,7 +152,7 @@ make_path (argpath, mode, parent_mode, owner, group, verbose_fmt_string) if (owner != (uid_t) -1 && group != (gid_t) -1 && chown (dirpath, owner, group) -#ifdef AFS +#if defined(AFS) && defined (EPERM) && errno != EPERM #endif )