Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Charles Wilson <cygwin@cwilson.fastmail.fm>, gdb-patches@sourceware.org
Subject: Re: RFA: ensure binary objects opened in binary mode
Date: Wed, 22 Feb 2006 21:55:00 -0000	[thread overview]
Message-ID: <20060222185032.GA29383@nevyn.them.org> (raw)
In-Reply-To: <uirr7kzsh.fsf@gnu.org>

On Wed, Feb 22, 2006 at 08:34:54PM +0200, Eli Zaretskii wrote:
> > (1) for every file that #includes both defs.h AND <fcntl.h>, remove the 
> > <fcntl.h> inclusion.
> 
> I'm not sure this is a good idea.  What if tomorrow we remove fcntl.h
> from defs.h--do we go through all these files again and add it back?
> Why bother? fcntl.h should be idempotent, so including it several
> times does no real harm.
> 
> I actually quite dislike source files that don't include standard
> headers because they are included in defs.h and its ilk.  It makes me
> wonder how come foo.c uses something defined in bar.h, but there's no
> "#include <bar.h>" anywhere in sight.

I'm indifferent.  We can't rely on these extra includes being present,
since the compiler won't check for them, but I agree that they're
clarifying.  I don't see a reason to bother to remove them.

> So I'd prefer if you committed the 1st and the 3rd patch. but not the
> second.  However, before you actually do that, let's wait and hear
> what others think.

Fine by me.

> > +/* In case this is not defined in fcntl.h */
> > +
> > +#ifndef O_BINARY
> > +#define O_BINARY 0
> > +#endif
> 
> I'd change the comment to explain that O_BINARY has a meaning on
> non-Posix platforms, while on Posix platforms it should be a no-op.
> That is the _real_ reason we define O_BINARY.

Ditto.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2006-02-22 18:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 22:02 Charles Wilson
2006-02-17 23:41 ` Christopher Faylor
2006-02-18 10:45   ` Eli Zaretskii
2006-02-18 11:19     ` Mark Kettenis
2006-02-18 11:47       ` Eli Zaretskii
2006-02-18 11:55         ` Mark Kettenis
2006-02-22  5:52         ` Charles Wilson
2006-02-22 17:06           ` Christopher Faylor
2006-02-22 18:50           ` Eli Zaretskii
2006-02-22 21:55             ` Daniel Jacobowitz [this message]
2006-02-24 10:37               ` Charles Wilson
2006-02-24 11:44                 ` Eli Zaretskii
2006-02-25  7:29                   ` Charles Wilson
2006-03-01 22:11             ` Michael Snyder
2006-02-18 10:50 ` Eli Zaretskii

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=20060222185032.GA29383@nevyn.them.org \
    --to=drow@false.org \
    --cc=cygwin@cwilson.fastmail.fm \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.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