From: Charles Wilson <cygwin@cwilson.fastmail.fm>
To: cygwin@cygwin.com, bug-gnu-libiconv@gnu.org
Subject: Re: Bug in libiconv?
Date: Sat, 29 Jan 2011 12:34:00 -0000 [thread overview]
Message-ID: <4D437C30.4020407@cwilson.fastmail.fm> (raw)
In-Reply-To: <201101282312.50298.bruno@clisp.org>
[-- Attachment #1: Type: text/plain, Size: 2319 bytes --]
On 1/28/2011 5:12 PM, Bruno Haible wrote:
> Please CC the bug-gnu-libiconv mailing list when discussing possible
> bugs in GNU libiconv.
I hadn't intended on involving bug-gnu-libiconv until we had a working
fix, and a consensus here on @cygwin. But, in any case, here is the
portion of Corinna's patch dealing with the iconv issues, stripped down
to the minimum necessary to correct the "problem".
As pointed out in the @cygwin thread, there are still some open
questions, which I had hoped to avoid by waiting until cygwin-1.7.8 was
released.
1) On cygwin-1.7.8, __STDC_ISO_10646__ is defined, so this change will
allow "correct" behavior *if compiled on cygwin-1.7.8*.
-#if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) &&
!defined __CYGWIN__)
+#if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__
But cygwin-1.7.8 isn't out yet. But with this change (and the "don't
include windows.h" change) then libiconv will still compile properly on
cygwin-1.5 -- which does not support wide chars, and does NOT define
__STDC_ISO_10646__. However, it WON'T compile properly on cygwin-1.7.x
up to 1.7.7.
2) From cygwin-1.7.2 to cygwin-1.7.7, the following change could be
used instead (there's an issue with 1.7.1 which doesn't bear
exploration here):
-#if __STDC_ISO_10646__ || ((defined _WIN32 || defined __WIN32__) &&
!defined __CYGWIN__)
+#if __STDC_ISO_10646__ || defined _WIN32 || defined __WIN32__ ||
defined __CYGWIN__
But arguably, then it would break on "old" cygwin like 1.5. Perhaps
this is ok, since 1.7 has been "out" for over a year, and maybe
bug-gnu-libiconv doesn't care about old,
unsupported-by-the-cygwin-project versions of cygwin.
In any case, the attached patch goes with option 1 above. It is
completely orthogonal to, and independent of, the other "relocation"
patch, that I posted to the gnulib list.
2010-01-28 Corinna Vinschen <...>
Correct wchar handling on cygwin-1.7.x
* lib/iconv.c (iconv_canonicalize): Allow __STDC_ISO_10646__
to control, rather than using __CYGWIN__ to veto.
* lib/iconv_open1.h: Ditto.
* libcharset/lib/localcharset.c: Don't include windows.h if
__CYGWIN__.
(get_charset_aliases): Remove cygwin workaround; rely on generic
implementation. Be sure to copy result of nl_langinfo into local
buffer.
--
Chuck
[-- Attachment #2: libiconv-1.13.1-2.wchar.patch --]
[-- Type: application/x-patch, Size: 4652 bytes --]
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
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
next prev parent reply other threads:[~2011-01-29 2:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-29 2:15 Bruno Haible
2011-01-29 12:34 ` Charles Wilson [this message]
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
-- strict thread matches above, loose matches on Subject: below --
2011-02-02 18:58 Bruno Haible
2011-02-02 21:20 ` Corinna Vinschen
2011-02-02 22:57 ` Charles Wilson
2011-01-27 16:06 simrw
2011-01-26 13:39 simrw
2011-01-26 13:50 ` Corinna Vinschen
2011-01-26 17:01 ` Charles Wilson
2011-01-26 22:39 ` Corinna Vinschen
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
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
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=4D437C30.4020407@cwilson.fastmail.fm \
--to=cygwin@cwilson.fastmail.fm \
--cc=bug-gnu-libiconv@gnu.org \
--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).