Update Gnulib; add new modules.
[bpt/guile.git] / m4 / close.m4
CommitLineData
49114fd4
LC
1# close.m4 serial 5
2dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_FUNC_CLOSE],
8[
9 m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [
10 gl_PREREQ_SYS_H_WINSOCK2
11 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
12 dnl Even if the 'socket' module is not used here, another part of the
13 dnl application may use it and pass file descriptors that refer to
14 dnl sockets to the close() function. So enable the support for sockets.
15 gl_REPLACE_CLOSE
16 fi
17 ])
18])
19
20AC_DEFUN([gl_REPLACE_CLOSE],
21[
22 AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
23 REPLACE_CLOSE=1
24 AC_LIBOBJ([close])
25 gl_REPLACE_FCLOSE
26])