bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: winsock: needs access to SOCKET in application code


From: Bruno Haible
Subject: Re: winsock: needs access to SOCKET in application code
Date: Tue, 10 Feb 2009 00:37:46 +0100
User-agent: KMail/1.9.9

Simon,

> +/* This function is useful it you create a socket using gnulib's
> +   Winsock wrappers but needs to pass on the socket handle to some
> +   other library that only accepts sockets. */
> +#if WINDOWS_SOCKETS
> +static inline SOCKET
> +gl_fd_to_handle (int fd)
> +{
> +  return _get_osfhandle (fd);
> +}
> +#else
> +#define gl_fd_to_handle(x) (x)
> +#endif
> +

Looks fine. But this requires a
  AC_REQUIRE([AC_C_INLINE])
somewhere, no?

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]