* process.h (PSET): Remove.
[emacs.git] / m4 / pselect.m4
blob97bf12cd2d60aec5291c9958e4f0786479e399da
1 # pselect.m4
2 dnl Copyright (C) 2011-2012 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_PSELECT],
9   AC_REQUIRE([gl_HEADER_SYS_SELECT])
10   AC_REQUIRE([AC_C_RESTRICT])
11   AC_CHECK_FUNCS_ONCE([pselect])
13   if test $ac_cv_func_pselect = yes; then
14     AC_CACHE_CHECK([whether signature of pselect conforms to POSIX],
15       gl_cv_sig_pselect,
16       [AC_LINK_IFELSE(
17          [AC_LANG_PROGRAM(
18               [[#include <sys/select.h>
19                 ]],
20               [[int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21                           struct timespec const *restrict,
22                           sigset_t const *restrict) = pselect;
23                 return !p;]])],
24          [gl_cv_sig_pselect=yes],
25          [gl_cv_sig_pselect=no])])
26   fi
28   if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then
29     REPLACE_PSELECT=1
30   fi