bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need opendir_safer, dirent--.h


From: Eric Blake
Subject: Re: need opendir_safer, dirent--.h
Date: Thu, 03 Sep 2009 22:37:19 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 9/2/2009 1:00 PM:
> And here's openat-safer, plus a rework of making fts safer.

Well, if I wouldn't create compilation errors in the process.

> +     * lib/chdir-long.c (includes): Use "fcntl--.h", since openat
> +     emulation can write to stderr on failure.
> +     * lib/fts.c (includes) [!_LIBC]: Likewise for opendir and openat.

> +++ b/lib/fts.c
> @@ -69,7 +69,7 @@ static char sccsid[] = "@(#)fts.c   8.6 (Berkeley) 8/14/94";
> 
>  #if ! _LIBC
>  # include "fcntl--.h"
> -# include "openat.h"
> +# include "dirent--.h"

We still need openat.h, for the non-standard openat_needs_fchdir.
Applying as obvious:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqgmX8ACgkQ84KuGfSFAYAVDgCgvu06lsvan1jxPd3mAyqn2wGD
5lkAn05pR0YXgZ2lDIjkXJ+ZAOalgXN8
=cU5Q
-----END PGP SIGNATURE-----
>From 2847b62110d877f18a65bbbb91d406e064fefff2 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 3 Sep 2009 22:34:10 -0600
Subject: [PATCH] fts: fix compilation error

* lib/fts.c (includes): Re-add "openat.h", for
openat_needs_fchdir.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog |    4 ++++
 lib/fts.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 02e06bd..07fd1fe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-09-03  Eric Blake  <address@hidden>

+       fts: fix compilation error
+       * lib/fts.c (includes): Re-add "openat.h", for
+       openat_needs_fchdir.
+
        faccessat: new module
        * modules/faccessat: New file.
        * lib/faccessat.m4: Likewise.
diff --git a/lib/fts.c b/lib/fts.c
index c05eb8b..2893e66 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -74,6 +74,7 @@ static char sccsid[] = "@(#)fts.c     8.6 (Berkeley) 8/14/94";
 /* FIXME - use fcntl(F_DUPFD_CLOEXEC)/openat(O_CLOEXEC) once they are
    supported.  */
 # include "cloexec.h"
+# include "openat.h"
 # include "same-inode.h"
 #endif

-- 
1.6.3.3.334.g916e1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]