From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28382 invoked by alias); 11 Apr 2009 19:26:02 -0000 Received: (qmail 28373 invoked by uid 22791); 11 Apr 2009 19:26:02 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS 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; Sat, 11 Apr 2009 19:25:53 +0000 Received: (qmail 25598 invoked from network); 11 Apr 2009 19:25:51 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Apr 2009 19:25:51 -0000 From: Pedro Alves To: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: [RFA] Define EILSEQ if not defined by errno.h Date: Sat, 11 Apr 2009 19:26:00 -0000 User-Agent: KMail/1.9.10 References: <83zlennh8p.fsf@gnu.org> In-Reply-To: <83zlennh8p.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904112026.46999.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: 2009-04/txt/msg00218.txt.bz2 On Saturday 11 April 2009 20:05:26, Eli Zaretskii wrote: > Any objections to the following patch? DJGPP doesn't have EILSEQ > defined in its errno.h. No objections. AFAICS, this is what gnu libiconv does. EILSEQ can also be defined in wchar.h, so as long as this is done after including wchar.h, it is fine. My first question when I read this, was if you had chosen ENOENT as an arbitrary choice, and I was curious with what was libiconv doing --- which made me have to go grep libiconv sources. IMO, a comment mentioning that this is what GNU iconv does would be good to spare such doubts for whoever reads this. > > > 2009-04-11 Eli Zaretskii > > * charset.c (EILSEQ): Define if not defined by errno.h. > > Index: gdb/charset.c > =================================================================== > RCS file: /cvs/src/src/gdb/charset.c,v > retrieving revision 1.19 > diff -u -r1.19 charset.c > --- gdb/charset.c 25 Mar 2009 00:58:34 -0000 1.19 > +++ gdb/charset.c 11 Apr 2009 19:03:08 -0000 > @@ -89,6 +89,12 @@ > #undef ICONV_CONST > #define ICONV_CONST const > > +/* Some systems, don't have EILSEQ. But don't define it as EINVAL, > + because callers of `iconv' want to distinguish EINVAL and EILSEQ. */ > +#ifndef EILSEQ > +#define EILSEQ ENOENT > +#endif > + > iconv_t > iconv_open (const char *to, const char *from) > { > -- Pedro Alves