aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-11-11 06:55:22 +0000
committerRoland McGrath <roland@gnu.org>2002-11-11 06:55:22 +0000
commit1ab9366daadaa3d788dbb153805f3be71dfa3cde (patch)
tree8b09d75ea59ddaef3ed26ecb5506a76c1da00b08
parent4483f2c0f8b6ace6dbc94a1da5a083e99310c267 (diff)
downloadglibc-1ab9366daadaa3d788dbb153805f3be71dfa3cde.tar
glibc-1ab9366daadaa3d788dbb153805f3be71dfa3cde.tar.gz
glibc-1ab9366daadaa3d788dbb153805f3be71dfa3cde.tar.bz2
glibc-1ab9366daadaa3d788dbb153805f3be71dfa3cde.zip
* libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
Call fputs instead of fwprintf (simpler to follow in debugger).
-rw-r--r--ChangeLog3
-rw-r--r--libio/bug-wfflush.c16
2 files changed, 8 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index e7a20da6d7..6b54fb1537 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
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.
* sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
diff --git a/libio/bug-wfflush.c b/libio/bug-wfflush.c
index 687cdedfad..a8fd61e997 100644
--- a/libio/bug-wfflush.c
+++ b/libio/bug-wfflush.c
@@ -35,13 +35,6 @@ do_test (void)
return 1;
}
- fpos_t pos;
- if (fgetpos (f, &pos) != 0)
- {
- printf ("fgetpos: %m\n");
- return 1;
- }
-
#define L_(s) L##s
//#define fwscanf fscanf
//#define fwprintf fprintf
@@ -53,15 +46,16 @@ do_test (void)
return 1;
}
- if (fsetpos (f, &pos) != 0)
+ rewind (f);
+ if (ferror (f))
{
- printf ("fsetpos: %m\n");
+ printf ("rewind: %m\n");
return 1;
}
- if (fwprintf (f, L_("1!")) < 2)
+ if (fputws (L_("1!"), f) == EOF)
{
- printf ("fwprintf: %m\n");
+ printf ("fputws: %m\n");
return 1;
}