libgpg-error : code-from-errno.h not correctly generated when cross-compiling to Windows on Linux

Vincent Torri vincent.torri at gmail.com
Mon Oct 3 05:02:35 CEST 2011


On Sun, Oct 2, 2011 at 11:32 PM, Vincent Torri <vincent.torri at gmail.com>wrote:

>
>
> On Sat, Oct 1, 2011 at 7:34 AM, Vincent Torri <vincent.torri at gmail.com>wrote:
>
>>
>>
>> On Fri, Sep 30, 2011 at 4:58 PM, Werner Koch <wk at gnupg.org> wrote:
>>
>>> On Fri, 30 Sep 2011 10:02, vincent.torri at gmail.com said:
>>>
>>> > configuration: ./configure --prefix=/opt/efl --host=x86_64-w64-mingw32
>>> > --disable-nls --disable-static
>>>
>>
>> I actually have the same problem when cross compiling to win32 :
>>
>> configuration :  ./configure --prefix=/opt/efl --host=i686-w64-mingw32
>> --disable-nls --disable-static
>>
>> exactly the same problem
>>
>
> Just lookin at the output of ./mkerrcodes, I get:
>
> -2147168224    GPG_ERR_EPROTO
> 1    GPG_ERR_EPERM
> 2    GPG_ERR_ENOENT
> etc...
>
> So it seems that  there is a problem with the fact that GPG_ERR_EPROTO is
> negative (i think). So integer size overflow.
>
> I changed mkerrcodes.c so that it displays an unsigned int. The 2 changes
> lines are:
>
>   unsigned int i;
>

that change is not necessary, of course, but as i >= 0 anyway...

Vincent Torri


> ...
>     printf ("%u\t%s\n", err_table[i].err, err_table[i].err_sym);
>
> and it works now.
>
> regards
>
> Vincent
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20111003/9547425a/attachment.htm>


More information about the Gcrypt-devel mailing list