5 int stdio_block_read
= 1, stdio_block_write
= 1;
8 main (int argc
, char *argv
[])
13 const char filename
[] = "/tmp/bug4.test";
15 while ((i
= getopt (argc
, argv
, "rw")) != -1)
22 stdio_block_write
= 0;
26 f
= fopen (filename
, "w+");
27 for (i
= 0; i
< 9000; ++i
)
31 fwrite ("Where does this text come from?", 1, 31, f
);
33 fread (buffer
, 1, 31, f
);
34 fwrite (buffer
, 1, 31, stdout
);
38 if (!memcmp (buffer
, "Where does this text come from?", 31))
40 puts ("\nTest succeeded.");
45 puts ("\nTest FAILED!");