mkdir-p: Don't reference an undefined function on native Windows

2024-08-27 Thread Bruno Haible
clang on native Windows gives me this warning: gllib\dirchownmod.c(98,27): warning: implicit declaration of function 'fchown' is invalid in C99 [-Wimplicit-function-declaration] This patch should fix it. 2024-08-27 Bruno Haible mkdir-p: Don't reference an undefi

mkdir-p

2023-05-12 Thread Reuben Thomas
ld do when I detect it (how do I wait for it to complete?). If these points could be documented, that would be a big help, but maybe also it would be fair to put some sort of "here be dragons" at the top of the documentation, as a user like me hoping for a straightforward C equivalent of &q

Re: [PATCH] mkdir-p: Don't discard stat error

2018-12-16 Thread Niklas Hambüchen
On 15/12/2018 1:27 AM, Paul Eggert wrote: + if (stat (dir + prefix_len, &st) == 0 + && S_ISDIR (st.st_mode)) That patch doesn't look quite right, since it can use errno even when stat succeeded (in which case errno contains garbage). Oops, you're right,

Re: [PATCH] mkdir-p: Don't discard stat error

2018-12-14 Thread Paul Eggert
errno contains garbage). I installed the attached instead; please give it a try. >From 6d603a24bfdfae79d782e8bbc42707e672f14720 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 14 Dec 2018 16:25:13 -0800 Subject: [PATCH] mkdir-p: improve diagnostic for FUSE mounts MIME-Version: 1.0 Con

[PATCH] mkdir-p: Don't discard stat error

2018-12-14 Thread Niklas Hambüchen
Until now, a stat() `errno` created by `mkdir -p` after `mkdir()` is dropped silently, leading to very confusing error messages that hide the actual source of the error: `mkdir -p` can say cannot create directory ‘dir: File exists` when indeed the the file exists, is a directory (shows `d

mkdir-p: Depend on 'mkdir'

2018-10-05 Thread Bruno Haible
lib/mkdir-p.c also uses mkdir(), thus would produce an error on old mingw versions. This fixes it. 2018-10-05 Bruno Haible mkdir-p: Depend on 'mkdir'. * modules/mkdir-p (Depends-on): Add 'mkdir'. diff --git a/modules/mkdir-p b/modules/mkdir-p index fed

[PATCH] mkdir-p: remove assumptions about umask and mode

2013-05-11 Thread Paul Eggert
/ChangeLog b/ChangeLog index 5f4e4dc..0a2b457 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-05-11 Paul Eggert + + mkdir-p: remove assumptions about umask and mode + * lib/mkdir-p.c (make_dir_parents): Do not assume that the current + umask is 0, or that MODE is a subset

Re: apparent complexity of mkdir-p module

2012-06-07 Thread Paul Eggert
On 06/07/2012 05:09 AM, John W. Eaton wrote: > I was expecting to find a simple interface but unfortunately what you found is what's needed to implement GNU 'mkdir -p'. Among other things, the permissions of the parent directories differ from the permissions of the child direct

apparent complexity of mkdir-p module (was: Re: dirchownmod and savewd modules uses unavailable functions under) Windows

2012-06-07 Thread John W. Eaton
do work on those systems. The use of mkdir-p is a recent addition and is not critical, so for now I've removed the patch that added that module to Octave. In any case, I am curious about the design of this module. Could someone shed some light on why it is so complex, and why that complexity i

Re: mkdir -p and POSIX

2009-10-08 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 10/8/2009 12:32 PM: >> The Austin Group made their recommendation about mkdir -p today: >> http://austingroupbugs.net/view.php?id=161 > > Hmm... that URL is useful only if you have a login/passwor

Re: mkdir -p and POSIX

2009-10-08 Thread Jim Meyering
Eric Blake wrote: > The Austin Group made their recommendation about mkdir -p today: > > "I suggest replacing the description of -p with: > > -p Create any missing intermediate pathname components. > > For each dir operand that does not name an existing directory, &

Re: mkdir -p and POSIX

2009-10-08 Thread Ralf Wildenhues
Hello Eric, * Eric Blake wrote on Thu, Oct 08, 2009 at 06:44:41PM CEST: > The Austin Group made their recommendation about mkdir -p today: [...] > This also means that build-aux/mkinstalldirs and build-aux/install-sh > are also impacted. Why? I don't see anything that defines t

mkdir -p and POSIX

2009-10-08 Thread Eric Blake
The Austin Group made their recommendation about mkdir -p today: "I suggest replacing the description of -p with: -p Create any missing intermediate pathname components. For each dir operand that does not name an existing directory, before performing the actions described i

Re: new module savewd, plus changes to mkdir-p

2006-09-17 Thread Paul Eggert
y that it was intended to have both save-cvd > and savewd, as they have different semantics? Yes. Possibly they'll be merged in the future, but for now I want to see how well the savewd idea works in practice, using "mkdir -p" and "install" as guinea pigs.

Re: new module savewd, plus changes to mkdir-p

2006-09-17 Thread Jim Meyering
Hi Ralf, Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > * Paul Eggert wrote on Sat, Sep 16, 2006 at 10:00:27PM CEST: >> I installed this fix as part of updates to coreutils. > > The file modules/savewd does not exist in the current CVS, neither > do lib/savewd.[ch], m4/savewd.m4. I suspect he'll ad

Re: new module savewd, plus changes to mkdir-p

2006-09-17 Thread Ralf Wildenhues
Hello Paul, * Paul Eggert wrote on Sat, Sep 16, 2006 at 10:00:27PM CEST: > I installed this fix as part of updates to coreutils. The file modules/savewd does not exist in the current CVS, neither do lib/savewd.[ch], m4/savewd.m4. Do I understand correctly that it was intended to have both save-c

new module savewd, plus changes to mkdir-p

2006-09-16 Thread Paul Eggert
I installed this fix as part of updates to coreutils. 2006-09-15 Paul Eggert <[EMAIL PROTECTED]> * modules/mkancesdirs (Depends-on): Add fcntl. * modules/savewd: New file. * MODULES.html.sh (File system functions): Add savewd. * lib/dirchownmod.c: Don't include f

import from coreutils to gnulib for mkdir-p and mkancesdirs

2006-07-16 Thread Paul Eggert
ROTECTED]> Import from coreutils. * MODULES.html.sh: Add mkancestors. * modules/mkancesdirs: New module. * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h, lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4. The chdir-safer and afs fi

Re: mkdir-p module

2006-03-01 Thread Paul Eggert
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > The mkdir-p module currently > - lists m4/chdir-safer.m4 but the file does not exist in CVS, > - defines macros gl_FUNC_LCHMOD and gl_CHDIR_SAFER but does not use > them (they are needed though). Thanks for the patch; I inst

mkdir-p module

2006-02-23 Thread Ralf Wildenhues
The mkdir-p module currently - lists m4/chdir-safer.m4 but the file does not exist in CVS, - defines macros gl_FUNC_LCHMOD and gl_CHDIR_SAFER but does not use them (they are needed though). Cheers, Ralf * mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and gl_CHDIR_SAFER

Re: changes for openat, mkdir-p, lchmod

2006-01-10 Thread Jim Meyering
It looks like I've subverted things a little: the lib/ChangeLog entry for fts.c and openat.[ch] below correspond to a change I haven't yet committed. I think it's complete, but it's rather ambitious, and requires changes (albeit small) in every program that uses fts. So I'm taking my time. I comm

changes for openat, mkdir-p, lchmod

2006-01-09 Thread Paul Eggert
c from coreutils. * lib/lchmod.h: New file. * lib/mkdir-p.c: Include lchmod.h, lchown.h. (make_dir_parents): Use lchown rather than chown, and lchmod rather than chmod. * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h, chdir-saf

mkdir-p patches from coreutils

2005-09-22 Thread Paul Eggert
l uses replaced by mkdir. (make_dir_parents): Last arg is now int * (for errno), not bool *. * mkdir-p.c (make_dir, make_dir_parents): Likewise. Rewrite "mkdir -p" algorithm to avoid the need for "stat" each time through the loop. Do not di