Mercurial > hg > octave-lojdl > gnulib-hg
diff lib/savewd.c @ 7408:e23b1333a117
[lib/ChangeLog]
* fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
we now test for that separately.
* fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
rather than O_NOFOLLOW, when testing whether it's possible to
avoid a race condition reliably.
* savewd.c (savewd_chdir): Likewise.
[m4/ChangeLog]
* fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
of O_NOFOLLOW_IS_INEFFECTIVE. Define HAVE_WORKING_O_NOATIME if
O_NOATIME works.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Thu, 05 Oct 2006 21:38:10 +0000 (2006-10-05) |
parents | 4a6efdc58ddb |
children | 5166dec344af |
line wrap: on
line diff
--- a/lib/savewd.c +++ b/lib/savewd.c @@ -103,7 +103,8 @@ /* Open the directory if requested, or if avoiding a race condition is requested and possible. */ - if (open_result || (options & (O_NOFOLLOW ? SAVEWD_CHDIR_NOFOLLOW : 0))) + if (open_result + || (options & (HAVE_WORKING_O_NOFOLLOW ? SAVEWD_CHDIR_NOFOLLOW : 0))) { fd = open (dir, (O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK