diff options
Diffstat (limited to 'newlib/libc/stdio/vfscanf.c')
-rw-r--r-- | newlib/libc/stdio/vfscanf.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index 8546088a8..b24c9fb84 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -293,11 +293,11 @@ _DEFUN(_VFSCANF_R, (data, fp, fmt, ap), } #endif /* !STRING_ONLY */ -#ifdef STRING_ONLY +#if defined (STRING_ONLY) && defined (INTEGER_ONLY) /* When dealing with the sscanf family, we don't want to use the * regular ungetc which will drag in file I/O items we don't need. * So, we create our own trimmed-down version. */ -static int +int _DEFUN(_sungetc_r, (data, fp, ch), struct _reent *data _AND int c _AND @@ -355,7 +355,7 @@ _DEFUN(_sungetc_r, (data, fp, ch), } /* String only version of __srefill_r for sscanf family. */ -static int +int _DEFUN(__ssrefill_r, (ptr, fp), struct _reent * ptr _AND register FILE * fp) @@ -381,7 +381,7 @@ _DEFUN(__ssrefill_r, (ptr, fp), return EOF; } -static size_t +size_t _DEFUN(_sfread_r, (ptr, buf, size, count, fp), struct _reent * ptr _AND _PTR buf _AND @@ -418,7 +418,11 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp), fp->_p += resid; return count; } -#endif /* STRING_ONLY */ +#else /* !STRING_ONLY || !INTEGER_ONLY */ +int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *)); +int _EXFUN (__ssrefill_r, (struct _reent *, register FILE *)); +size_t _EXFUN (_sfread_r, (struct _reent *, _PTR buf, size_t, size_t, FILE *)); +#endif /* !STRING_ONLY || !INTEGER_ONLY */ int _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), @@ -717,7 +721,7 @@ _DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap), break; case '[': - fmt = __sccl (ccltab, fmt); + fmt = (u_char *) __sccl (ccltab, (unsigned char *) fmt); flags |= NOSKIP; c = CT_CCL; break; |