bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Simon Josefsson via Gnulib discussion list <bug-gnulib@gnu.org>
To: bug-gnulib@gnu.org
Subject: fts in gnulib behave different than glibc
Date: Wed, 28 Jul 2021 10:08:28 +0200	[thread overview]
Message-ID: <87r1fig8sj.fsf@latte.josefsson.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

Hi.  I replaced GNU InetUtils' old custom fts implementation with the
one from gnulib, but self-tests started failing.  Looking at the code,
it seems gnulib's fts implementation has diverged compared to glibc, and
has some optimizations that (I think) change the API (wrt stat and
chdir).  Also, gnulib's fts module is always enabled, even on modern
glibc systems.  InetUtils's usage of fts works fine with modern glibc,
but it didn't work with gnulib's version (it needed a FTS_NOCHDIR).  The
gnulib manual for the fts replacement module isn't terribly clear about
this.  Is there a reason for this behaviour?

I would prefer if there were two fts modules in gnulib:

1) One module 'fts' based on glibc's code, that is only enabled in on
systems that doesn't have fts, or where fts is known to be buggy.

2) One 'fts-faster' that is the current code, which can be used when you
always wants to pull in the optimized implementation.

Then InetUtils would use system fts on glibc platforms, and not always
have to pull in a replacement copy.

What do you think?

I could live with a new module 'fts-optional' that only pulls in the
current 'fts' module when the system is lacking it.  That doesn't fix
the API confusion, but is probably sufficient for InetUtils.

/Simon

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

             reply	other threads:[~2021-07-28  8:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  8:08 Simon Josefsson via Gnulib discussion list [this message]
2021-07-29  5:42 ` fts in gnulib behave different than glibc Jim Meyering
2021-07-29 10:22   ` Simon Josefsson via Gnulib discussion list
2021-07-29 18:10     ` Jim Meyering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1fig8sj.fsf@latte.josefsson.org \
    --to=bug-gnulib@gnu.org \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).