-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Jim Meyering on 1/19/2006 3:39 AM: > > As I said, I'm reluctant to add this complexity, > without some evidence that it will be used.
How about a simpler patch to gnulib: define FTS_CWDFD, then make gnulib fts_open() fail unless FTS_CWDFD or FTS_NOCHDIR is set. In other words, make existing uses of gnulib's fts_open() fail if the existing use would rely on chdir/fchdir in glibc or FreeBSD semantics, forcing people to use the new FTS_CWDFD flag (and in the process, pick up the benefits of the *at functions). That way, gnulib would force people to use the new flag to get fts to work (since gnulib is supposed to promote safe coding practices, after all), while native distros are then free to add the new flag while remaining backwards compatible to old source code. It is then an ABI change (additional field in the fts struct), but no longer an incompatible API change. This also frees you from the burden of maintaining this full patch of chdir capability, until such time as we do encounter an application switching from native to gnulib fts where the conversion to FTS_CWDFD is problematic (hopefully, that will never be the case). Along the lines of your earlier mention of how easy it was to patch the various utilities that used fts, it would be an additional one-line patch to specify the FTS_CWDFD flag to fts_open, along with the changes of converting "func (ent->fts_accpath)" to "funcat (fts->fts_cwd_fd, ent->fts_accpath)". - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDz5V+84KuGfSFAYARAkfDAJsEsQBVv3D7BPk8nq4SfiWUz3LV5wCfWgF2 DTCMT1hOhNPShNKKLqJ3hl4= =jAPY -----END PGP SIGNATURE----- _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib