From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13715 invoked by alias); 15 Dec 2008 20:17:52 -0000 Received: (qmail 13706 invoked by uid 22791); 15 Dec 2008 20:17:52 -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.43rc1) with ESMTP; Mon, 15 Dec 2008 20:16:56 +0000 Received: (qmail 7845 invoked from network); 15 Dec 2008 20:16:54 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Dec 2008 20:16:54 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: RFA: Building GDB under GLIBC 2.8 Date: Mon, 15 Dec 2008 20:17:00 -0000 User-Agent: KMail/1.9.10 Cc: "Jim Blandy" References: <8f2776cb0812121804n1008f921h3898bb7bda1581c9@mail.gmail.com> In-Reply-To: <8f2776cb0812121804n1008f921h3898bb7bda1581c9@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200812152016.56353.pedro@codesourcery.com> 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: 2008-12/txt/msg00288.txt.bz2 On Saturday 13 December 2008 02:04:47, Jim Blandy wrote: > =A0=A0=A0=A0=A0=A0=A0=A0abort ();=A0=A0=A0=A0=A0=A0=A0/* NOTE: GDB has on= ly three calls to abort(). =A0*/ ^^^^^ incoming nit Ooops, not three anymore, hey? :-) > =A0 =A0 =A0 =A0default: > =A0=A0=A0=A0=A0=A0=A0=A0dejavu =3D 3; > -=A0=A0=A0=A0=A0=A0=A0write (STDERR_FILENO, msg, sizeof (msg)); > + =A0 =A0 =A0 =A0/* Newer GLIBC versions put the warn_unused_result attri= bute > + =A0 =A0 =A0 =A0 =A0 on write, but this is one of those rare cases where > + =A0 =A0 =A0 =A0 =A0 ignoring the return value is correct. =A0Casting to= (void) > + =A0 =A0 =A0 =A0 =A0 does not fix this problem. =A0This is the solution = suggested > + =A0 =A0 =A0 =A0 =A0 at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D25= 509. =A0*/ > +=A0=A0=A0=A0=A0=A0=A0if (write (STDERR_FILENO, msg, sizeof (msg)) !=3D s= izeof (msg)) > + =A0 =A0 =A0 =A0 =A0abort (); > =A0=A0=A0=A0=A0=A0=A0=A0exit (1); > =A0 =A0 =A0 =A0} --=20 Pedro Alves