From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.bugs Subject: bug#10474: Building guile 2.x under mingw + msys Date: Thu, 21 Feb 2013 05:49:00 +0200 Message-ID: <83a9qynx77.fsf@gnu.org> References: <87pqerdxq4.fsf@pobox.com> <83ehuy698u.fsf@gnu.org> <8362ga5h7h.fsf@gnu.org> <87r4ywpnv0.fsf@gnu.org> <83r4yw49u6.fsf@gnu.org> <87y5smnj86.fsf@pobox.com> <83ehudp29y.fsf@gnu.org> <87y5ekx9u2.fsf@pobox.com> <83ip5mokzx.fsf@gnu.org> <87y5eisl6p.fsf@pobox.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1361418595 21946 80.91.229.3 (21 Feb 2013 03:49:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 03:49:55 +0000 (UTC) Cc: ludo@gnu.org, 10474@debbugs.gnu.org To: Andy Wingo Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Feb 21 04:50:17 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8NAj-0000iw-DL for guile-bugs@m.gmane.org; Thu, 21 Feb 2013 04:50:13 +0100 Original-Received: from localhost ([::1]:34124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8NAP-00080x-2G for guile-bugs@m.gmane.org; Wed, 20 Feb 2013 22:49:53 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:54559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8NAL-00080q-W2 for bug-guile@gnu.org; Wed, 20 Feb 2013 22:49:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8NAK-0006h1-CS for bug-guile@gnu.org; Wed, 20 Feb 2013 22:49:49 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8NAK-0006gu-9P for bug-guile@gnu.org; Wed, 20 Feb 2013 22:49:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U8NBW-0002Lq-22 for bug-guile@gnu.org; Wed, 20 Feb 2013 22:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 21 Feb 2013 03:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10474 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10474-submit@debbugs.gnu.org id=B10474.13614186068966 (code B ref 10474); Thu, 21 Feb 2013 03:51:01 +0000 Original-Received: (at 10474) by debbugs.gnu.org; 21 Feb 2013 03:50:06 +0000 Original-Received: from localhost ([127.0.0.1]:41014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8NAb-0002KZ-Hm for submit@debbugs.gnu.org; Wed, 20 Feb 2013 22:50:05 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:35381) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8NAY-0002K2-9o for 10474@debbugs.gnu.org; Wed, 20 Feb 2013 22:50:03 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MIJ00E00X70AS00@a-mtaout20.012.net.il> for 10474@debbugs.gnu.org; Thu, 21 Feb 2013 05:48:45 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MIJ00D8TX99UU90@a-mtaout20.012.net.il>; Thu, 21 Feb 2013 05:48:45 +0200 (IST) In-reply-to: <87y5eisl6p.fsf@pobox.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6766 Archived-At: > From: Andy Wingo > Cc: ludo@gnu.org, 10474@debbugs.gnu.org > Date: Wed, 20 Feb 2013 22:57:18 +0100 > > >> > --- libguile/ports.c~0 2011-10-08 01:49:48.000000000 +0200 > >> > +++ libguile/ports.c 2012-01-15 15:11:11.856706600 +0200 > >> > @@ -1305,7 +1305,7 @@ get_iconv_codepoint (SCM port, scm_t_wch > >> > input_left = bytes_consumed + 1; > >> > output_left = sizeof (utf8_buf); > >> > > >> > - done = iconv (pt->input_cd, &input, &input_left, > >> > + done = iconv (pt->input_cd, (const char **)&input, &input_left, > >> > &output, &output_left); > >> > if (done == (size_t) -1) > >> > { > >> > > >> > >> However iconv is specified > >> (http://pubs.opengroup.org/onlinepubs/009695399/functions/iconv.html) to > >> take a char** as the first argument. Don't we end up using a GNU iconv > >> on mingw32 anyway? > > > > Yes, we do use GNU iconv. However, the version of iconv.h (from GNU > > iconv version 1.13, I think) that I have declares the function like > > this: > > > > extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft); > > In these files, `input' is a char*. So &input should be a char**. > Shouldn't that cast to const char** without a warning? Maybe it's some obscure bug my compiler. If you can get away without a warning in such situations, even when the prototype does specify "const char **", then feel free to disregard these changes. They are certainly not Windows or MinGW specific.