delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/01/27/12:08:52

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 27 Jan 2011 18:08:15 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Bug in libiconv?
Message-ID: <20110127170815.GR28470@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
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> <4D419B91 DOT 7090005 AT cwilson DOT fastmail DOT fm>
MIME-Version: 1.0
In-Reply-To: <4D419B91.7090005@cwilson.fastmail.fm>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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 Jan 27 11:21, Charles Wilson wrote:
> 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.

What I did was to run my testapp under GDB and to check that the
find_shared_library_fullname() function as well as the calling function
get_charset_aliases() were doing as expected.

> 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

Well, there's a comment in the original code which refers to this.
See srclib/progreloc.c, line 149ff.  The comment basically says that
the functionality is known, but we don't use them because it doesn't
match what we do elsewhere.  The fact that the code elsewhere wasn't
required for Cygwin anymore was not noticed for some reason.

> don't think this historical data matters NOW, tho, since surely it's
> been around long enough we can assume its presence...

Yep.

> 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?

Cygwin Versions prior to 1.7.7 are not support anyway.  The changes
should work with versions at least back to 1.7.2 and I don't care the
least for older versions.  There's no reason to clutter the code to
support old, unsupported Cygwin versions.  There are existing, older
builds of libiconv available for them.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019