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: Simon Josefsson
Subject: Re: winsock: needs access to SOCKET in application code
Date: Tue, 10 Feb 2009 13:16:46 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux)

Bruno Haible <address@hidden> writes:

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

Good catch, I pushed the patch below.

Thanks,
Simon

>From 3bdf93ba20f0b48746a04dd07aede34c89491205 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Tue, 10 Feb 2009 13:16:22 +0100
Subject: [PATCH] sockets: Call AC_C_INLINE.

---
 ChangeLog     |    5 +++++
 m4/sockets.m4 |    4 +++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d549dcd..4325ff7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-10  Simon Josefsson  <address@hidden>
+
+       * m4/sockets.m4: Call AC_C_INLINE since sockets.h now can use
+       inline keywords.  Reported by Bruno Haible <address@hidden>.
+
 2009-02-10  Bruno Haible  <address@hidden>
 
        * lib/unilbrk/lbrktables.h: Renamed from lib/unilbrk/tables.h.
diff --git a/m4/sockets.m4 b/m4/sockets.m4
index d5a7dbf..db71bf1 100644
--- a/m4/sockets.m4
+++ b/m4/sockets.m4
@@ -1,4 +1,4 @@
-# sockets.m4 serial 4
+# sockets.m4 serial 5
 dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -6,6 +6,8 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 AC_DEFUN([gl_SOCKETS],
 [
+  AC_REQUIRE([AC_C_INLINE])
+
   gl_PREREQ_SYS_H_WINSOCK2 dnl for HAVE_WINSOCK2_H
   LIBSOCKET=
   if test $HAVE_WINSOCK2_H = 1; then
-- 
1.5.6.5





reply via email to

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