From: Jarkko Hietaniemi Date: Sat, 11 Mar 2000 18:27:54 +0000 (+0000) Subject: metaconfig-ify the test for broken fflush(NULL) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b8ee12442001da9730d16040580477c79f88fb0;p=p5sagit%2Fp5-mst-13.2.git metaconfig-ify the test for broken fflush(NULL) (which ails e.g. Solaris), from Ulrich Pfeifer. p4raw-id: //depot/cfgperl@5659 --- diff --git a/Configure b/Configure index d9681ef..40a6169 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 Fri Mar 10 03:07:09 EET 2000 [metaconfig 3.0 PL70] +# Generated on Sat Mar 11 20:26:09 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <&4 <tryp.c < +int +main(int argc, char **argv) +{ + char buf[1024]; + int i; + char *bp = buf; + while (1) { + while ((i = getc(stdin)) != -1 + && (*bp++ = i) != '\n' + && bp < &buf[1024]) + /* DO NOTHING */ ; + *bp = '\0'; + fprintf(stdout, "%s", buf); + fflush(NULL); + if (i == -1) + return 0; + bp = buf; + } +} +EOCP + fflushNULL="$define" + set tryp + if eval $compile; then + $rm -f tryp.out + $cat tryp.c | ./tryp$exe_ext 2>/dev/null > tryp.out + if cmp tryp.c tryp.out >/dev/null 2>&1; then + $cat >&4 <&4 <&4 <&4 <