From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6390 invoked by alias); 14 Nov 2014 13:54:00 -0000 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 Received: (qmail 6378 invoked by uid 89); 14 Nov 2014 13:53:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 14 Nov 2014 13:53:58 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1XpHJz-0005rs-8Q from Yao_Qi@mentor.com ; Fri, 14 Nov 2014 05:53:55 -0800 Received: from GreenOnly (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.181.6; Fri, 14 Nov 2014 05:53:54 -0800 From: Yao Qi To: Pedro Alves CC: , , Joel Brobecker Subject: Re: gnulib's errno module was imported References: <87oasaibe6.fsf@codesourcery.com> <5465EBAD.3070108@redhat.com> <87fvdmhr5o.fsf@codesourcery.com> <546601BD.7020700@redhat.com> Date: Fri, 14 Nov 2014 13:54:00 -0000 In-Reply-To: <546601BD.7020700@redhat.com> (Pedro Alves's message of "Fri, 14 Nov 2014 13:21:01 +0000") Message-ID: <87bno9j3bk.fsf@codesourcery.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00308.txt.bz2 Pedro Alves writes: > That was actually my first approach, but then: > > - I thought that having a central place to handle this > and to put the comment was cleaner than repeating the fix > in multiple places. > - That won't build on systems that EILSEQ and ENOENT are > defined to the same value (two switch cases with the same value). > Not sure there are any such systems, but given iconv.h's practice... > > I guess I could also simplify and remove the GNULIB_defined_EILSEQ > guard, mapping ENOENT to EILSEQ everywhere ? I don't have a strong feeling on this, so either is OK to me. > > +/* On systems that don't have EILSEQ, GNU iconv's iconv.h defines it > + to ENOENT. gnulib instead defines it to a different value. On > + such systems, map ENOENT to gnulib's EILSEQ, leaving callers > + agnostic. */ > +#ifdef GNULIB_defined_EILSEQ > > I looked at glibc's iconv and it seems that ENOENT is never used > there, so should be safe. Good, could you please commit your patch? --=20 Yao (=E9=BD=90=E5=B0=A7)