Re: setsockopt on mingw

2008-04-28 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > Hi Simon, > > * Simon Josefsson wrote on Mon, Apr 28, 2008 at 04:39:08PM CEST: >> --- a/m4/sys_socket_h.m4 >> +++ b/m4/sys_socket_h.m4 >> @@ -45,6 +45,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], >>HAVE_WINSOCK2_H=0 >>HAVE_WS2TCPIP_H=0 >>

Re: setsockopt on mingw

2008-04-28 Thread Ralf Wildenhues
Hi Simon, * Simon Josefsson wrote on Mon, Apr 28, 2008 at 04:39:08PM CEST: > --- a/m4/sys_socket_h.m4 > +++ b/m4/sys_socket_h.m4 > @@ -45,6 +45,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], >HAVE_WINSOCK2_H=0 >HAVE_WS2TCPIP_H=0 > else > + AC_REQUIRE([AC_C_INLINE]) >HAVE_S

Re: setsockopt on mingw

2008-04-28 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: > Simon Josefsson wrote: >> +# if defined _WIN32 || defined __WIN32__ > > This is not the right preprocessor test for mingw: It may also evaluate to > true on Cygwin. But Cygwin has the right declaration of setsockopt and does > not need a fix. The right #i

Re: setsockopt on mingw

2008-04-26 Thread Bruno Haible
Simon Josefsson wrote: > > # if defined _WIN32 || defined __WIN32__ > > # define setsockopt(a,b,c,d,e) rpl_setsockopt(a,b,c,d,e) > > static inline int > > rpl_setsockopt(int socket, int level, int optname, const void *optval, > >socklen_t optlen) > > { > > return (setsockopt)(soc

Re: setsockopt on mingw

2008-04-26 Thread Bruno Haible
Simon Josefsson wrote: > +# if defined _WIN32 || defined __WIN32__ This is not the right preprocessor test for mingw: It may also evaluate to true on Cygwin. But Cygwin has the right declaration of setsockopt and does not need a fix. The right #if here is #if (defined _WIN32 || defined __WIN32__)

Re: setsockopt on mingw

2008-04-22 Thread Simon Josefsson
Ben Pfaff <[EMAIL PROTECTED]> writes: > Simon Josefsson <[EMAIL PROTECTED]> writes: > >> The follow patch appear to silent compiler warnings. Can anyone think >> of a better way to fix this? If not I'll commit and push this shortly. > [...] >> +# if defined _WIN32 || defined __WIN32__ >> +# def

Re: setsockopt on mingw

2008-04-22 Thread Ben Pfaff
Simon Josefsson <[EMAIL PROTECTED]> writes: > The follow patch appear to silent compiler warnings. Can anyone think > of a better way to fix this? If not I'll commit and push this shortly. [...] > +# if defined _WIN32 || defined __WIN32__ > +# define setsockopt(a,b,c,d,e) setsockopt(a,b,c,(cons

setsockopt on mingw

2008-04-22 Thread Simon Josefsson
Hi. Under MinGW, setsockopt has a 'const char*' 4th argument instead of 'const void*' as specified by POSIX, compare: http://www.opengroup.org/onlinepubs/009695399/functions/setsockopt.html with http://msdn2.microsoft.com/en-us/library/ms740476.aspx This was raised in this report against gnutl