summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-05-21 22:28:43 +0200
committerBruno Haible <bruno@clisp.org>2011-05-21 22:28:43 +0200
commitb92e7dde88f196a4bd73da8f868b7284e587db68 (patch)
tree67fccc0aa6da9784cc27d2f9eb26b1b9b80216be
parent42c85ef5f0b7954615b91cc7d9f67791faa7d05a (diff)
downloadgnulib-b92e7dde88f196a4bd73da8f868b7284e587db68.tar.gz
select: Simplify replacement idiom.
* m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native Win32 platforms. * lib/sys_select.in.h (select): Simplify accordingly. * modules/select (Depends-on): Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--lib/sys_select.in.h2
-rw-r--r--m4/select.m43
-rw-r--r--modules/select4
4 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 5451dcd2be..6e14e2ca26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-05-21 Bruno Haible <bruno@clisp.org>
+ select: Simplify replacement idiom.
+ * m4/select.m4 (gl_FUNC_SELECT): Set REPLACE_SELECT also on native
+ Win32 platforms.
+ * lib/sys_select.in.h (select): Simplify accordingly.
+ * modules/select (Depends-on): Likewise.
+
+2011-05-21 Bruno Haible <bruno@clisp.org>
+
mkdir-p: Simplify autoconf macro.
* m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't require gl_FUNC_LCHMOD,
gl_FUNC_LCHOWN.
diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h
index c378f10dbf..acc0352eef 100644
--- a/lib/sys_select.in.h
+++ b/lib/sys_select.in.h
@@ -89,7 +89,7 @@
#if @GNULIB_SELECT@
-# if @HAVE_WINSOCK2_H@ || @REPLACE_SELECT@
+# if @REPLACE_SELECT@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef select
# define select rpl_select
diff --git a/m4/select.m4 b/m4/select.m4
index dc771d0ef4..0b21c97a0b 100644
--- a/m4/select.m4
+++ b/m4/select.m4
@@ -1,4 +1,4 @@
-# select.m4 serial 3
+# select.m4 serial 4
dnl Copyright (C) 2009-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -10,6 +10,7 @@ AC_DEFUN([gl_FUNC_SELECT],
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_REQUIRE([gl_SOCKETS])
if test "$ac_cv_header_winsock2_h" = yes; then
+ REPLACE_SELECT=1
AC_LIBOBJ([select])
else
dnl On Interix 3.5, select(0, NULL, NULL, NULL, timeout) fails with error
diff --git a/modules/select b/modules/select
index ab4af6e7cb..c6412c1637 100644
--- a/modules/select
+++ b/modules/select
@@ -7,8 +7,8 @@ m4/select.m4
Depends-on:
sys_select
-alloca [test "$ac_cv_header_winsock2_h" = yes || test $REPLACE_SELECT = 1]
-sockets [test "$ac_cv_header_winsock2_h" = yes || test $REPLACE_SELECT = 1]
+alloca [test $REPLACE_SELECT = 1]
+sockets [test $REPLACE_SELECT = 1]
configure.ac:
gl_FUNC_SELECT