Mail Archives: djgpp-workers/1999/04/08/18:42:07
Bonjour
> Here's some weird results. I used the same test program, slightly
> modified:
>
> test1.c: no fsync
>
> #include <stdio.h>
>
> main()
> {
....
> else
> printf("i=%d\n");
^^^^^^^^^^^^^^^^^^^^^
> }
an argument is missing in your test.
> test2.c: with fsync
>
> #include <stdio.h>
> #include <unistd.h>
> main()
> {
...
> fscanf(b, "%d", &i);
> if (fscanf(b, "%d", &i) < 1)
Two fscanf () ??
> printf("fscanf failed\n");
> else
> printf("i=%d\n");
> }
>
>
....
> So do these systems have serious bugs in scanf, or is there a subtle bug
> in the test that I missed?
Yes. In your second test your doing 2 fscanf(), and the printf()
is missing an argument. I run this On Solaris, QNX, SunOS with
no problems .i.e no need for fsync().
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
- Raw text -