diff options
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/vfprintf.c | 10 | ||||
-rw-r--r-- | stdio-common/vfscanf.c | 9 |
2 files changed, 12 insertions, 7 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index cde7496585..6430a924f4 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -103,7 +103,7 @@ ssize_t __wprintf_pad __P ((FILE *, wchar_t pad, size_t n)); } while (0) # define UNBUFFERED_P(S) ((S)->_IO_file_flags & _IO_UNBUFFERED) # define flockfile(S) _IO_flockfile (S) -# define fUNlockfile(S) _IO_funlockfile (S) +# define funlockfile(S) _IO_funlockfile (S) #else /* ! USE_IN_LIBIO */ /* This code is for use in the GNU C library. */ # include <stdio.h> @@ -125,6 +125,8 @@ ssize_t __wprintf_pad __P ((FILE *, wchar_t pad, size_t n)); } \ while (0) # define UNBUFFERED_P(s) ((s)->__buffer == NULL) +# define flockfile(S) /* nothing */ +# define funlockfile(S) /* nothing */ #endif /* USE_IN_LIBIO */ @@ -805,7 +807,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* Lock stream. */ flockfile (s); - + /* Write the literal text before the first format. */ outstring ((const UCHAR_T *) format, lead_str_end - (const UCHAR_T *) format); @@ -1001,7 +1003,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) /* Unlock stream. */ funlockfile (s); - + /* We processed the whole format without any positional parameters. */ return done; @@ -1263,7 +1265,7 @@ do_positional: /* Unlock the stream. */ funlockfile (s); - + return done; } diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c index 4b4dd119ca..9cdad7bb8b 100644 --- a/stdio-common/vfscanf.c +++ b/stdio-common/vfscanf.c @@ -26,7 +26,6 @@ Cambridge, MA 02139, USA. */ #include <stdlib.h> #include <string.h> - #ifdef __GNUC__ #define HAVE_LONGLONG #define LONGLONG long long @@ -82,6 +81,8 @@ Cambridge, MA 02139, USA. */ return EOF; \ } \ } while (0) +# define flockfile(S) _IO_flockfile (S) +# define funlockfile(S) _IO_funlockfile (S) #else # define inchar() ((c = getc (s)), (void) ++read_in, c) # define conv_error() do { \ @@ -108,6 +109,8 @@ Cambridge, MA 02139, USA. */ return EOF; \ } \ } while (0) +# define flockfile(S) /* nothing */ +# define funlockfile(S) /* nothing */ #endif @@ -196,7 +199,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) /* Lock the stream. */ flockfile (s); - + c = inchar (); /* Run through the format string. */ @@ -807,7 +810,7 @@ __vfscanf (FILE *s, const char *format, va_list argptr) /* Unlock stream. */ funlockfile (s); - + return ((void) (c == EOF || ungetc (c, s)), done); } |