# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri May 14 00:11:18 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Fri May 14 10:24:50 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_ftell64=''
d_ftello64=''
d_tmpfile64=''
+d_stdio_stream_array=''
stdio_stream_array=''
sysman=''
trnl=''
set d_stdiobase
eval $setvar
+$cat >&4 <<EOM
+Checking how to access stdio streams by file descriptor number...
+EOM
+case "$stdio_stream_array" in
+'') $cat >try.c <<EOCP
+#include <stdio.h>
+int main() {
+ if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
+ printf("yes\n");
+}
+EOCP
+ for s in _iob __iob __sF
+ do
+ set try -DSTDIO_STREAM_ARRAY=$s
+ if eval $compile; then
+ case "`./try$exe_ext`" in
+ yes) stdio_stream_array=$s; break ;;
+ esac
+ fi
+ done
+ $rm -f try.* try$exe_ext
+esac
+case "$stdio_stream_array" in
+'') $cat >&4 <<EOM
+I can't figure out how to access stdio streams by file descriptor number.
+EOM
+ d_stdio_stream_array="$undef"
+ ;;
+*) $cat >&4 <<EOM
+You can access stdio streams by file descriptor number by the $stdio_stream_array array.
+EOM
+ d_stdio_stream_array="$define"
+ ;;
+esac
+
: see if strcoll exists
set strcoll d_strcoll
eval $inlibc
set ebcdic
eval $setvar
-$cat >&4 <<EOM
-Checking how to access stdio streams by file descriptor number...
-EOM
-case "$stdio_stream_array" in
-'') $cat >try.c <<EOCP
-#include <stdio.h>
-int main() {
- if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin)
- printf("yes\n");
-}
-EOCP
- for s in _iob __iob __sF
- do
- set try -DSTDIO_STREAM_ARRAY=$s
- if eval $compile_ok; then
- case "`./try$exe_ext`" in
- yes) stdio_stream_array=$s; break ;;
- esac
- fi
- done
- $rm -f try.* try$exe_ext
-esac
-case "$stdio_stream_array" in
-'') $cat >&4 <<EOM
-I can't figure out how to access stdio streams by file descriptor number.
-EOM
- ;;
-*) $cat >&4 <<EOM
-You can access stdio streams by file descriptor number by using $stdio_stream_array.
-EOM
- ;;
-esac
-
# 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
#include <unistd.h>
#endif
#$d_sysconf HAS_SYSCONF
+#$stdio_stream_array
int main() {
FILE* p = fopen("try.out", "w");
#ifdef TRY_FPUTC
# 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]);
}
}
+# endif
#endif
_exit(42);
}
x) $cat >&4 <<EOM
Your fflush(NULL) works okay.
EOM
- fflushNULL=define
+ fflushNULL="$define"
;;
'') $cat >&4 <<EOM
Your fflush(NULL) isn't working (contrary to ANSI C).
EOM
- fflushNULL=undef
+ fflushNULL="$undef"
;;
*) $cat >&4 <<EOM
Cannot figure out whether your fflush(NULL) works or not.
I'm assuming it doesn't (contrary to ANSI C).
EOM
- fflushNULL=undef
+ fflushNULL="$undef"
;;
esac
;;
$define|true|[yY]*)
- fflushNULL=define
+ fflushNULL="$define"
;;
*)
- fflushNULL=undef
+ fflushNULL="$undef"
;;
esac
: check for fflush all behaviour
x) $cat >&4 <<EOM
Flushing explicitly all the stdio streams works.
EOM
- fflushall=define
+ fflushall="$define"
;;
'') $cat >&4 <<EOM
Flushing explicitly all the stdio streams doesn't work.
EOM
- fflushall=undef
+ fflushall="$undef"
;;
*) $cat >&4 <<EOM
Cannot figure out whether flushing stdio streams explicitly works or not.
I'm assuming it doesn't.
EOM
- fflushall=undef
+ fflushall="$undef"
;;
esac
case "$fflushall$fflushNULL" in
esac
;;
$define|true|[yY]*)
- fflushall=define
+ fflushall="$define"
;;
*)
- fflushall=undef
+ fflushall="$undef"
;;
esac
case "$fflushNULL$fflushall" in
d_statvfs='$d_statvfs'
d_stdio_cnt_lval='$d_stdio_cnt_lval'
d_stdio_ptr_lval='$d_stdio_ptr_lval'
+d_stdio_stream_array='$d_stdio_stream_array'
d_stdiobase='$d_stdiobase'
d_stdstdio='$d_stdstdio'
d_store64='$d_store64'
#$d_ftello64 HAS_FTELLO64 /**/
#$d_tmpfile64 HAS_TMPFILE64 /**/
+/* HAS_STDIO_STREAM_ARRAY:
+ * This symbol, if defined, tells that there is an array
+ * holding the stdio streams.
+ */
/* STDIO_STREAM_ARRAY:
- * This symbol tells the name of the array holding the stdio stream_array,
- * if any. Usual values include _iob, __iob, and __sF.
+ * This symbol tells the name of the array holding the stdio streams.
+ * Usual values include _iob, __iob, and __sF.
*/
+#$d_stdio_stream_array HAS_STDIO_STREAM_ARRAY /**/
#define STDIO_STREAM_ARRAY $stdio_stream_array
/* USE_64_BITS: