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],
18 [[#include <sys/select.h>
20 [[int (*p) (int, fd_set *, fd_set *, fd_set *restrict,
21 struct timespec const *restrict,
22 sigset_t const *restrict) = pselect;
24 [gl_cv_sig_pselect=yes],
25 [gl_cv_sig_pselect=no])])
28 if test $ac_cv_func_pselect = no || test $gl_cv_sig_pselect = no; then