summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorAndy Dougherty <doughera@lafayette.edu>1999-05-27 08:26:28 -0400
committerJarkko Hietaniemi <jhi@iki.fi>1999-05-27 16:57:19 +0000
commitd2201af29f5816f4d8147ff7af9b9a71b084ce41 (patch)
treec21f9da1c1f3aa7a97178942592c94e7e8eadb26 /Configure
parentce72088916dcda8278192dacefb0dcaf01be131c (diff)
downloadperl-d2201af29f5816f4d8147ff7af9b9a71b084ce41.tar.gz
Re: 5.005_57 NOT OK on SunOS 4.1.3
To: Perl Porters <perl5-porters@perl.org> Message-Id: <Pine.GSU.4.05.9905271120230.22115-100000@newton.phys> p4raw-id: //depot/cfgperl@3488
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure43
1 files changed, 24 insertions, 19 deletions
diff --git a/Configure b/Configure
index bb507e44d1..2cc2bf4aa2 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 May 26 01:56:24 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Thu May 27 19:42:20 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -10962,18 +10962,17 @@ $rm -f tebcdic.c tebcdic
set ebcdic
eval $setvar
-# SunOS has a <unistd.h> which we generally avoid, but need for this test.
-# For everyone else, we'll trust i_unistd.
-t_unistd=$i_unistd
-case "$osname" in
-sunos) $test -f /usr/include/unistd.h && t_unistd=$define ;;
-esac
$cat >&4 <<EOM
Checking how to flush all pending stdio output...
EOM
-$cat >try.c <<EOCP
+# I only know how to find the first 32 possibly open files on SunOS.
+# See also hints/sunos_4_1.sh and util.c --AD
+case "$osname" in
+sunos) $echo '#define PERL_FFLUSH_ALL_FOPEN_MAX 32' > try.c ;;
+esac
+$cat >>try.c <<EOCP
#include <stdio.h>
-#$t_unistd I_UNISTD
+#$i_unistd I_UNISTD
#ifdef I_UNISTD
# include <unistd.h>
#endif
@@ -10997,26 +10996,32 @@ int main() {
#ifdef TRY_FFLUSH_ALL
{
long open_max = -1;
-# if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
- open_max = sysconf(_SC_OPEN_MAX);
+# ifdef PERL_FFLUSH_ALL_FOPEN_MAX
+ open_max = PERL_FFLUSH_ALL_FOPEN_MAX;
# else
-# ifdef FOPEN_MAX
-# open_max = FOPEN_MAX;
+# if defined(HAS_SYSCONF) && defined(_SC_OPEN_MAX)
+ open_max = sysconf(_SC_OPEN_MAX);
# else
-# ifdef OPEN_MAX
-# open_max = OPEN_MAX;
+# ifdef FOPEN_MAX
+ open_max = FOPEN_MAX;
# else
-# ifdef _NFILE
-# open_max = _NFILE;
+# ifdef OPEN_MAX
+ open_max = OPEN_MAX;
+# else
+# ifdef _NFILE
+ open_max = _NFILE;
+# endif
# endif
# endif
# endif
-# endif
# ifdef HAS_STDIO_STREAM_ARRAY
if (open_max > 0) {
long i;
for (i = 0; i < open_max; i++)
- fflush(&$stdio_stream_array[i]);
+ if (STDIO_STREAM_ARRAY[i]._file >= 0 &&
+ STDIO_STREAM_ARRAY[i]._file < open_max &&
+ STDIO_STREAM_ARRAY[i]._flag)
+ fflush(&STDIO_STREAM_ARRAY[i]);
}
}
# endif