From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1160 invoked by alias); 8 Aug 2007 22:04:42 -0000 Received: (qmail 1115 invoked by uid 22791); 8 Aug 2007 22:04:41 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 22:04:37 +0000 Received: (qmail 11606 invoked from network); 8 Aug 2007 22:04:28 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Aug 2007 22:04:28 -0000 To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix compilation on the recent glibc CVS snapshot References: <20070808205502.GA3058@host0.dyn.jankratochvil.net> From: Jim Blandy Date: Wed, 08 Aug 2007 22:04:00 -0000 In-Reply-To: <20070808205502.GA3058@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Wed, 8 Aug 2007 22:55:02 +0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00165.txt.bz2 Jan Kratochvil writes: > 2007-08-08 Jan Kratochvil > > * serial.c (serial_open): Fix OPEN parameter macro expansion. > POSIX System Interfaces section 2.1 says, "Any function declared in a header may also be implemented as a macro defined in the header." I gather this means that GLIBC is within its rights to make that change to 'open'. I've learned something new today. So, this change is approved. > --- gdb/serial.c 8 Apr 2007 15:20:07 -0000 1.29 > +++ gdb/serial.c 8 Aug 2007 20:32:10 -0000 > @@ -213,7 +213,8 @@ serial_open (const char *name) > scb->bufp = scb->buf; > scb->error_fd = -1; > > - if (scb->ops->open (scb, open_name)) > + /* `...->open (...)' would get expanded by an the open(2) syscall macro. */ > + if ((*scb->ops->open) (scb, open_name)) > { > xfree (scb); > return NULL;