From c764b9a7280436b891ffa5dfb46d14a8df405a97 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 14 Jul 1998 19:43:02 +0000 Subject: Update. 1998-07-14 19:39 Ulrich Drepper * stdio-common/vfscanf.c (ungetc): Use _IO_sputbackc, not _IO_ungetc. [_USE_IN_LIBIO] (encode_error): Free cancelation handler. (conv_error): Likewise. (input_error): Likewise. (memory_error): Likewise. 1998-07-12 Mark Kettenis * sysdeps/mach/hurd/dl-sysdep.c: Bring in sync with generic implementation. Include . Replace references to symbol _start with macro ENTRY_POINT. (__libc_uid): Remove. (__libc_multiple_libcs): New variable. (__libc_stack_end): New variable. (_dl_hwcap_mask): New variable. (_dl_important_hwcaps): New function. (_dl_show_auxv): Mark internal. --- stdio-common/vfscanf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'stdio-common') diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index c1ff2690b7..bd167b9a5b 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -55,30 +55,35 @@ # undef va_list # define va_list _IO_va_list -# define ungetc(c, s) ((void) ((int) c != EOF && --read_in), \ - _IO_ungetc (c, s)) +# define ungetc(c, s) ((void) ((int) c == EOF \ + || (--read_in, \ + _IO_sputbackc (s, (unsigned char) c)))) # define inchar() (c == EOF ? EOF \ : ((c = _IO_getc_unlocked (s)), \ (void) (c != EOF && ++read_in), c)) # define encode_error() do { \ if (errp != NULL) *errp |= 4; \ _IO_funlockfile (s); \ + __libc_cleanup_end (0); \ __set_errno (EILSEQ); \ return done; \ } while (0) # define conv_error() do { \ if (errp != NULL) *errp |= 2; \ _IO_funlockfile (s); \ + __libc_cleanup_end (0); \ return done; \ } while (0) # define input_error() do { \ _IO_funlockfile (s); \ if (errp != NULL) *errp |= 1; \ + __libc_cleanup_end (0); \ return done ?: EOF; \ } while (0) # define memory_error() do { \ _IO_funlockfile (s); \ __set_errno (ENOMEM); \ + __libc_cleanup_end (0); \ return EOF; \ } while (0) # define ARGCHECK(s, format) \ -- cgit v1.2.3