Eric Blake [EMAIL PROTECTED] writes:
This change broke cygwin. Cygwin does not have struct dirent.d_type, so
DT_IS_DIR is defined as do_not_use_this_macro. I think protecting this if
statement with HAVE_STRUCT_DIRENT_D_TYPE, and letting cygwin fall through
to the unlink, will fix the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Paul Eggert on 5/13/2005 4:55 PM:
2005-05-13 Paul Eggert [EMAIL PROTECTED]
* m4/prereqs.m4 (gl_PREREQ): Require gl_UNLINKDIR.
* src/remove.c: Include unlinkdir.h.
(UNLINK_CAN_UNLINK_DIRS): Remove.
Paul Eggert [EMAIL PROTECTED] wrote:
...
How about this patch? It incorporates the above ideas.
2005-05-13 Paul Eggert [EMAIL PROTECTED]
* m4/prereqs.m4 (gl_PREREQ): Require gl_UNLINKDIR.
* src/remove.c: Include unlinkdir.h.
(UNLINK_CAN_UNLINK_DIRS): Remove.
Jim Meyering [EMAIL PROTECTED] writes:
That looks fine, and works fine here.
Please commit it.
OK, done. I also added Cygwin to the list of platforms that
can't unlink directories, as Eric Blake suggested.
___
Bug-coreutils mailing list
Paul Eggert [EMAIL PROTECTED] wrote:
Jim Meyering [EMAIL PROTECTED] writes:
That looks fine, and works fine here.
Please commit it.
OK, done. I also added Cygwin to the list of platforms that
can't unlink directories, as Eric Blake suggested.
Thanks!
I found that it needed a little
In reviewing parts of remove.c I noted (again) the race condition on
systems with an unlink that may remove directories, so added this comment:
+/* If anyone knows of another system for which unlink can never
+ remove a directory, please report it to [EMAIL PROTECTED]
+ The code below is
Jim Meyering [EMAIL PROTECTED] writes:
So the current test of __GLIBC__ may be wrong if the
underlying kernel is not Linux.
A few thoughts.
It'd be nice to factor out this can unlink(2) remove directories
business into a gnulib module. Tar could use it, for example.
On traditional Unix,