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

Massimo Gaspari massimo.gaspari at alice.it
Tue Apr 22 22:55:17 CEST 2008


Simon Josefsson wrote:
>> 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?
>
>   
Here it is.

#if 1
# if 0
#  define asprintf rpl_asprintf
#  define vasprintf rpl_vasprintf
# endif
# if 0 || !1
  /* Write formatted output to a string dynamically allocated with malloc().
     If the memory allocation succeeds, store the address of the string in
     *RESULT and return the number of resulting bytes, excluding the 
trailing
     NUL.  Upon memory allocation error, or some other error, return -1.  */
  extern int asprintf (char **result, const char *format, ...)
    __attribute__ ((__format__ (__printf__, 2, 3)));
  extern int vasprintf (char **result, const char *format, va_list args)
    __attribute__ ((__format__ (__printf__, 2, 0)));
# endif
#endif

The stdio.in.h says

#if @GNULIB_VASPRINTF@
# if @REPLACE_VASPRINTF@
#  define asprintf rpl_asprintf
#  define vasprintf rpl_vasprintf
# endif
# if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
  /* Write formatted output to a string dynamically allocated with malloc().
     If the memory allocation succeeds, store the address of the string in
     *RESULT and return the number of resulting bytes, excluding the 
trailing
     NUL.  Upon memory allocation error, or some other error, return -1.  */
  extern int asprintf (char **result, const char *format, ...)
    __attribute__ ((__format__ (__printf__, 2, 3)));
  extern int vasprintf (char **result, const char *format, va_list args)
    __attribute__ ((__format__ (__printf__, 2, 0)));
# endif
#endif

And the compiler is right.


>> 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.
>   

Yes but Windows is not POSIX compliant.
>> 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
>   
I'll try to look at that.

 Massimo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20080422/54e1aed7/attachment.htm>


More information about the Gnutls-help mailing list