Please check the GNU Autoconf Macro Archive for Updates
AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

ac_sys_dev_poll

Back to the Main Page.

Synopsis
AC_SYS_DEV_POLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
, 
Version

2003-10-29

Author

Dave Benson <daveb@ffem.org>

License

AllPermissive
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Users of this software should generally follow the principles of the MIT License includings its disclaimer.

Category

cryp.to ac-archive's Miscellaneous (released)

Documentation

This macro tests for the presence of /dev/poll support in the build environment. It checks that the needed structure (dvpoll) is available, with the standard fields. /dev/poll is most often seen under Solaris.

Note that it does not attempt to actually open /dev/poll -- you should test for errors when you open it and then fall back to poll() if it is unavailable.

M4 Source Code
AC_DEFUN([AC_SYS_DEV_POLL], [AC_CACHE_CHECK(for /dev/poll support, ac_cv_dev_poll,
    AC_TRY_COMPILE([#include &lt;sys/ioctl.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;sys/types.h&gt;
#include &lt;sys/poll.h&gt;
#include &lt;sys/devpoll.h&gt;],
[
  struct dvpoll p;
  p.dp_timeout = 0;
  p.dp_nfds = 0;
  p.dp_fds = (struct pollfd *) 0;
  return 0;
],
    ac_cv_dev_poll=yes
    [$1],
    ac_cv_dev_poll=no
    [$2]
    )
  )
])