public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Bug in libiconv?
Date: Tue, 25 Jan 2011 20:11:00 -0000	[thread overview]
Message-ID: <20110125155053.GA6353@calimero.vinschen.de> (raw)
In-Reply-To: <4D3EE67D.3000900@cwilson.fastmail.fm>

On Jan 25 10:04, Charles Wilson wrote:
> On 1/25/2011 6:15 AM, Corinna Vinschen wrote:
> > - Why on earth is libiconv on Cygwin using Windows functions in some
> >   places?
> > 
> >   - libcharset/lib/relocatable.c
> >   - srclib/progreloc.c
> >   - srclib/relocatable.c
> >   - lib/relocatable.c
> 
> whoo boy. That's...a long story. It's all part of Bruno's magic
> relocatability machinery.  However, on cygwin it should be using unixish
> mechanisms (at least for exe's -- looking at /proc/$pid/exe.  For
> DLLs...I think it needs to keep using the DllMain approach).

Really?  Why can't you use the same mechanism as on Linux?  The
find_shared_library_fullname() function examines /proc/self/maps, which
is also available on Cygwin.  This was already available on 1.5!

> > - libcharset/lib/relocatable.c and srclib/relocatable.c define their own
> >   DllMain and use Windows functions.  And the old
> >   cygwin_conv_to_posix_path function as well.
> 
> Well, yes.  It's how DLLs determine their installation path, so they can
> then automatically deduce the relative path to <whatever>.  And since
> that requires using a win32 function (GetModuleFileName) it needs to
> convert to cygwin format.

See above.

> > - Same file, function locale_charset() contains old Cygwin-specific
> >   code which is outdated.  AFAICS it shouldn't hurt, though, since
> >   Cygwin no longer returns "US-ASCII".
> > 
> > - lib/iconv_open1.h and lib/iconv.c exclude Cygwin from the usage of the
> >   ei_ucs2internal encoding table.  I'm not sure if that's right or
> >   wrong, but it looks worrying.
> 
> Well, remember (A) upstream libiconv itself hasn't been updated since
> 30-Jun-2009, which predated cygwin 1.7.1 (23 Dec 2009), and (B) even our
> most recent version (1.13.1-1) was released almost simultaneously (23
> Dec 2009) -- and there was a LOT of shakeup in all that stuff from 1.7.1
> thru 1.7.5.

I wasn't trying to blame you.  I was just trying to point out potential
problems which deserve a more POSIXy handling on Cygwin.

> > Please note that I defined
> > __STDC_ISO_10646__ for Cygwin 1.7.8 yesterday.  This define is
> > missing since 1.7.2.
> 
> Hmmm...maybe I should (re)build libiconv against a snapshot?

I think that should be safe.  There's most likely no new API which would
accidentally be pulled in by libiconv(*).


Corinna


(*) Famous last words...

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

  reply	other threads:[~2011-01-25 15:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  6:36 Corinna Vinschen
2011-01-25 11:15 ` Charles Wilson
2011-01-25 15:04   ` Corinna Vinschen
2011-01-25 18:58     ` Charles Wilson
2011-01-25 20:11       ` Corinna Vinschen [this message]
2011-01-28 22:13         ` Charles Wilson
2011-01-27  5:46     ` Charles Wilson
2011-01-27 16:05       ` Corinna Vinschen
2011-01-27 17:18         ` Charles Wilson
2011-01-27  3:53   ` Charles Wilson
2011-01-27 16:21     ` Corinna Vinschen
2011-01-27 17:39       ` Charles Wilson
2011-01-27 18:05         ` Corinna Vinschen
2011-01-27 20:12           ` cygwin patches for gnulib relocation code [Was: Re: Bug in libiconv?] Charles Wilson
2011-01-28  0:37             ` Eric Blake
2011-01-28  4:45               ` Charles Wilson
2011-01-26 13:39 Bug in libiconv? simrw
2011-01-26 13:50 ` Corinna Vinschen
2011-01-26 17:01   ` Charles Wilson
2011-01-26 22:39     ` Corinna Vinschen
2011-01-27 16:06 simrw
2011-01-29  2:15 Bruno Haible
2011-01-29 12:34 ` Charles Wilson
2011-01-29 13:20 ` Charles Wilson
2011-01-29 17:15   ` Corinna Vinschen
2011-01-29 16:02 ` Corinna Vinschen
2011-01-29 17:51   ` Eric Blake
2011-01-29 18:12     ` Corinna Vinschen
2011-01-29 18:28       ` Eric Blake
2011-01-30 11:34         ` Corinna Vinschen
2011-01-30 11:43           ` Corinna Vinschen
2011-01-30  2:40     ` Corinna Vinschen
2011-02-02 18:58 Bruno Haible
2011-02-02 21:20 ` Corinna Vinschen
2011-02-02 22:57   ` Charles Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110125155053.GA6353@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).