From 02525acf32d967b58621f513b136c16c5cd47b5f Mon Sep 17 00:00:00 2001 From: gbeauche <> Date: Tue, 24 Jan 2006 23:47:09 +0000 Subject: [PATCH] Use FIONBIO only on pretty ancient systems. --- SheepShaver/src/Unix/configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/SheepShaver/src/Unix/configure.ac b/SheepShaver/src/Unix/configure.ac index 5f6f62f8..4714e933 100644 --- a/SheepShaver/src/Unix/configure.ac +++ b/SheepShaver/src/Unix/configure.ac @@ -432,6 +432,30 @@ AC_CHECK_FILE([/dev/ptc], ) dnl (end of code from openssh-3.2.2p1 configure.ac) +dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK) +dnl doesn't work or is unimplemented. On these systems (mostly older +dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4] +AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O], + ac_cv_nonblocking_io, [ + case "$host" in + *-*-osf*) + ac_cv_nonblocking_io=FIONBIO + ;; + *-*-sunos4*) + ac_cv_nonblocking_io=FIONBIO + ;; + *-*-ultrix*) + ac_cv_nonblocking_io=FIONBIO + ;; + *) + ac_cv_nonblocking_io=O_NONBLOCK + ;; + esac +]) +if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then + AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used]) +fi + dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) AC_DEFUN(AC_CHECK_FRAMEWORK, [ AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl