[Help-gnutls] Re: gnutls 2.3.4 doesn't copile using MinGW

Simon Josefsson simon at josefsson.org
Tue Apr 22 10:08:09 CEST 2008


Massimo Gaspari <massimo.gaspari at alice.it> writes:

> Simon Josefsson wrote:
>> But please try latest 2.3.7 instead, it should contain all fixes.
>>   http://alpha.gnu.org/gnu/gnutls/gnutls-2.3.7.tar.bz2
>>   ftp://alpha.gnu.org/gnu/gnutls/gnutls-2.3.7.tar.bz2
>>
>> /Simon
>>   
>
> Ok, downloaded and configured as usual. GnuTLS compiles out of the box
> and make check is successful (no errors!).

Great.  Thanks for testing.

> I don't want to be a perfectionist but I am listing the few very minor
> issues.
>
>
> 1) a warning realted to vasprintf (an old friend , isn't it?)
>
> gnutls_str.c: In function '_gnutls_string_append_printf':
> gnutls_str.c:238: warning: implicit declaration of function 'vasprintf'

This seems strange.  The gnutls_str.c file includes gnutls_int.h which
includes defines.h which includes stdio.h.  Gnulib will create stdio.h
if mingw doesn't provide one with suitable vasprintf declaration.  Can
you search for vasprintf in lgl/stdio.h and show me how the block looks?

> 2) A warning related to inet_pton. In a previous e-mail you said
>
>> Problem in gnulib, I'll see if I can get these fixed.  I don't think
>> this is important though.
>
> I usually think that an implicit declaration is always dangerous, but
> you are the expert!
...
> tcp.c:41: warning: implicit declaration of function 'inet_pton'
>
> This warnig appears in some other files.

The proper fix is to make gnulib's arpa/inet.h define them.  I'll work
on this.

> 3)  A warning about 'setsockopt'.
> In a previous e-mail you said
>
>>Probably a buggy system header file, the argument should be 'void*'
>>which should be castable from any type.
>
> Uhm... in the MSDN documentation the 4th argument is  const char* and
> in MinGW  setsockopt  is in
> winsock.h,winsock2.h and ws2spi.h. In all includes the 4th argument is
> const char*. May be in some other platform is void * but in Windows I
> think is definitively const char *.
...
> ex-serv-export.c:182: warning: passing argument 4 of 'setsockopt' from
> incompatible pointer type

According to POSIX it should be 'const void*':

http://www.opengroup.org/onlinepubs/009695399/functions/setsockopt.html

Gnulib should probably needs to add a wrapper for this as well.

> 4) several
>
> libtool: link: warning: `-no-install' is ignored for i686-pc-mingw32
> libtool: link: warning: assuming `-no-fast-install' instead
>
> We can ignore those..

I think those are harmless libtool problems, but I'm not sure.  If you
(or anyone) wants to track it down and investigate it, please do.

/Simon





More information about the Gnutls-help mailing list