Don't include alloca.h, stdio.h, sys/types.h,
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Jul 2006 03:06:48 +0000 (03:06 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Jul 2006 03:06:48 +0000 (03:06 +0000)
commita60cc14aed51d3f5d569e67782205aedbc838a35
tree9243a5099a461dbe59e6a9521462faaa42b397bd
parente9b48653e21e5b39901c9e55c9ddfd29d3e6d12d
Don't include alloca.h, stdio.h, sys/types.h,
unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
(make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
callers changed.  Revamp internals significantly, by not
attempting to create directories that are temporarily more
permissive than the final results.  Do not attempt to use
save_cwd/restore_cwd; it isn't worth it for mkdir and install.
This removes some race conditions, fixes some bugs, and simplifies
things.  Use new dirchownmod function to do owner and mode changes.
lib/mkdir-p.c