1 # nonblocking.m4 serial 2
2 dnl Copyright (C) 2011-2018 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 dnl Tests whether non-blocking I/O is natively supported by read(), write().
8 dnl Sets gl_cv_have_nonblocking.
9 dnl Also tests whether open() supports O_NONBLOCK.
10 dnl Sets gl_cv_have_open_O_NONBLOCK.
11 AC_DEFUN([gl_NONBLOCKING_IO],
13 dnl Use AC_REQUIRE here, so that the default behavior below is expanded
14 dnl once only, before all statements that occur in other macros.
15 AC_REQUIRE([gl_NONBLOCKING_IO_BODY])
18 AC_DEFUN([gl_NONBLOCKING_IO_BODY],
20 AC_REQUIRE([AC_CANONICAL_HOST])
22 mingw*) gl_cv_have_nonblocking=no ;;
23 *) gl_cv_have_nonblocking=yes ;;
26 mingw*) gl_cv_have_open_O_NONBLOCK=no ;;
27 *) gl_cv_have_open_O_NONBLOCK=yes ;;