GNU bug report logs - #10474
Building guile 2.x under mingw + msys

Previous Next

Package: guile;

Reported by: Andy Wingo <wingo <at> pobox.com>

Date: Tue, 10 Jan 2012 21:59:02 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andy Wingo <wingo <at> pobox.com>
Cc: ludo <at> gnu.org, 10474 <at> debbugs.gnu.org
Subject: bug#10474: Building guile 2.x under mingw + msys
Date: Thu, 21 Feb 2013 05:49:00 +0200
> From: Andy Wingo <wingo <at> pobox.com>
> Cc: ludo <at> gnu.org,  10474 <at> 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.




This bug report was last modified 12 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.