This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Spelling - megapatch
[metaconfig.git] / U / compline / nblock_io.U
index 269796c..71b9158 100644 (file)
@@ -1,11 +1,11 @@
 ?RCS: $Id: nblock_io.U,v 3.0.1.2 1997/02/28 16:17:14 ram Exp $
 ?RCS:
 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
-?RCS: 
-?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic License,
 ?RCS: as specified in the README file that comes with the distribution.
 ?RCS: You may reuse parts of this distribution only within the terms of
-?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: that same Artistic License; a copy of which may be found at the root
 ?RCS: of the source tree for dist 3.0.
 ?RCS:
 ?RCS: $Log: nblock_io.U,v $
@@ -21,9 +21,9 @@
 ?X: Simplify here document for shells that can't handle them well.
 ?X: (Problem reported on FreeBSD; it's unclear if this helps.)  --AD
 ?X:
-?MAKE:o_nonblock eagain rd_nodata d_eofnblk: cat rm Compile run \
+?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()
@@ -73,8 +73,8 @@
 ?H:#define RD_NODATA $rd_nodata
 ?H:#$d_eofnblk EOF_NONBLOCK
 ?H:.
-?F:!try.out !try.ret !try.err
 ?T:status
+?F:!try.out !try.ret !try.err !try !mtry
 ?LINT:use d_open3
 : check for non-blocking I/O stuff
 case "$h_sysfile" in
@@ -132,18 +132,20 @@ EOCP
        ;;
 *) echo "Using $hint value $o_nonblock.";;
 esac
-$rm -f try try.* .out core
+$rm_try
 
 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>
 #include <sys/types.h>
 #include <signal.h>
-#include <stdio.h> 
+#include <stdio.h>
 #$i_stdlib I_STDLIB
 #ifdef I_STDLIB
 #include <stdlib.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
        ;;
@@ -288,5 +296,5 @@ EOCP
        esac
        ;;
 esac
-$rm -f try try.* .out core head.c mtry
+$rm_try head.c mtry