This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Configure: O_NONBLOCK test uses fork() and pipe()
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 1 Jun 2007 04:31:03 +0000 (07:31 +0300)
committerH.Merijn Brand <h.m.brand@xs4all.nl>
Fri, 1 Jun 2007 06:36:47 +0000 (06:36 +0000)
Message-Id: <200706010131.l511V3kv417484@kosh.hut.fi>

p4raw-id: //depot/metaconfig@31322

U/compline/nblock_io.U

index b6cf442..80e3f8a 100644 (file)
@@ -23,7 +23,7 @@
 ?X:
 ?MAKE:o_nonblock eagain rd_nodata d_eofnblk: cat rm_try Compile run \
        d_open3 h_sysfile h_fcntl signal_t hint Oldconfig Setvar \
-       startsh i_unistd i_string i_fcntl i_stdlib
+       startsh i_unistd i_string i_fcntl i_stdlib d_fork d_pipe
 ?MAKE: -pick add $@ %<
 ?S:o_nonblock:
 ?S:    This variable bears the symbol value to be used during open() or fcntl()
@@ -138,6 +138,8 @@ echo " "
 echo "Let's see what value errno gets from read() on a $o_nonblock file..." >&4
 case "$eagain" in
 '')
+       case "$d_fork:$d_pipe" in
+       define:define)
        $cat head.c > try.c
        $cat >>try.c <<EOCP
 #include <errno.h>
@@ -271,6 +273,12 @@ EOCP
                echo "I can't compile the test program--assuming errno EAGAIN will do."
                eagain=EAGAIN
        fi
+       ;;
+       *)      echo "Can't figure out how to test this--assuming errno EAGAIN will do."
+               eagain=EAGAIN
+               val="$define"
+               ;;
+       esac
        set d_eofnblk
        eval $setvar
        ;;