[PATCH] Re: GCC build failed for native with your patch on 2003-07-05T00:22:37Z.

Andrew Pinski pinskia@physics.uc.edu
Sat Jul 5 12:58:00 GMT 2003


On Saturday, Jul 5, 2003, at 02:59 US/Eastern, Zack Weinberg wrote:

> Andrew Pinski <pinskia@physics.uc.edu> writes:
>
>> This is caused by Darwin not having iconv so iconv_t is defined in
>> cpphash.h as int but is
>> compared to size_t in convert_cset in cppcharset.c on line 217.
>>
>> There are two ways to fix this, either by changing iconv_t to be the
>> same as size_t or
>> change the comparison to be of type incov_t.
>> Doing both is the safest.
>
> Actually, neither of these is the right fix.  The return type of iconv 
> is
> size_t.  The problem is with the fallback macro.
>
> The appended patch should at least get you farther.
>
> zw
>
>         * cppcharset.c: Use the correct return type for the fallback
>         iconv macro.

You are right sorry, I should have looked at the definitions of iconv()
of a different machine, rather than guessing.

Thanks,
Andrew Pinski



More information about the Gcc-patches mailing list