X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Message-ID: <4D419B91.7090005@cwilson.fastmail.fm> Date: Thu, 27 Jan 2011 11:21:37 -0500 From: Charles Wilson Reply-To: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Bug in libiconv? References: <20110124154158 DOT GA15279 AT calimero DOT vinschen DOT de> <4D3E3EF6 DOT 7010501 AT cwilson DOT fastmail DOT fm> <4D40E1EB DOT 8030401 AT cwilson DOT fastmail DOT fm> <20110127122015 DOT GA25883 AT calimero DOT vinschen DOT de> In-Reply-To: <20110127122015.GA25883@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 1/27/2011 7:20 AM, Corinna Vinschen wrote: > I got it working. The major reason was that the conversion to wchar_t > was broken due to the #if expressions in lib/iconv.c and > lib/iconv_open1.h: > > #if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__) > > This should be > > #if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__ > ... > #if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ > > Other than that, here's the full patchset which I applied to let > libiconv work more POSIXy on Cygwin. I tested especially that the Linux > code works fine on Cygwin as well. Use the patch at you own leasure. > If you have any questiosn, feel free to ask. Thanks for the patch. I'll use the reloc bits as the basis for a patch upstream to gnulib...but unless you: 1) configure libiconv with --enable-relocate and --prefix=/some/really/wierd/tmpdir, AND 2) then installed into /not/the/tmpdir then you didn't actually test the relocation stuff. Don't worry about it tho; I'll do that. (I also need to research why we didn't use /proc/self/maps originally, since it was available in 1.5. I don't think this historical data matters NOW, tho, since surely it's been around long enough we can assume its presence... The downside for me is that it was NOT around in 1.3.x -- which means my port of libiconv for the-fork-that-shall-not-be-named will have to *undo* this patch locally. Oh well.) The important thing, in my mind, is getting the charset conv stuff working correctly. That stuff makes my teeth itch, so I'm very grateful you tracked it down! One question: does it matter if the code is changed, in libiconv, as you suggest, and then libiconv is built on old-cygwin: 1) 1.3.x (e.g. fork-that-shall-not-be-named) 2) 1.5.x 3) 1.7.1--1.7.7 or, for upstream submission, do I need to be careful about versions and munge all of the #ifdefs appropriately? -- Chuck -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple