From: Jarkko Hietaniemi Date: Wed, 21 Feb 2001 15:09:33 +0000 (+0000) Subject: Fix the sys/fcntl.h problem reported by Peter Prymmer. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0acbdc36d211b2eba42328df555d9ec49fa4cd4;p=p5sagit%2Fp5-mst-13.2.git Fix the sys/fcntl.h problem reported by Peter Prymmer. p4raw-id: //depot/perl@8877 --- diff --git a/Configure b/Configure index 22db84f..0abc4fe 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Wed Feb 21 16:35:15 EET 2001 [metaconfig 3.0 PL70] +# Generated on Wed Feb 21 17:01:28 EET 2001 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <" > head.c;; -esac -case "$h_fcntl" in -true) echo "#include " >> head.c;; -*) echo "#include " >> head.c;; +true) echo "#include " > head.c;; +*) + case "$h_fcntl" in + true) echo "#include " > head.c;; + *) echo "#include " > head.c;; + esac + ;; esac echo " " echo "Figuring out the flag used by open() for non-blocking I/O..." >&4 @@ -8896,8 +8898,12 @@ int main() int ret; close(pd[1]); /* Parent reads from pd[0] */ close(pu[0]); /* Parent writes (blocking) to pu[1] */ +#ifdef F_SETFL if (-1 == fcntl(pd[0], F_SETFL, MY_O_NONBLOCK)) exit(1); +#else + exit(4); +#endif signal(SIGALRM, blech); alarm(5); if ((ret = read(pd[0], buf, 1)) > 0) /* Nothing to read! */ @@ -8944,6 +8950,7 @@ EOCP 1) echo "Could not perform non-blocking setting!";; 2) echo "I did a successful read() for something that was not there!";; 3) echo "Hmm... non-blocking I/O does not seem to be working!";; + 4) echo "Could not find F_SETFL!";; *) echo "Something terribly wrong happened during testing.";; esac rd_nodata=`$cat try.ret`