X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmkancesdirs.c;h=e44cf3e059f62802a615f9f04e324ea664ff835d;hb=a6694a282b6d9c86beacd77b65a30626af293ba1;hp=efdabb4fada91e13b7f70ee349a30ec02eedd6a9;hpb=eeb96e1a6b5e0b31a4011d7d333999592c0bb2e9;p=gnulib.git diff --git a/lib/mkancesdirs.c b/lib/mkancesdirs.c index efdabb4fa..e44cf3e05 100644 --- a/lib/mkancesdirs.c +++ b/lib/mkancesdirs.c @@ -2,10 +2,10 @@ Copyright (C) 2006 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -13,8 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -42,12 +41,12 @@ savewd. Create any ancestor directories that don't already exist, by - invoking MAKE_DIR (COMPONENT, MAKE_DIR_ARG). This function should - return 0 if successful and the resulting directory is readable, 1 - if successful but the resulting directory might not be readable, -1 - (setting errno) otherwise. If COMPONENT is relative, it is - relative to the temporary working directory, which may differ from - *WD. + invoking MAKE_DIR (FILE, COMPONENT, MAKE_DIR_ARG). This function + should return 0 if successful and the resulting directory is + readable, 1 if successful but the resulting directory might not be + readable, -1 (setting errno) otherwise. If COMPONENT is relative, + it is relative to the temporary working directory, which may differ + from *WD. Ordinarily MAKE_DIR is executed with the working directory changed to reflect the already-made prefix, and mkancesdirs returns with @@ -66,7 +65,7 @@ ptrdiff_t mkancesdirs (char *file, struct savewd *wd, - int (*make_dir) (char const *, void *), + int (*make_dir) (char const *, char const *, void *), void *make_dir_arg) { /* Address of the previous directory separator that follows an @@ -114,7 +113,7 @@ mkancesdirs (char *file, struct savewd *wd, && component[0] == '.' && component[1] == '.') made_dir = false; else - switch (make_dir (component, make_dir_arg)) + switch (make_dir (file, component, make_dir_arg)) { case -1: make_dir_errno = errno;