From c7e56cbea2f09ad24d17b1575a3c98a2afaa9aa5 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 4 Nov 2002 10:33:19 +0000 Subject: [PATCH] Update. * libio/bug-wfflush.c (do_test): Using fseek is not allowed when wide oriented streams are used. --- ChangeLog | 3 +++ libio/bug-wfflush.c | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a9fa94f3f8..963bc6c4c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2002-11-04 Ulrich Drepper + * libio/bug-wfflush.c (do_test): Using fseek is not allowed when + wide oriented streams are used. + * nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the service hasn't been used [PR libc/4744]. diff --git a/libio/bug-wfflush.c b/libio/bug-wfflush.c index 87695f2a81..687cdedfad 100644 --- a/libio/bug-wfflush.c +++ b/libio/bug-wfflush.c @@ -35,6 +35,13 @@ 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 @@ -46,9 +53,9 @@ do_test (void) return 1; } - if (fseek (f, 0, SEEK_SET) != 0) + if (fsetpos (f, &pos) != 0) { - printf ("fseek: %m\n"); + printf ("fsetpos: %m\n"); return 1; }