From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12656 invoked by alias); 22 Feb 2006 18:50:38 -0000 Received: (qmail 12647 invoked by uid 22791); 22 Feb 2006 18:50:38 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Wed, 22 Feb 2006 18:50:36 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1FBz4K-0007iI-P8; Wed, 22 Feb 2006 13:50:32 -0500 Date: Wed, 22 Feb 2006 21:55:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Charles Wilson , gdb-patches@sourceware.org Subject: Re: RFA: ensure binary objects opened in binary mode Message-ID: <20060222185032.GA29383@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Charles Wilson , gdb-patches@sourceware.org References: <43F6473F.8030508@cwilson.fastmail.fm> <20060217234141.GA1918@trixie.casa.cgf.cx> <200602181118.k1IBIwNC028708@elgar.sibelius.xs4all.nl> <43FBF706.9030604@cwilson.fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00421.txt.bz2 On Wed, Feb 22, 2006 at 08:34:54PM +0200, Eli Zaretskii wrote: > > (1) for every file that #includes both defs.h AND , remove the > > 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 " 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