public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: tom@tromey.com, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/4] gnulib: import chown
Date: Tue, 8 Jun 2021 00:14:37 -0400	[thread overview]
Message-ID: <YL7urUNnqn6owRCX@vapier> (raw)
In-Reply-To: <83im2pf5n4.fsf@gnu.org>

On 08 Jun 2021 05:32, Eli Zaretskii wrote:
> > Date: Mon, 7 Jun 2021 21:15:36 -0400
> > From: Mike Frysinger <vapier@gentoo.org>
> > Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
> > 
> > > AFAICT, the Gnulib emulation always returns a failure status in the
> > > MinGW port, is that okay for the callers of chown?  Perhaps a better
> > > alternative is to silently do nothing on MS-Windows?
> > 
> > the calling code can decide how to handle this.  using gnulib is still better
> > so we don't have to put _WIN32/__MINGW32__/whatever ifdefs everywhere.
> 
> Sure, but won't the calling code need those same #ifdef's you want to
> avoid?

no, because chown will fail with ENOSYS, and the caller can choose to ignore
those instead.

> My point is that chown on Windows is largely a no-op, so most callers
> will want to silently do nothing rather than always fail.

i get that.  my point is that we suffer from #ifdef hell and gnulib is
providing a way out.  the answer isn't to dive right back in.
-mike

      reply	other threads:[~2021-06-08  4:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 17:25 Mike Frysinger
2021-05-29 17:25 ` [PATCH 2/4] sim: v850: assume chown is available Mike Frysinger
2021-05-29 17:25 ` [PATCH 3/4] gnulib: import netdb Mike Frysinger
2021-06-07 14:27   ` Tom Tromey
2021-05-29 17:25 ` [PATCH 4/4] gnulib: import select Mike Frysinger
2021-06-07 14:29   ` Tom Tromey
2021-06-08  4:52     ` Mike Frysinger
2021-06-08 12:37       ` Tom Tromey
2021-06-09 12:27       ` Pedro Alves
2021-06-09 16:52         ` Mike Frysinger
2021-06-09 18:12           ` Pedro Alves
2021-06-09 18:32             ` Mike Frysinger
2021-06-09 23:30               ` Pedro Alves
2021-06-10  0:38                 ` Mike Frysinger
2021-06-10 18:11                   ` Tom Tromey
2021-06-07 14:23 ` [PATCH 1/4] gnulib: import chown Tom Tromey
2021-06-07 14:31   ` Eli Zaretskii
2021-06-08  1:15     ` Mike Frysinger
2021-06-08  2:32       ` Eli Zaretskii
2021-06-08  4:14         ` Mike Frysinger [this message]

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

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

  git send-email \
    --in-reply-to=YL7urUNnqn6owRCX@vapier \
    --to=vapier@gentoo.org \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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).