* libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
Call fputs instead of fwprintf (simpler to follow in debugger).
This commit is contained in:
parent
4483f2c0f8
commit
1ab9366daa
|
@ -1,5 +1,8 @@
|
||||||
2002-11-10 Roland McGrath <roland@redhat.com>
|
2002-11-10 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
* libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
|
||||||
|
Call fputs instead of fwprintf (simpler to follow in debugger).
|
||||||
|
|
||||||
* crypt/md5-crypt.c: Doc fix.
|
* crypt/md5-crypt.c: Doc fix.
|
||||||
|
|
||||||
* sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
|
* sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
|
||||||
|
|
|
@ -35,13 +35,6 @@ do_test (void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fpos_t pos;
|
|
||||||
if (fgetpos (f, &pos) != 0)
|
|
||||||
{
|
|
||||||
printf ("fgetpos: %m\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define L_(s) L##s
|
#define L_(s) L##s
|
||||||
//#define fwscanf fscanf
|
//#define fwscanf fscanf
|
||||||
//#define fwprintf fprintf
|
//#define fwprintf fprintf
|
||||||
|
@ -53,15 +46,16 @@ do_test (void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fsetpos (f, &pos) != 0)
|
rewind (f);
|
||||||
|
if (ferror (f))
|
||||||
{
|
{
|
||||||
printf ("fsetpos: %m\n");
|
printf ("rewind: %m\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fwprintf (f, L_("1!")) < 2)
|
if (fputws (L_("1!"), f) == EOF)
|
||||||
{
|
{
|
||||||
printf ("fwprintf: %m\n");
|
printf ("fputws: %m\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue