8 int stdio_block_read
= 1, stdio_block_write
= 1;
11 DEFUN(main
, (argc
, argv
),
12 int argc AND
char **argv
)
17 const char filename
[] = "/tmp/bugtest";
19 while ((i
= getopt (argc
, argv
, "rw")) != -1)
26 stdio_block_write
= 0;
30 f
= fopen(filename
, "w+");
31 for (i
=0; i
<9000; i
++) {
35 fwrite("Where does this text come from?", 1, 31, f
);
37 fread(buffer
, 1, 31, f
);
38 fwrite(buffer
, 1, 31, stdout
);
42 if (!memcmp (buffer
, "Where does this text come from?", 31))
44 puts ("\nTest succeeded.");
49 puts ("\nTest FAILED!");