summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-11-06 22:51:29 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-06 22:51:29 +0000
commitc1d9e6fa784f00d692c277f4934d2a98bb4644e4 (patch)
treed528e1fec5da5031136d2008f33d3d76967c5ede /Configure
parent4a0d0822a0fb67de81c25c5d18eb45f80b490bcd (diff)
downloadperl-c1d9e6fa784f00d692c277f4934d2a98bb4644e4.tar.gz
Make the stdio test program of 7427 less noisy while being
compiled so that Digital UNIX wouldn't get both d_stdio_ptr_lval_nochange_cnt and d_stdio_ptr_lval_sets_cnt undefined. This makes perlio happy. p4raw-id: //depot/perl@7581
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure27
1 files changed, 19 insertions, 8 deletions
diff --git a/Configure b/Configure
index 13e52dbd28..c07cf351a0 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 Sun Nov 5 00:37:41 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Tue Nov 7 00:26:20 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >/tmp/c1$$ <<EOF
@@ -11546,13 +11546,24 @@ $cat >try.c <<EOP
#include <stdio.h>
/* Can we scream? */
/* Eat dust sed :-) */
-#define FILE_ptr(fp) $stdio_ptr
-#define FILE_cnt(fp) $stdio_cnt
+/* In the buffer space, no one can hear you scream. */
+#define FILE_ptr(fp) ((fp)->_ptr)
+#define FILE_cnt(fp) ((fp)->_cnt)
+#include <sys/types.h>
int main() {
FILE *fp = fopen("try.c", "r");
- char c = getc(fp);
+ int c;
char *ptr;
size_t cnt;
+ if (!fp) {
+ puts("Fail even to read");
+ exit(1);
+ }
+ c = getc(fp); /* Read away the first # */
+ if (c == EOF) {
+ puts("Fail even to read");
+ exit(1);
+ }
if (!(
18 <= FILE_cnt(fp) &&
strncmp(FILE_ptr(fp), "include <stdio.h>\n", 18) == 0
@@ -11560,12 +11571,12 @@ int main() {
puts("Fail even to read");
exit (1);
}
- ptr = FILE_ptr(fp);
- cnt = FILE_cnt(fp);
+ ptr = (char*) FILE_ptr(fp);
+ cnt = (size_t)FILE_cnt(fp);
- FILE_ptr(fp)+= 42;
+ FILE_ptr(fp) += 42;
- if (FILE_ptr(fp) != (ptr + 42)) {
+ if ((char*)FILE_ptr(fp) != (ptr + 42)) {
printf("Fail ptr check %p != %p", FILE_ptr(fp), (ptr + 42));
exit (1);
}