[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Winsock wrappers
From: |
Simon Josefsson |
Subject: |
Winsock wrappers |
Date: |
Wed, 08 Oct 2008 17:58:03 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) |
With GnuTLS 2.6.0 released, I finally have time to look into the winsock
wrappers.
This patch:
> --- a/m4/sys_socket_h.m4
> +++ b/m4/sys_socket_h.m4
> @@ -64,6 +64,9 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
> HAVE_WS2TCPIP_H=0
> fi
> fi
> + if test x$ac_cv_header_winsock2_h = xyes; then
> + AC_LIBOBJ(winsock)
> + fi
Causes problems for me. GnuTLS only calls recv+send from the POSIX
socket functions (the rest are called by the application), and it
handles Windows error codes internally. Thus, I don't want send/recv to
be replaced by gnulib, but I want a sys/socket.h header file.
I have seen Bruno's recent patch to add separate modules for each and
every socket function. That's a better approach IMHO.
Further, as far as I can tell, Bruno's gnulib module descriptions will
pull in the winsock file when needed. Thus, I don't think the
sys_socket module should pull in the winsock.c file unconditionally. As
far as I can tell, winsock.c is mostly a dummy file if none of the other
module are used.
Thus, I have pushed this change.
Thoughts?
/Simon
>From e7882b0df94392d31c073bf4baa3b7491249189e Mon Sep 17 00:00:00 2001
From: Simon Josefsson <address@hidden>
Date: Wed, 8 Oct 2008 17:54:22 +0200
Subject: [PATCH] m4/sys_socket_h.m4: Don't AC_LIBOBJ(winsock).
---
ChangeLog | 6 ++++++
m4/sys_socket_h.m4 | 3 ---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 931b308..4c1bdaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-08 Simon Josefsson <address@hidden>
+
+ * m4/sys_socket_h.m4: Don't AC_LIBOBJ(winsock). The file is
+ AC_LIBOBJ'ed by each gnulib module that needs it (e.g., socket,
+ listen).
+
2008-10-07 Bruno Haible <address@hidden>
Use a more portable replacement expression for -0.0L.
diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4
index 9981abc..1e38ee3 100644
--- a/m4/sys_socket_h.m4
+++ b/m4/sys_socket_h.m4
@@ -60,9 +60,6 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET],
fi
fi
gl_PREREQ_SYS_H_WINSOCK2
- if test x$ac_cv_header_winsock2_h = xyes; then
- AC_LIBOBJ(winsock)
- fi
AC_SUBST([HAVE_SYS_SOCKET_H])
AC_SUBST([HAVE_WS2TCPIP_H])
fi
--
1.5.6.5
- Winsock wrappers,
Simon Josefsson <=
- Re: Winsock wrappers, Bruno Haible, 2008/10/08
- Re: Winsock wrappers, Simon Josefsson, 2008/10/09
- Re: Winsock wrappers, Paolo Bonzini, 2008/10/09
- Re: Winsock wrappers, Simon Josefsson, 2008/10/09
- Re: Winsock wrappers, Paolo Bonzini, 2008/10/09
- Re: Winsock wrappers, Simon Josefsson, 2008/10/09
- Re: Winsock wrappers, Paolo Bonzini, 2008/10/09
- Re: Winsock wrappers, Simon Josefsson, 2008/10/09
- Re: Winsock wrappers, Bruno Haible, 2008/10/10
- Re: Winsock wrappers, Simon Josefsson, 2008/10/10