From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14180 invoked by alias); 19 Dec 2012 03:55:10 -0000 Received: (qmail 14171 invoked by uid 22791); 19 Dec 2012 03:55:10 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 19 Dec 2012 03:55:05 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 78A5E2E48E; Tue, 18 Dec 2012 22:55:04 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id U5Di4AWImfe2; Tue, 18 Dec 2012 22:55:04 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 081892E037; Tue, 18 Dec 2012 22:55:03 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 07B82C3948; Wed, 19 Dec 2012 07:54:51 +0400 (RET) Date: Wed, 19 Dec 2012 03:55:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA/commit 2/2] Import gnulib's errno module. Message-ID: <20121219035451.GN3273@adacore.com> References: <1355756839-11337-1-git-send-email-brobecker@adacore.com> <1355756839-11337-2-git-send-email-brobecker@adacore.com> <20121218060719.GD3273@adacore.com> <87r4mns49t.fsf@fleche.redhat.com> <20121218165035.GI3273@adacore.com> <87ehins375.fsf@fleche.redhat.com> <20121218181104.GM3273@adacore.com> <87r4mnqk90.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87r4mnqk90.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-12/txt/msg00669.txt.bz2 > 1. Ensure that charset.c includes the files in the correct order. > > 2. Back out your change and promote the EILSEQ define out of charset.c > to somewhere more global in gdb. The reason why I imported gnulib's errno was because gnulib's mbrtowc failed to build (on ppc-lynx178), because EILSEQ wasn't defined. Neither of these options, I think would address the problem in gnulib, because it only includes system and gnulib includes. For the GDB sources themselves, option 1 would only partially work. It would work when testing after libiconv routines, but not after wide-char conversion routines. Perhaps the way forward is to test for both EILSEQ and ENOENT when EILSEQ is defined by gnulib, instead of just EILSEQ. Another option: Define LIBICONV_EILSEQ to the value that libiconv uses, and then use this macro when testing the reusult of libiconv routines. > Joel> IMO, a more promising approach would be to convince libiconv > Joel> to use gnulib's errno instead. > > You could try it but that option scares me a little in that what if > there is gnulib version skew between gdb and libiconv? Yes - we'd need to check minimum libiconv version. Definitely a long term plan at best... -- Joel