dnl CF_TYPE_FD_MASK version: 2 updated: 2008/03/25 20:59:57
dnl ---------------
dnl Check for the declaration of fd_mask, which is like fd_set, associated
dnl with select().  The check for fd_set should have pulled in this as well,
dnl but there is a special case for Mac OS X, possibly other BSD-derived
dnl platforms.
AC_DEFUN([CF_TYPE_FD_MASK],
[
AC_REQUIRE([CF_TYPE_FD_SET])

AC_CACHE_CHECK(for declaration of fd_mask,cf_cv_type_fd_mask,[
    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
        AC_TRY_COMPILE([
#include <X11/Xpoll.h>],[fd_mask x],,
        [CF_MSG_LOG(if we must define CSRG_BASED)
# Xosdefs.h on Mac OS X may not define this (but it should).
            AC_TRY_COMPILE([
#define CSRG_BASED
#include <X11/Xpoll.h>],[fd_mask x],
        cf_cv_type_fd_mask=CSRG_BASED)])
    else
        cf_cv_type_fd_mask=$cf_cv_type_fd_set
    fi
])
if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
    AC_DEFINE(CSRG_BASED)
fi
])dnl
