summaryrefslogtreecommitdiff
path: root/m4/close.m4
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-10-22 16:24:32 +0200
committerLudovic Courtès <ludo@gnu.org>2011-10-22 16:24:32 +0200
commit35428fb6b2d269dbfa2eec7d0739aec149bd4cc2 (patch)
tree03146c5871ad9b2167f3dffc89fdbb3082d7fc4e /m4/close.m4
parentfe4ea6859e7d19a0fe2694a3fb49f4abb722afc1 (diff)
downloadguile-35428fb6b2d269dbfa2eec7d0739aec149bd4cc2.tar.gz
Update Gnulib to v0.0-6523-gb3609c1.
Diffstat (limited to 'm4/close.m4')
-rw-r--r--m4/close.m427
1 files changed, 17 insertions, 10 deletions
diff --git a/m4/close.m4 b/m4/close.m4
index fc131381a..f860a320c 100644
--- a/m4/close.m4
+++ b/m4/close.m4
@@ -1,4 +1,4 @@
-# close.m4 serial 5
+# close.m4 serial 8
dnl Copyright (C) 2008-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,
@@ -6,21 +6,28 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSE],
[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([gl_MSVC_INVAL])
+ if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+ REPLACE_CLOSE=1
+ fi
m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
gl_PREREQ_SYS_H_WINSOCK2
if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
dnl Even if the 'socket' module is not used here, another part of the
dnl application may use it and pass file descriptors that refer to
dnl sockets to the close() function. So enable the support for sockets.
- gl_REPLACE_CLOSE
+ REPLACE_CLOSE=1
+ fi
+ ])
+ dnl Replace close() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ if test $REPLACE_CLOSE = 0; then
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
+ REPLACE_CLOSE=1
+ fi
fi
])
-])
-
-AC_DEFUN([gl_REPLACE_CLOSE],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- REPLACE_CLOSE=1
- AC_LIBOBJ([close])
- gl_REPLACE_FCLOSE
])