This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: V3 PATCH: Fix const-correctness in use of iconv
On Thu, Nov 09, 2000 at 12:40:46AM -0800, Mark Mitchell wrote:
> >>>>> "Andreas" == Andreas Jaeger <aj@suse.de> writes:
>
> Andreas> And that's the way to go according to the open group - we
> Andreas> should really write a fixincludes for this.
>
> It's clear we need to do something.
>
> I think it may actually be better to autoconf this. It's a little
> funky to change the type of this function; that may break code written
> for the out-of-date/incorrect definitions that all these OS's used.
> In general, I bet lots of systems have some weirdnesses in their
> headers; traditionally we only fixincluded the bare minimum that was
> necessary to get the headers to be parsable by GCC.
>
> But, I have no strong opinion, and am happy to leave the autoconf
> vs. fixincludes decision to people who know more than I -- both about
> `iconv' and also about the philosophy of fixincludes.
>
> Patches welcome!
Actually, if it is C++ you can use the same trick as libgcj uses for iconv:
see
http://sources.redhat.com/cgi-bin/cvsweb.cgi/libgcj/libjava/gnu/gcj/convert/natIconv.cc.diff?cvsroot=java&r1=text&tr1=1.4&r2=text&tr2=1.5&f=u
Jakub