changeset 10613:65655eaefcef

Arrange to replace the close() function when needed.
author Bruno Haible <bruno@clisp.org>
date Fri, 10 Oct 2008 03:57:05 +0200
parents ef47c557866d
children c5d07fcd0933
files ChangeLog m4/close.m4
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-09  Bruno Haible  <bruno@clisp.org>
+
+	* m4/close.m4 (gl_FUNC_CLOSE): Arrange to replace the close() function when
+	the sys_socket module is present and the system has <winsock2.h>.
+
 2008-10-09  Bruno Haible  <bruno@clisp.org>
 
 	* doc/posix-functions/close.texi: Mention module 'close' instead of
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -6,7 +6,12 @@
 
 AC_DEFUN([gl_FUNC_CLOSE],
 [
-  :
+  m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
+    gl_PREREQ_SYS_H_WINSOCK2
+    if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
+      gl_REPLACE_CLOSE
+    fi
+  ])
 ])
 
 AC_DEFUN([gl_REPLACE_CLOSE],