Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r--newlib/libc/stdio/Makefile.am211
-rw-r--r--newlib/libc/stdio/Makefile.in697
-rw-r--r--newlib/libc/stdio/asnprintf.c11
-rw-r--r--newlib/libc/stdio/asprintf.c11
-rw-r--r--newlib/libc/stdio/clearerr.c23
-rw-r--r--newlib/libc/stdio/clearerr_u.c41
-rw-r--r--newlib/libc/stdio/dprintf.c11
-rw-r--r--newlib/libc/stdio/fclose.c13
-rw-r--r--newlib/libc/stdio/feof.c24
-rw-r--r--newlib/libc/stdio/feof_u.c40
-rw-r--r--newlib/libc/stdio/ferror.c24
-rw-r--r--newlib/libc/stdio/ferror_u.c41
-rw-r--r--newlib/libc/stdio/fflush.c53
-rw-r--r--newlib/libc/stdio/fflush_u.c28
-rw-r--r--newlib/libc/stdio/fgetc.c42
-rw-r--r--newlib/libc/stdio/fgetc_u.c56
-rw-r--r--newlib/libc/stdio/fgets.c49
-rw-r--r--newlib/libc/stdio/fgets_u.c28
-rw-r--r--newlib/libc/stdio/fgetwc.c79
-rw-r--r--newlib/libc/stdio/fgetwc_u.c49
-rw-r--r--newlib/libc/stdio/fgetws.c51
-rw-r--r--newlib/libc/stdio/fgetws_u.c28
-rw-r--r--newlib/libc/stdio/fileno.c24
-rw-r--r--newlib/libc/stdio/fileno_u.c46
-rw-r--r--newlib/libc/stdio/findfp.c22
-rw-r--r--newlib/libc/stdio/fprintf.c11
-rw-r--r--newlib/libc/stdio/fputc.c41
-rw-r--r--newlib/libc/stdio/fputc_u.c56
-rw-r--r--newlib/libc/stdio/fputs.c46
-rw-r--r--newlib/libc/stdio/fputs_u.c28
-rw-r--r--newlib/libc/stdio/fputwc.c83
-rw-r--r--newlib/libc/stdio/fputwc_u.c51
-rw-r--r--newlib/libc/stdio/fputws.c48
-rw-r--r--newlib/libc/stdio/fputws_u.c28
-rw-r--r--newlib/libc/stdio/fread.c51
-rw-r--r--newlib/libc/stdio/fread_u.c28
-rw-r--r--newlib/libc/stdio/fscanf.c11
-rw-r--r--newlib/libc/stdio/fsetlocking.c90
-rw-r--r--newlib/libc/stdio/fwalk.c7
-rw-r--r--newlib/libc/stdio/fwrite.c51
-rw-r--r--newlib/libc/stdio/fwrite_u.c28
-rw-r--r--newlib/libc/stdio/getwc_u.c53
-rw-r--r--newlib/libc/stdio/getwchar.c41
-rw-r--r--newlib/libc/stdio/getwchar_u.c51
-rw-r--r--newlib/libc/stdio/local.h40
-rw-r--r--newlib/libc/stdio/nano-vfprintf.c665
-rw-r--r--newlib/libc/stdio/nano-vfprintf_float.c364
-rw-r--r--newlib/libc/stdio/nano-vfprintf_i.c250
-rw-r--r--newlib/libc/stdio/nano-vfprintf_local.h234
-rw-r--r--newlib/libc/stdio/nano-vfscanf.c497
-rw-r--r--newlib/libc/stdio/nano-vfscanf_float.c342
-rw-r--r--newlib/libc/stdio/nano-vfscanf_i.c232
-rw-r--r--newlib/libc/stdio/nano-vfscanf_local.h178
-rw-r--r--newlib/libc/stdio/open_memstream.c1
-rw-r--r--newlib/libc/stdio/printf.c11
-rw-r--r--newlib/libc/stdio/putwc_u.c54
-rw-r--r--newlib/libc/stdio/putwchar.c41
-rw-r--r--newlib/libc/stdio/putwchar_u.c53
-rw-r--r--newlib/libc/stdio/scanf.c11
-rw-r--r--newlib/libc/stdio/snprintf.c11
-rw-r--r--newlib/libc/stdio/sprintf.c11
-rw-r--r--newlib/libc/stdio/sscanf.c12
-rw-r--r--newlib/libc/stdio/stdio.tex8
-rw-r--r--newlib/libc/stdio/stdio_ext.c113
-rw-r--r--newlib/libc/stdio/vasnprintf.c12
-rw-r--r--newlib/libc/stdio/vasprintf.c12
-rw-r--r--newlib/libc/stdio/vdprintf.c11
-rw-r--r--newlib/libc/stdio/vfprintf.c6
-rw-r--r--newlib/libc/stdio/vprintf.c11
-rw-r--r--newlib/libc/stdio/vscanf.c10
-rw-r--r--newlib/libc/stdio/vsnprintf.c12
-rw-r--r--newlib/libc/stdio/vsprintf.c12
-rw-r--r--newlib/libc/stdio/vsscanf.c12
73 files changed, 307 insertions, 5424 deletions
diff --git a/newlib/libc/stdio/Makefile.am b/newlib/libc/stdio/Makefile.am
index 3cee16b60..a1ba475df 100644
--- a/newlib/libc/stdio/Makefile.am
+++ b/newlib/libc/stdio/Makefile.am
@@ -4,27 +4,7 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-if NEWLIB_NANO_FORMATTED_IO
-GENERAL_INT_FORMATTED_IO_SOURCES =
-else
-GENERAL_INT_FORMATTED_IO_SOURCES = \
- fiprintf.c \
- fiscanf.c \
- iprintf.c \
- iscanf.c \
- siprintf.c \
- siscanf.c \
- sniprintf.c \
- vdiprintf.c \
- viprintf.c \
- viscanf.c \
- vsiprintf.c \
- vsiscanf.c \
- vsniprintf.c
-endif
-
GENERAL_SOURCES = \
- $(GENERAL_INT_FORMATTED_IO_SOURCES) \
clearerr.c \
fclose.c \
fdopen.c \
@@ -36,6 +16,7 @@ GENERAL_SOURCES = \
fgets.c \
fileno.c \
findfp.c \
+ fiprintf.c \
flags.c \
fopen.c \
fprintf.c \
@@ -44,6 +25,7 @@ GENERAL_SOURCES = \
fread.c \
freopen.c \
fscanf.c \
+ fiscanf.c \
fseek.c \
fsetpos.c \
ftell.c \
@@ -57,6 +39,8 @@ GENERAL_SOURCES = \
getdelim.c \
getline.c \
gets.c \
+ iprintf.c \
+ iscanf.c \
makebuf.c \
perror.c \
printf.c \
@@ -76,6 +60,9 @@ GENERAL_SOURCES = \
setbuffer.c \
setlinebuf.c \
setvbuf.c \
+ siprintf.c \
+ siscanf.c \
+ sniprintf.c \
snprintf.c \
sprintf.c \
sscanf.c \
@@ -83,10 +70,16 @@ GENERAL_SOURCES = \
tmpfile.c \
tmpnam.c \
ungetc.c \
+ vdiprintf.c \
vdprintf.c \
+ viprintf.c \
+ viscanf.c \
vprintf.c \
vscanf.c \
+ vsiprintf.c \
+ vsiscanf.c \
vsnprintf.c \
+ vsniprintf.c \
vsprintf.c \
vsscanf.c \
wbuf.c \
@@ -96,16 +89,8 @@ GENERAL_SOURCES = \
if ELIX_LEVEL_1
ELIX_2_SOURCES =
else
-if NEWLIB_NANO_FORMATTED_IO
-ELIX_2_INT_FORMATTED_IO_SOURCES =
-else
-ELIX_2_INT_FORMATTED_IO_SOURCES = \
- asiprintf.c \
- vasiprintf.c
-
-endif !NEWLIB_NANO_FORMATTED_IO
ELIX_2_SOURCES = \
- $(ELIX_2_INT_FORMATTED_IO_SOURCES) \
+ asiprintf.c \
asprintf.c \
fcloseall.c \
fseeko.c \
@@ -113,8 +98,9 @@ ELIX_2_SOURCES = \
getw.c \
mktemp.c \
putw.c \
+ vasiprintf.c \
vasprintf.c
-endif !ELIX_LEVEL_1
+endif
## The following are EL/IX level 2 interfaces
if ELIX_LEVEL_1
@@ -126,59 +112,31 @@ else
if ELIX_LEVEL_3
ELIX_4_SOURCES =
else
-if NEWLIB_NANO_FORMATTED_IO
-ELIX_4_INT_FORMATTED_IO_SOURCES =
-else
-ELIX_4_INT_FORMATTED_IO_SOURCES = \
- asniprintf.c \
- diprintf.c \
- vasniprintf.c
-
-endif !NEWLIB_NANO_FORMATTED_IO
ELIX_4_SOURCES = \
- $(ELIX_4_INT_FORMATTED_IO_SOURCES) \
+ asniprintf.c \
asnprintf.c \
- clearerr_u.c \
+ diprintf.c \
dprintf.c \
- feof_u.c \
- ferror_u.c \
- fflush_u.c \
- fgetc_u.c \
- fgets_u.c \
fgetwc.c \
- fgetwc_u.c \
fgetws.c \
- fgetws_u.c \
- fileno_u.c \
fmemopen.c \
fopencookie.c \
fpurge.c \
- fputc_u.c \
- fputs_u.c \
fputwc.c \
- fputwc_u.c \
fputws.c \
- fputws_u.c \
- fread_u.c \
- fsetlocking.c \
funopen.c \
fwide.c \
fwprintf.c \
- fwrite_u.c \
fwscanf.c \
getwc.c \
- getwc_u.c \
getwchar.c \
- getwchar_u.c \
open_memstream.c \
putwc.c \
- putwc_u.c \
putwchar.c \
- putwchar_u.c \
- stdio_ext.c \
swprintf.c \
swscanf.c \
ungetwc.c \
+ vasniprintf.c \
vasnprintf.c \
vfwscanf.c \
vswprintf.c \
@@ -192,25 +150,6 @@ endif !ELIX_LEVEL_3
endif !ELIX_LEVEL_2
endif !ELIX_LEVEL_1
-if NEWLIB_NANO_FORMATTED_IO
-LIBADD_OBJS = \
- $(lpfx)nano-vfprintf_float.$(oext) \
- $(lpfx)nano-svfprintf.$(oext) \
- $(lpfx)nano-svfscanf.$(oext) \
- $(lpfx)nano-vfprintf.$(oext) \
- $(lpfx)nano-vfprintf_i.$(oext) \
- $(lpfx)nano-vfscanf.$(oext) \
- $(lpfx)nano-vfscanf_i.$(oext) \
- $(lpfx)nano-vfscanf_float.$(oext) \
- $(lpfx)svfiwprintf.$(oext) \
- $(lpfx)svfwprintf.$(oext) \
- $(lpfx)vfiwprintf.$(oext) \
- $(lpfx)vfwprintf.$(oext) \
- $(lpfx)svfiwscanf.$(oext) \
- $(lpfx)svfwscanf.$(oext) \
- $(lpfx)vfiwscanf.$(oext) \
- $(lpfx)vfwscanf.$(oext)
-else
LIBADD_OBJS = \
$(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
$(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
@@ -220,7 +159,6 @@ LIBADD_OBJS = \
$(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
$(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
$(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
-endif
libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@@ -243,31 +181,8 @@ endif # USE_LIBTOOL
include $(srcdir)/../../Makefile.shared
-
-# Though small footprint nano-formatted-IO implementation is used
-# when NEWLIB_NANO_FORMATTED_IO is enabled, we keep all rules for
-# the other implementation of formatted IO including all i-family
-# functions. The object files in !NEWLIB_NANO_FORMATTED_IO version
-# implementation will be neither compiled nor archived into final
-# library, because they are not depended on by final makefile target.
-
-if NEWLIB_NANO_FORMATTED_IO
-# Rules compiling small-footprint nano-formatted-io implementation.
-$(lpfx)nano-vfprintf.$(oext): nano-vfprintf.c
- $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf.c -o $@
-
-$(lpfx)nano-vfprintf_i.$(oext): nano-vfprintf_i.c
- $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_i.c -o $@
-
-$(lpfx)nano-vfprintf_float.$(oext): nano-vfprintf_float.c
- $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_float.c -o $@
-
-$(lpfx)nano-svfprintf.$(oext): nano-vfprintf.c
- $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/nano-vfprintf.c -o $@
-endif
-
-# This rule is needed so that libtool compiles vfiprintf before vfprintf.
-# Otherwise libtool moves vfprintf.o and subsequently can't find it.
+# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise
+# libtool moves vfprintf.o and subsequently can't find it.
$(lpfx)vfprintf.$(oext): vfprintf.c
$(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@
@@ -293,21 +208,6 @@ $(lpfx)svfwprintf.$(oext): vfwprintf.c
$(lpfx)svfiwprintf.$(oext): vfwprintf.c
$(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@
-if NEWLIB_NANO_FORMATTED_IO
-# Rules compiling small-footprint nano-formatted-io implementation.
-$(lpfx)nano-vfscanf.$(oext): nano-vfscanf.c
- $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf.c -o $@
-
-$(lpfx)nano-vfscanf_i.$(oext): nano-vfscanf_i.c
- $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_i.c -o $@
-
-$(lpfx)nano-vfscanf_float.$(oext): nano-vfscanf_float.c
- $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_float.c -o $@
-
-$(lpfx)nano-svfscanf.$(oext): nano-vfscanf.c
- $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/nano-vfscanf.c -o $@
-endif
-
$(lpfx)vfscanf.$(oext): vfscanf.c
$(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@
@@ -332,27 +232,9 @@ $(lpfx)svfwscanf.$(oext): vfwscanf.c
$(lpfx)svfiwscanf.$(oext): vfwscanf.c
$(LIB_COMPILE) -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwscanf.c -o $@
-if NEWLIB_NANO_FORMATTED_IO
-CHEWOUT_INT_FORMATTED_IO_FILES =\
- nano-vfprintf.def \
- nano-vfprintf_i.def \
- nano-vfprintf_float.def \
- nano-vfscanf.def \
- nano-vfscanf_i.def \
- nano-vfscanf_float.def
-else
-CHEWOUT_INT_FORMATTED_IO_FILES =\
- diprintf.def \
- siprintf.def \
- siscanf.def \
- vfprintf.def \
- vfscanf.def \
- viprintf.def \
- viscanf.def
-endif
CHEWOUT_FILES = \
- $(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \
+ diprintf.def \
dprintf.def \
fclose.def \
fcloseall.def \
@@ -377,7 +259,6 @@ CHEWOUT_FILES = \
fread.def \
freopen.def \
fseek.def \
- fsetlocking.def \
fsetpos.def \
ftell.def \
funopen.def \
@@ -411,17 +292,22 @@ CHEWOUT_FILES = \
setbuffer.def \
setlinebuf.def \
setvbuf.def \
+ siprintf.def \
+ siscanf.def \
sprintf.def \
sscanf.def \
- stdio_ext.def \
swprintf.def \
swscanf.def \
tmpfile.def \
tmpnam.def \
ungetc.def \
ungetwc.def \
+ vfprintf.def \
+ vfscanf.def \
vfwprintf.def \
- vfwscanf.def
+ vfwscanf.def \
+ viprintf.def \
+ viscanf.def
SUFFIXES = .def
@@ -438,44 +324,22 @@ doc: $(CHEWOUT_FILES)
CLEANFILES = $(CHEWOUT_FILES) *.ref
-$(lpfx)clearerr.$(oext): local.h
-$(lpfx)clearerr_u.$(oext): local.h
$(lpfx)fclose.$(oext): local.h
$(lpfx)fdopen.$(oext): local.h
-$(lpfx)feof.$(oext): local.h
-$(lpfx)feof_u.$(oext): local.h
-$(lpfx)ferror.$(oext): local.h
-$(lpfx)ferror_u.$(oext): local.h
$(lpfx)fflush.$(oext): local.h
-$(lpfx)fflush_u.$(oext): fflush.c
-$(lpfx)fgetc.$(oext): local.h
-$(lpfx)fgetc_u.$(oext): local.h
-$(lpfx)fgets.$(oext): local.h
-$(lpfx)fgets_u.$(oext): fgets.c
$(lpfx)fgetwc.$(oext): local.h
-$(lpfx)fgetwc_u.$(oext): local.h
$(lpfx)fgetws.$(oext): local.h
-$(lpfx)fgetws_u.$(oext): fgetws.c
-$(lpfx)fileno.$(oext): local.h
-$(lpfx)fileno_u.$(oext): local.h
$(lpfx)findfp.$(oext): local.h
$(lpfx)fmemopen.$(oext): local.h
$(lpfx)fopen.$(oext): local.h
$(lpfx)fopencookie.$(oext): local.h
$(lpfx)fpurge.$(oext): local.h
-$(lpfx)fputc.$(oext): local.h
-$(lpfx)fputc_u.$(oext): local.h
$(lpfx)fputs.$(oext): fvwrite.h
-$(lpfx)fputs_u.$(oext): fputs.c
$(lpfx)fputwc.$(oext): local.h
-$(lpfx)fputwc_u.$(oext): local.h
$(lpfx)fputws.$(oext): local.h fvwrite.h
-$(lpfx)fputws_u.$(oext): fputws.c
$(lpfx)fread.$(oext): local.h
-$(lpfx)fread_u.$(oext): fread.c
$(lpfx)freopen.$(oext): local.h
$(lpfx)fseek.$(oext): local.h
-$(lpfx)fsetlocking.$(oext): local.h
$(lpfx)ftell.$(oext): local.h
$(lpfx)funopen.$(oext): local.h
$(lpfx)fvwrite.$(oext): local.h fvwrite.h
@@ -483,20 +347,15 @@ $(lpfx)fwalk.$(oext): local.h
$(lpfx)fwide.$(oext): local.h
$(lpfx)fwprintf.$(oext): local.h
$(lpfx)fwrite.$(oext): local.h fvwrite.h
-$(lpfx)fwrite_u.$(oext): fwrite.c
$(lpfx)fwscanf.$(oext): local.h
$(lpfx)getwc.$(oext): local.h
-$(lpfx)getwc_u.$(oext): local.h
$(lpfx)getwchar.$(oext): local.h
-$(lpfx)getwchar_u.$(oext): local.h
$(lpfx)iscanf.$(oext): local.h
$(lpfx)makebuf.$(oext): local.h
$(lpfx)open_memstream.$(oext): local.h
$(lpfx)puts.$(oext): fvwrite.h
$(lpfx)putwc.$(oext): local.h
-$(lpfx)putwc_u.$(oext): local.h
$(lpfx)putwchar.$(oext): local.h
-$(lpfx)putwchar_u.$(oext): local.h
$(lpfx)refill.$(oext): local.h
$(lpfx)scanf.$(oext): local.h
$(lpfx)setbuf.$(oext): local.h
@@ -507,10 +366,6 @@ $(lpfx)sniprintf.$(oext): local.h
$(lpfx)sprintf.$(oext): local.h
$(lpfx)sscanf.$(oext): local.h
$(lpfx)stdio.$(oext): local.h
-if NEWLIB_NANO_FORMATTED_IO
-$(lpfx)nano-svfprintf.$(oext): local.h nano-vfprintf_local.h
-$(lpfx)nano-svfscanf.$(oext): local.h nano-vfscanf_local.h
-endif
$(lpfx)svfiprintf.$(oext): local.h
$(lpfx)svfiscanf.$(oext): local.h floatio.h
$(lpfx)svfprintf.$(oext): local.h
@@ -519,14 +374,6 @@ $(lpfx)swprintf.$(oext): local.h
$(lpfx)swscanf.$(oext): local.h
$(lpfx)ungetc.$(oext): local.h
$(lpfx)ungetwc.$(oext): local.h
-if NEWLIB_NANO_FORMATTED_IO
-$(lpfx)nano-vfprintf.$(oext): local.h nano-vfprintf_local.h
-$(lpfx)nano-vfprintf_i.$(oext): local.h nano-vfprintf_local.h
-$(lpfx)nano-vfprintf_float.$(oext): local.h floatio.h nano-vfprintf_local.h
-$(lpfx)nano-vfscanf.$(oext): local.h nano-vfscanf_local.h
-$(lpfx)nano-vfscanf_i.$(oext): local.h nano-vfscanf_local.h
-$(lpfx)nano-vfscanf_float.$(oext): local.h floatio.h nano-vfscanf_local.h
-endif
$(lpfx)vfiprintf.$(oext): local.h
$(lpfx)vfiscanf.$(oext): local.h floatio.h
$(lpfx)vfprintf.$(oext): local.h
diff --git a/newlib/libc/stdio/Makefile.in b/newlib/libc/stdio/Makefile.in
index 23c4fbe7d..a42b0e66d 100644
--- a/newlib/libc/stdio/Makefile.in
+++ b/newlib/libc/stdio/Makefile.in
@@ -71,57 +71,47 @@ CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
ARFLAGS = cru
lib_a_AR = $(AR) $(ARFLAGS)
-@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_1 = \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-fiprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-fiscanf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-iprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-iscanf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-siprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-siscanf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-sniprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vdiprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-viprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-viscanf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsiprintf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsiscanf.$(OBJEXT) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vsniprintf.$(OBJEXT)
-am__objects_2 = $(am__objects_1) lib_a-clearerr.$(OBJEXT) \
- lib_a-fclose.$(OBJEXT) lib_a-fdopen.$(OBJEXT) \
- lib_a-feof.$(OBJEXT) lib_a-ferror.$(OBJEXT) \
- lib_a-fflush.$(OBJEXT) lib_a-fgetc.$(OBJEXT) \
- lib_a-fgetpos.$(OBJEXT) lib_a-fgets.$(OBJEXT) \
- lib_a-fileno.$(OBJEXT) lib_a-findfp.$(OBJEXT) \
+am__objects_1 = lib_a-clearerr.$(OBJEXT) lib_a-fclose.$(OBJEXT) \
+ lib_a-fdopen.$(OBJEXT) lib_a-feof.$(OBJEXT) \
+ lib_a-ferror.$(OBJEXT) lib_a-fflush.$(OBJEXT) \
+ lib_a-fgetc.$(OBJEXT) lib_a-fgetpos.$(OBJEXT) \
+ lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \
+ lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \
lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \
lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \
lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \
lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \
- lib_a-fseek.$(OBJEXT) lib_a-fsetpos.$(OBJEXT) \
- lib_a-ftell.$(OBJEXT) lib_a-fvwrite.$(OBJEXT) \
- lib_a-fwalk.$(OBJEXT) lib_a-fwrite.$(OBJEXT) \
- lib_a-getc.$(OBJEXT) lib_a-getchar.$(OBJEXT) \
- lib_a-getc_u.$(OBJEXT) lib_a-getchar_u.$(OBJEXT) \
- lib_a-getdelim.$(OBJEXT) lib_a-getline.$(OBJEXT) \
- lib_a-gets.$(OBJEXT) lib_a-makebuf.$(OBJEXT) \
- lib_a-perror.$(OBJEXT) lib_a-printf.$(OBJEXT) \
- lib_a-putc.$(OBJEXT) lib_a-putchar.$(OBJEXT) \
- lib_a-putc_u.$(OBJEXT) lib_a-putchar_u.$(OBJEXT) \
- lib_a-puts.$(OBJEXT) lib_a-refill.$(OBJEXT) \
- lib_a-remove.$(OBJEXT) lib_a-rename.$(OBJEXT) \
- lib_a-rewind.$(OBJEXT) lib_a-rget.$(OBJEXT) \
- lib_a-scanf.$(OBJEXT) lib_a-sccl.$(OBJEXT) \
- lib_a-setbuf.$(OBJEXT) lib_a-setbuffer.$(OBJEXT) \
- lib_a-setlinebuf.$(OBJEXT) lib_a-setvbuf.$(OBJEXT) \
+ lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \
+ lib_a-fsetpos.$(OBJEXT) lib_a-ftell.$(OBJEXT) \
+ lib_a-fvwrite.$(OBJEXT) lib_a-fwalk.$(OBJEXT) \
+ lib_a-fwrite.$(OBJEXT) lib_a-getc.$(OBJEXT) \
+ lib_a-getchar.$(OBJEXT) lib_a-getc_u.$(OBJEXT) \
+ lib_a-getchar_u.$(OBJEXT) lib_a-getdelim.$(OBJEXT) \
+ lib_a-getline.$(OBJEXT) lib_a-gets.$(OBJEXT) \
+ lib_a-iprintf.$(OBJEXT) lib_a-iscanf.$(OBJEXT) \
+ lib_a-makebuf.$(OBJEXT) lib_a-perror.$(OBJEXT) \
+ lib_a-printf.$(OBJEXT) lib_a-putc.$(OBJEXT) \
+ lib_a-putchar.$(OBJEXT) lib_a-putc_u.$(OBJEXT) \
+ lib_a-putchar_u.$(OBJEXT) lib_a-puts.$(OBJEXT) \
+ lib_a-refill.$(OBJEXT) lib_a-remove.$(OBJEXT) \
+ lib_a-rename.$(OBJEXT) lib_a-rewind.$(OBJEXT) \
+ lib_a-rget.$(OBJEXT) lib_a-scanf.$(OBJEXT) \
+ lib_a-sccl.$(OBJEXT) lib_a-setbuf.$(OBJEXT) \
+ lib_a-setbuffer.$(OBJEXT) lib_a-setlinebuf.$(OBJEXT) \
+ lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \
+ lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \
lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \
lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \
lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \
- lib_a-ungetc.$(OBJEXT) lib_a-vdprintf.$(OBJEXT) \
- lib_a-vprintf.$(OBJEXT) lib_a-vscanf.$(OBJEXT) \
- lib_a-vsnprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \
+ lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \
+ lib_a-vdprintf.$(OBJEXT) lib_a-viprintf.$(OBJEXT) \
+ lib_a-viscanf.$(OBJEXT) lib_a-vprintf.$(OBJEXT) \
+ lib_a-vscanf.$(OBJEXT) lib_a-vsiprintf.$(OBJEXT) \
+ lib_a-vsiscanf.$(OBJEXT) lib_a-vsnprintf.$(OBJEXT) \
+ lib_a-vsniprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \
lib_a-vsscanf.$(OBJEXT) lib_a-wbuf.$(OBJEXT) \
lib_a-wsetup.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_3 = lib_a-asiprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vasiprintf.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@am__objects_4 = $(am__objects_3) \
+@ELIX_LEVEL_1_FALSE@am__objects_2 = lib_a-asiprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-asprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-fcloseall.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-fseeko.$(OBJEXT) \
@@ -129,53 +119,32 @@ am__objects_2 = $(am__objects_1) lib_a-clearerr.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-getw.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-mktemp.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-putw.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@ lib_a-vasiprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@ lib_a-vasprintf.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_5 = lib_a-asniprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-diprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ lib_a-vasniprintf.$(OBJEXT)
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = $(am__objects_5) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_3 = lib_a-asniprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-asnprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-clearerr_u.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-diprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-dprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-feof_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-ferror_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fflush_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetc_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgets_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetwc.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetws.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fgetws_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fileno_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fmemopen.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fopencookie.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fpurge.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputc_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputs_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputwc.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputws.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fputws_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fread_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fsetlocking.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-funopen.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwide.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwprintf.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwrite_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-fwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwc.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwchar.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-getwchar_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-open_memstream.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwc.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwc_u.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwchar.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-putwchar_u.$(OBJEXT) \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-stdio_ext.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-swscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-ungetwc.$(OBJEXT) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasniprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vasnprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vfwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vswprintf.$(OBJEXT) \
@@ -184,81 +153,53 @@ am__objects_2 = $(am__objects_1) lib_a-clearerr.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-vwscanf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wprintf.$(OBJEXT) \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ lib_a-wscanf.$(OBJEXT)
-@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_2) \
-@USE_LIBTOOL_FALSE@ $(am__objects_4) $(am__objects_6)
+@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \
+@USE_LIBTOOL_FALSE@ $(am__objects_2) $(am__objects_3)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
-@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_7 = fiprintf.lo fiscanf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ iprintf.lo iscanf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.lo siscanf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ sniprintf.lo vdiprintf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.lo viscanf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiprintf.lo vsiscanf.lo \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsniprintf.lo
-am__objects_8 = $(am__objects_7) clearerr.lo fclose.lo fdopen.lo \
- feof.lo ferror.lo fflush.lo fgetc.lo fgetpos.lo fgets.lo \
- fileno.lo findfp.lo flags.lo fopen.lo fprintf.lo fputc.lo \
- fputs.lo fread.lo freopen.lo fscanf.lo fseek.lo fsetpos.lo \
+am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
+ fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \
+ fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \
+ fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \
getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \
- makebuf.lo perror.lo printf.lo putc.lo putchar.lo putc_u.lo \
- putchar_u.lo puts.lo refill.lo remove.lo rename.lo rewind.lo \
- rget.lo scanf.lo sccl.lo setbuf.lo setbuffer.lo setlinebuf.lo \
- setvbuf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
- tmpfile.lo tmpnam.lo ungetc.lo vdprintf.lo vprintf.lo \
- vscanf.lo vsnprintf.lo vsprintf.lo vsscanf.lo wbuf.lo \
- wsetup.lo
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_9 = asiprintf.lo \
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasiprintf.lo
-@ELIX_LEVEL_1_FALSE@am__objects_10 = $(am__objects_9) asprintf.lo \
+ iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \
+ putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \
+ rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \
+ setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \
+ sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
+ tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \
+ viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \
+ vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \
+ wbuf.lo wsetup.lo
+@ELIX_LEVEL_1_FALSE@am__objects_5 = asiprintf.lo asprintf.lo \
@ELIX_LEVEL_1_FALSE@ fcloseall.lo fseeko.lo ftello.lo getw.lo \
-@ELIX_LEVEL_1_FALSE@ mktemp.lo putw.lo vasprintf.lo
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@am__objects_11 = asniprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasniprintf.lo
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_12 = $(am__objects_11) \
+@ELIX_LEVEL_1_FALSE@ mktemp.lo putw.lo vasiprintf.lo \
+@ELIX_LEVEL_1_FALSE@ vasprintf.lo
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@am__objects_6 = asniprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ clearerr_u.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ feof_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ferror_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fflush_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetc_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgets_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fileno_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputc_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputs_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fread_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fsetlocking.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwrite_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc_u.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar_u.lo \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ stdio_ext.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.lo \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.lo \
@@ -267,8 +208,8 @@ am__objects_8 = $(am__objects_7) clearerr.lo fclose.lo fdopen.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vwscanf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wprintf.lo \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ wscanf.lo
-@USE_LIBTOOL_TRUE@am_libstdio_la_OBJECTS = $(am__objects_8) \
-@USE_LIBTOOL_TRUE@ $(am__objects_10) $(am__objects_12)
+@USE_LIBTOOL_TRUE@am_libstdio_la_OBJECTS = $(am__objects_4) \
+@USE_LIBTOOL_TRUE@ $(am__objects_5) $(am__objects_6)
libstdio_la_OBJECTS = $(am_libstdio_la_OBJECTS)
libstdio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -441,24 +382,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
-@NEWLIB_NANO_FORMATTED_IO_FALSE@GENERAL_INT_FORMATTED_IO_SOURCES = \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ fiprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ fiscanf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ iprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ iscanf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siscanf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ sniprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vdiprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viscanf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiprintf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsiscanf.c \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vsniprintf.c
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@GENERAL_INT_FORMATTED_IO_SOURCES =
GENERAL_SOURCES = \
- $(GENERAL_INT_FORMATTED_IO_SOURCES) \
clearerr.c \
fclose.c \
fdopen.c \
@@ -470,6 +394,7 @@ GENERAL_SOURCES = \
fgets.c \
fileno.c \
findfp.c \
+ fiprintf.c \
flags.c \
fopen.c \
fprintf.c \
@@ -478,6 +403,7 @@ GENERAL_SOURCES = \
fread.c \
freopen.c \
fscanf.c \
+ fiscanf.c \
fseek.c \
fsetpos.c \
ftell.c \
@@ -491,6 +417,8 @@ GENERAL_SOURCES = \
getdelim.c \
getline.c \
gets.c \
+ iprintf.c \
+ iscanf.c \
makebuf.c \
perror.c \
printf.c \
@@ -510,6 +438,9 @@ GENERAL_SOURCES = \
setbuffer.c \
setlinebuf.c \
setvbuf.c \
+ siprintf.c \
+ siscanf.c \
+ sniprintf.c \
snprintf.c \
sprintf.c \
sscanf.c \
@@ -517,17 +448,23 @@ GENERAL_SOURCES = \
tmpfile.c \
tmpnam.c \
ungetc.c \
+ vdiprintf.c \
vdprintf.c \
+ viprintf.c \
+ viscanf.c \
vprintf.c \
vscanf.c \
+ vsiprintf.c \
+ vsiscanf.c \
vsnprintf.c \
+ vsniprintf.c \
vsprintf.c \
vsscanf.c \
wbuf.c \
wsetup.c
@ELIX_LEVEL_1_FALSE@ELIX_2_SOURCES = \
-@ELIX_LEVEL_1_FALSE@ $(ELIX_2_INT_FORMATTED_IO_SOURCES) \
+@ELIX_LEVEL_1_FALSE@ asiprintf.c \
@ELIX_LEVEL_1_FALSE@ asprintf.c \
@ELIX_LEVEL_1_FALSE@ fcloseall.c \
@ELIX_LEVEL_1_FALSE@ fseeko.c \
@@ -535,58 +472,35 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_FALSE@ getw.c \
@ELIX_LEVEL_1_FALSE@ mktemp.c \
@ELIX_LEVEL_1_FALSE@ putw.c \
+@ELIX_LEVEL_1_FALSE@ vasiprintf.c \
@ELIX_LEVEL_1_FALSE@ vasprintf.c
@ELIX_LEVEL_1_TRUE@ELIX_2_SOURCES =
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ELIX_2_INT_FORMATTED_IO_SOURCES = \
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ asiprintf.c \
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasiprintf.c
-
-@ELIX_LEVEL_1_FALSE@@NEWLIB_NANO_FORMATTED_IO_TRUE@ELIX_2_INT_FORMATTED_IO_SOURCES =
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ELIX_4_SOURCES = \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ $(ELIX_4_INT_FORMATTED_IO_SOURCES) \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asniprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ asnprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ clearerr_u.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ diprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ dprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ feof_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ferror_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fflush_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetc_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgets_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fgetws_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fileno_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fmemopen.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fopencookie.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fpurge.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputc_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputs_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fputws_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fread_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fsetlocking.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ funopen.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwide.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwrite_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ fwscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ getwchar_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ open_memstream.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwc_u.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ putwchar_u.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ stdio_ext.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ swscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ ungetwc.c \
+@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasniprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vasnprintf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vfwscanf.c \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@ vswprintf.c \
@@ -599,39 +513,15 @@ GENERAL_SOURCES = \
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_TRUE@ELIX_4_SOURCES =
@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_4_SOURCES =
@ELIX_LEVEL_1_TRUE@ELIX_4_SOURCES =
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ELIX_4_INT_FORMATTED_IO_SOURCES = \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ asniprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.c \
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ vasniprintf.c
-
-@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@@ELIX_LEVEL_3_FALSE@@NEWLIB_NANO_FORMATTED_IO_TRUE@ELIX_4_INT_FORMATTED_IO_SOURCES =
-@NEWLIB_NANO_FORMATTED_IO_FALSE@LIBADD_OBJS = \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@LIBADD_OBJS = \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf_float.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-svfprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-svfscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfprintf_i.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf_i.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)nano-vfscanf_float.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfiwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfiwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfwprintf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfiwscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)svfwscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfiwscanf.$(oext) \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(lpfx)vfwscanf.$(oext)
+LIBADD_OBJS = \
+ $(lpfx)svfiprintf.$(oext) $(lpfx)svfprintf.$(oext) \
+ $(lpfx)svfiscanf.$(oext) $(lpfx)svfscanf.$(oext) \
+ $(lpfx)vfiprintf.$(oext) $(lpfx)vfprintf.$(oext) \
+ $(lpfx)vfscanf.$(oext) $(lpfx)vfiscanf.$(oext) \
+ $(lpfx)svfiwprintf.$(oext) $(lpfx)svfwprintf.$(oext) \
+ $(lpfx)vfiwprintf.$(oext) $(lpfx)vfwprintf.$(oext) \
+ $(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
+ $(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libstdio.la
@@ -647,26 +537,9 @@ libstdio_la_LDFLAGS = -Xcompiler -nostdlib
@USE_LIBTOOL_FALSE@lib_a_LIBADD = $(LIBADD_OBJS)
@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS)
@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = $(LIBADD_OBJS)
-@NEWLIB_NANO_FORMATTED_IO_FALSE@CHEWOUT_INT_FORMATTED_IO_FILES = \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ diprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ siscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ vfscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_FALSE@ viscanf.def
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@CHEWOUT_INT_FORMATTED_IO_FILES = \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_i.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfprintf_float.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_i.def \
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ nano-vfscanf_float.def
-
CHEWOUT_FILES = \
- $(CHEWOUT_INT_FORMATTED_IO_FILES) \
clearerr.def \
+ diprintf.def \
dprintf.def \
fclose.def \
fcloseall.def \
@@ -691,7 +564,6 @@ CHEWOUT_FILES = \
fread.def \
freopen.def \
fseek.def \
- fsetlocking.def \
fsetpos.def \
ftell.def \
funopen.def \
@@ -725,17 +597,22 @@ CHEWOUT_FILES = \
setbuffer.def \
setlinebuf.def \
setvbuf.def \
+ siprintf.def \
+ siscanf.def \
sprintf.def \
sscanf.def \
- stdio_ext.def \
swprintf.def \
swscanf.def \
tmpfile.def \
tmpnam.def \
ungetc.def \
ungetwc.def \
+ vfprintf.def \
+ vfscanf.def \
vfwprintf.def \
- vfwscanf.def
+ vfwscanf.def \
+ viprintf.def \
+ viscanf.def
SUFFIXES = .def
CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str
@@ -810,84 +687,6 @@ distclean-compile:
.c.lo:
$(LTCOMPILE) -c -o $@ $<
-lib_a-fiprintf.o: fiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.o `test -f 'fiprintf.c' || echo '$(srcdir)/'`fiprintf.c
-
-lib_a-fiprintf.obj: fiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.obj `if test -f 'fiprintf.c'; then $(CYGPATH_W) 'fiprintf.c'; else $(CYGPATH_W) '$(srcdir)/fiprintf.c'; fi`
-
-lib_a-fiscanf.o: fiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.o `test -f 'fiscanf.c' || echo '$(srcdir)/'`fiscanf.c
-
-lib_a-fiscanf.obj: fiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.obj `if test -f 'fiscanf.c'; then $(CYGPATH_W) 'fiscanf.c'; else $(CYGPATH_W) '$(srcdir)/fiscanf.c'; fi`
-
-lib_a-iprintf.o: iprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.o `test -f 'iprintf.c' || echo '$(srcdir)/'`iprintf.c
-
-lib_a-iprintf.obj: iprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.obj `if test -f 'iprintf.c'; then $(CYGPATH_W) 'iprintf.c'; else $(CYGPATH_W) '$(srcdir)/iprintf.c'; fi`
-
-lib_a-iscanf.o: iscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.o `test -f 'iscanf.c' || echo '$(srcdir)/'`iscanf.c
-
-lib_a-iscanf.obj: iscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.obj `if test -f 'iscanf.c'; then $(CYGPATH_W) 'iscanf.c'; else $(CYGPATH_W) '$(srcdir)/iscanf.c'; fi`
-
-lib_a-siprintf.o: siprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.o `test -f 'siprintf.c' || echo '$(srcdir)/'`siprintf.c
-
-lib_a-siprintf.obj: siprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.obj `if test -f 'siprintf.c'; then $(CYGPATH_W) 'siprintf.c'; else $(CYGPATH_W) '$(srcdir)/siprintf.c'; fi`
-
-lib_a-siscanf.o: siscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.o `test -f 'siscanf.c' || echo '$(srcdir)/'`siscanf.c
-
-lib_a-siscanf.obj: siscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.obj `if test -f 'siscanf.c'; then $(CYGPATH_W) 'siscanf.c'; else $(CYGPATH_W) '$(srcdir)/siscanf.c'; fi`
-
-lib_a-sniprintf.o: sniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.o `test -f 'sniprintf.c' || echo '$(srcdir)/'`sniprintf.c
-
-lib_a-sniprintf.obj: sniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.obj `if test -f 'sniprintf.c'; then $(CYGPATH_W) 'sniprintf.c'; else $(CYGPATH_W) '$(srcdir)/sniprintf.c'; fi`
-
-lib_a-vdiprintf.o: vdiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.o `test -f 'vdiprintf.c' || echo '$(srcdir)/'`vdiprintf.c
-
-lib_a-vdiprintf.obj: vdiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.obj `if test -f 'vdiprintf.c'; then $(CYGPATH_W) 'vdiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdiprintf.c'; fi`
-
-lib_a-viprintf.o: viprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.o `test -f 'viprintf.c' || echo '$(srcdir)/'`viprintf.c
-
-lib_a-viprintf.obj: viprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.obj `if test -f 'viprintf.c'; then $(CYGPATH_W) 'viprintf.c'; else $(CYGPATH_W) '$(srcdir)/viprintf.c'; fi`
-
-lib_a-viscanf.o: viscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.o `test -f 'viscanf.c' || echo '$(srcdir)/'`viscanf.c
-
-lib_a-viscanf.obj: viscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.obj `if test -f 'viscanf.c'; then $(CYGPATH_W) 'viscanf.c'; else $(CYGPATH_W) '$(srcdir)/viscanf.c'; fi`
-
-lib_a-vsiprintf.o: vsiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.o `test -f 'vsiprintf.c' || echo '$(srcdir)/'`vsiprintf.c
-
-lib_a-vsiprintf.obj: vsiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.obj `if test -f 'vsiprintf.c'; then $(CYGPATH_W) 'vsiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsiprintf.c'; fi`
-
-lib_a-vsiscanf.o: vsiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.o `test -f 'vsiscanf.c' || echo '$(srcdir)/'`vsiscanf.c
-
-lib_a-vsiscanf.obj: vsiscanf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.obj `if test -f 'vsiscanf.c'; then $(CYGPATH_W) 'vsiscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsiscanf.c'; fi`
-
-lib_a-vsniprintf.o: vsniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.o `test -f 'vsniprintf.c' || echo '$(srcdir)/'`vsniprintf.c
-
-lib_a-vsniprintf.obj: vsniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.obj `if test -f 'vsniprintf.c'; then $(CYGPATH_W) 'vsniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsniprintf.c'; fi`
-
lib_a-clearerr.o: clearerr.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.o `test -f 'clearerr.c' || echo '$(srcdir)/'`clearerr.c
@@ -954,6 +753,12 @@ lib_a-findfp.o: findfp.c
lib_a-findfp.obj: findfp.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-findfp.obj `if test -f 'findfp.c'; then $(CYGPATH_W) 'findfp.c'; else $(CYGPATH_W) '$(srcdir)/findfp.c'; fi`
+lib_a-fiprintf.o: fiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.o `test -f 'fiprintf.c' || echo '$(srcdir)/'`fiprintf.c
+
+lib_a-fiprintf.obj: fiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiprintf.obj `if test -f 'fiprintf.c'; then $(CYGPATH_W) 'fiprintf.c'; else $(CYGPATH_W) '$(srcdir)/fiprintf.c'; fi`
+
lib_a-flags.o: flags.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-flags.o `test -f 'flags.c' || echo '$(srcdir)/'`flags.c
@@ -1002,6 +807,12 @@ lib_a-fscanf.o: fscanf.c
lib_a-fscanf.obj: fscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fscanf.obj `if test -f 'fscanf.c'; then $(CYGPATH_W) 'fscanf.c'; else $(CYGPATH_W) '$(srcdir)/fscanf.c'; fi`
+lib_a-fiscanf.o: fiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.o `test -f 'fiscanf.c' || echo '$(srcdir)/'`fiscanf.c
+
+lib_a-fiscanf.obj: fiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fiscanf.obj `if test -f 'fiscanf.c'; then $(CYGPATH_W) 'fiscanf.c'; else $(CYGPATH_W) '$(srcdir)/fiscanf.c'; fi`
+
lib_a-fseek.o: fseek.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fseek.o `test -f 'fseek.c' || echo '$(srcdir)/'`fseek.c
@@ -1080,6 +891,18 @@ lib_a-gets.o: gets.c
lib_a-gets.obj: gets.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gets.obj `if test -f 'gets.c'; then $(CYGPATH_W) 'gets.c'; else $(CYGPATH_W) '$(srcdir)/gets.c'; fi`
+lib_a-iprintf.o: iprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.o `test -f 'iprintf.c' || echo '$(srcdir)/'`iprintf.c
+
+lib_a-iprintf.obj: iprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iprintf.obj `if test -f 'iprintf.c'; then $(CYGPATH_W) 'iprintf.c'; else $(CYGPATH_W) '$(srcdir)/iprintf.c'; fi`
+
+lib_a-iscanf.o: iscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.o `test -f 'iscanf.c' || echo '$(srcdir)/'`iscanf.c
+
+lib_a-iscanf.obj: iscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-iscanf.obj `if test -f 'iscanf.c'; then $(CYGPATH_W) 'iscanf.c'; else $(CYGPATH_W) '$(srcdir)/iscanf.c'; fi`
+
lib_a-makebuf.o: makebuf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-makebuf.o `test -f 'makebuf.c' || echo '$(srcdir)/'`makebuf.c
@@ -1194,6 +1017,24 @@ lib_a-setvbuf.o: setvbuf.c
lib_a-setvbuf.obj: setvbuf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-setvbuf.obj `if test -f 'setvbuf.c'; then $(CYGPATH_W) 'setvbuf.c'; else $(CYGPATH_W) '$(srcdir)/setvbuf.c'; fi`
+lib_a-siprintf.o: siprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.o `test -f 'siprintf.c' || echo '$(srcdir)/'`siprintf.c
+
+lib_a-siprintf.obj: siprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siprintf.obj `if test -f 'siprintf.c'; then $(CYGPATH_W) 'siprintf.c'; else $(CYGPATH_W) '$(srcdir)/siprintf.c'; fi`
+
+lib_a-siscanf.o: siscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.o `test -f 'siscanf.c' || echo '$(srcdir)/'`siscanf.c
+
+lib_a-siscanf.obj: siscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-siscanf.obj `if test -f 'siscanf.c'; then $(CYGPATH_W) 'siscanf.c'; else $(CYGPATH_W) '$(srcdir)/siscanf.c'; fi`
+
+lib_a-sniprintf.o: sniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.o `test -f 'sniprintf.c' || echo '$(srcdir)/'`sniprintf.c
+
+lib_a-sniprintf.obj: sniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sniprintf.obj `if test -f 'sniprintf.c'; then $(CYGPATH_W) 'sniprintf.c'; else $(CYGPATH_W) '$(srcdir)/sniprintf.c'; fi`
+
lib_a-snprintf.o: snprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-snprintf.o `test -f 'snprintf.c' || echo '$(srcdir)/'`snprintf.c
@@ -1236,12 +1077,30 @@ lib_a-ungetc.o: ungetc.c
lib_a-ungetc.obj: ungetc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetc.obj `if test -f 'ungetc.c'; then $(CYGPATH_W) 'ungetc.c'; else $(CYGPATH_W) '$(srcdir)/ungetc.c'; fi`
+lib_a-vdiprintf.o: vdiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.o `test -f 'vdiprintf.c' || echo '$(srcdir)/'`vdiprintf.c
+
+lib_a-vdiprintf.obj: vdiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdiprintf.obj `if test -f 'vdiprintf.c'; then $(CYGPATH_W) 'vdiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdiprintf.c'; fi`
+
lib_a-vdprintf.o: vdprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.o `test -f 'vdprintf.c' || echo '$(srcdir)/'`vdprintf.c
lib_a-vdprintf.obj: vdprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vdprintf.obj `if test -f 'vdprintf.c'; then $(CYGPATH_W) 'vdprintf.c'; else $(CYGPATH_W) '$(srcdir)/vdprintf.c'; fi`
+lib_a-viprintf.o: viprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.o `test -f 'viprintf.c' || echo '$(srcdir)/'`viprintf.c
+
+lib_a-viprintf.obj: viprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viprintf.obj `if test -f 'viprintf.c'; then $(CYGPATH_W) 'viprintf.c'; else $(CYGPATH_W) '$(srcdir)/viprintf.c'; fi`
+
+lib_a-viscanf.o: viscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.o `test -f 'viscanf.c' || echo '$(srcdir)/'`viscanf.c
+
+lib_a-viscanf.obj: viscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-viscanf.obj `if test -f 'viscanf.c'; then $(CYGPATH_W) 'viscanf.c'; else $(CYGPATH_W) '$(srcdir)/viscanf.c'; fi`
+
lib_a-vprintf.o: vprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vprintf.o `test -f 'vprintf.c' || echo '$(srcdir)/'`vprintf.c
@@ -1254,12 +1113,30 @@ lib_a-vscanf.o: vscanf.c
lib_a-vscanf.obj: vscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vscanf.obj `if test -f 'vscanf.c'; then $(CYGPATH_W) 'vscanf.c'; else $(CYGPATH_W) '$(srcdir)/vscanf.c'; fi`
+lib_a-vsiprintf.o: vsiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.o `test -f 'vsiprintf.c' || echo '$(srcdir)/'`vsiprintf.c
+
+lib_a-vsiprintf.obj: vsiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiprintf.obj `if test -f 'vsiprintf.c'; then $(CYGPATH_W) 'vsiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsiprintf.c'; fi`
+
+lib_a-vsiscanf.o: vsiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.o `test -f 'vsiscanf.c' || echo '$(srcdir)/'`vsiscanf.c
+
+lib_a-vsiscanf.obj: vsiscanf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsiscanf.obj `if test -f 'vsiscanf.c'; then $(CYGPATH_W) 'vsiscanf.c'; else $(CYGPATH_W) '$(srcdir)/vsiscanf.c'; fi`
+
lib_a-vsnprintf.o: vsnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.o `test -f 'vsnprintf.c' || echo '$(srcdir)/'`vsnprintf.c
lib_a-vsnprintf.obj: vsnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsnprintf.obj `if test -f 'vsnprintf.c'; then $(CYGPATH_W) 'vsnprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsnprintf.c'; fi`
+lib_a-vsniprintf.o: vsniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.o `test -f 'vsniprintf.c' || echo '$(srcdir)/'`vsniprintf.c
+
+lib_a-vsniprintf.obj: vsniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsniprintf.obj `if test -f 'vsniprintf.c'; then $(CYGPATH_W) 'vsniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vsniprintf.c'; fi`
+
lib_a-vsprintf.o: vsprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vsprintf.o `test -f 'vsprintf.c' || echo '$(srcdir)/'`vsprintf.c
@@ -1290,12 +1167,6 @@ lib_a-asiprintf.o: asiprintf.c
lib_a-asiprintf.obj: asiprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asiprintf.obj `if test -f 'asiprintf.c'; then $(CYGPATH_W) 'asiprintf.c'; else $(CYGPATH_W) '$(srcdir)/asiprintf.c'; fi`
-lib_a-vasiprintf.o: vasiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.o `test -f 'vasiprintf.c' || echo '$(srcdir)/'`vasiprintf.c
-
-lib_a-vasiprintf.obj: vasiprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.obj `if test -f 'vasiprintf.c'; then $(CYGPATH_W) 'vasiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasiprintf.c'; fi`
-
lib_a-asprintf.o: asprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asprintf.o `test -f 'asprintf.c' || echo '$(srcdir)/'`asprintf.c
@@ -1338,6 +1209,12 @@ lib_a-putw.o: putw.c
lib_a-putw.obj: putw.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putw.obj `if test -f 'putw.c'; then $(CYGPATH_W) 'putw.c'; else $(CYGPATH_W) '$(srcdir)/putw.c'; fi`
+lib_a-vasiprintf.o: vasiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.o `test -f 'vasiprintf.c' || echo '$(srcdir)/'`vasiprintf.c
+
+lib_a-vasiprintf.obj: vasiprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasiprintf.obj `if test -f 'vasiprintf.c'; then $(CYGPATH_W) 'vasiprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasiprintf.c'; fi`
+
lib_a-vasprintf.o: vasprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasprintf.o `test -f 'vasprintf.c' || echo '$(srcdir)/'`vasprintf.c
@@ -1350,29 +1227,17 @@ lib_a-asniprintf.o: asniprintf.c
lib_a-asniprintf.obj: asniprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asniprintf.obj `if test -f 'asniprintf.c'; then $(CYGPATH_W) 'asniprintf.c'; else $(CYGPATH_W) '$(srcdir)/asniprintf.c'; fi`
-lib_a-diprintf.o: diprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.o `test -f 'diprintf.c' || echo '$(srcdir)/'`diprintf.c
-
-lib_a-diprintf.obj: diprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.obj `if test -f 'diprintf.c'; then $(CYGPATH_W) 'diprintf.c'; else $(CYGPATH_W) '$(srcdir)/diprintf.c'; fi`
-
-lib_a-vasniprintf.o: vasniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.o `test -f 'vasniprintf.c' || echo '$(srcdir)/'`vasniprintf.c
-
-lib_a-vasniprintf.obj: vasniprintf.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.obj `if test -f 'vasniprintf.c'; then $(CYGPATH_W) 'vasniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasniprintf.c'; fi`
-
lib_a-asnprintf.o: asnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.o `test -f 'asnprintf.c' || echo '$(srcdir)/'`asnprintf.c
lib_a-asnprintf.obj: asnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-asnprintf.obj `if test -f 'asnprintf.c'; then $(CYGPATH_W) 'asnprintf.c'; else $(CYGPATH_W) '$(srcdir)/asnprintf.c'; fi`
-lib_a-clearerr_u.o: clearerr_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr_u.o `test -f 'clearerr_u.c' || echo '$(srcdir)/'`clearerr_u.c
+lib_a-diprintf.o: diprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.o `test -f 'diprintf.c' || echo '$(srcdir)/'`diprintf.c
-lib_a-clearerr_u.obj: clearerr_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr_u.obj `if test -f 'clearerr_u.c'; then $(CYGPATH_W) 'clearerr_u.c'; else $(CYGPATH_W) '$(srcdir)/clearerr_u.c'; fi`
+lib_a-diprintf.obj: diprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-diprintf.obj `if test -f 'diprintf.c'; then $(CYGPATH_W) 'diprintf.c'; else $(CYGPATH_W) '$(srcdir)/diprintf.c'; fi`
lib_a-dprintf.o: dprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.o `test -f 'dprintf.c' || echo '$(srcdir)/'`dprintf.c
@@ -1380,66 +1245,18 @@ lib_a-dprintf.o: dprintf.c
lib_a-dprintf.obj: dprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-dprintf.obj `if test -f 'dprintf.c'; then $(CYGPATH_W) 'dprintf.c'; else $(CYGPATH_W) '$(srcdir)/dprintf.c'; fi`
-lib_a-feof_u.o: feof_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof_u.o `test -f 'feof_u.c' || echo '$(srcdir)/'`feof_u.c
-
-lib_a-feof_u.obj: feof_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-feof_u.obj `if test -f 'feof_u.c'; then $(CYGPATH_W) 'feof_u.c'; else $(CYGPATH_W) '$(srcdir)/feof_u.c'; fi`
-
-lib_a-ferror_u.o: ferror_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror_u.o `test -f 'ferror_u.c' || echo '$(srcdir)/'`ferror_u.c
-
-lib_a-ferror_u.obj: ferror_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ferror_u.obj `if test -f 'ferror_u.c'; then $(CYGPATH_W) 'ferror_u.c'; else $(CYGPATH_W) '$(srcdir)/ferror_u.c'; fi`
-
-lib_a-fflush_u.o: fflush_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush_u.o `test -f 'fflush_u.c' || echo '$(srcdir)/'`fflush_u.c
-
-lib_a-fflush_u.obj: fflush_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fflush_u.obj `if test -f 'fflush_u.c'; then $(CYGPATH_W) 'fflush_u.c'; else $(CYGPATH_W) '$(srcdir)/fflush_u.c'; fi`
-
-lib_a-fgetc_u.o: fgetc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc_u.o `test -f 'fgetc_u.c' || echo '$(srcdir)/'`fgetc_u.c
-
-lib_a-fgetc_u.obj: fgetc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetc_u.obj `if test -f 'fgetc_u.c'; then $(CYGPATH_W) 'fgetc_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetc_u.c'; fi`
-
-lib_a-fgets_u.o: fgets_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets_u.o `test -f 'fgets_u.c' || echo '$(srcdir)/'`fgets_u.c
-
-lib_a-fgets_u.obj: fgets_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgets_u.obj `if test -f 'fgets_u.c'; then $(CYGPATH_W) 'fgets_u.c'; else $(CYGPATH_W) '$(srcdir)/fgets_u.c'; fi`
-
lib_a-fgetwc.o: fgetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.o `test -f 'fgetwc.c' || echo '$(srcdir)/'`fgetwc.c
lib_a-fgetwc.obj: fgetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc.obj `if test -f 'fgetwc.c'; then $(CYGPATH_W) 'fgetwc.c'; else $(CYGPATH_W) '$(srcdir)/fgetwc.c'; fi`
-lib_a-fgetwc_u.o: fgetwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc_u.o `test -f 'fgetwc_u.c' || echo '$(srcdir)/'`fgetwc_u.c
-
-lib_a-fgetwc_u.obj: fgetwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetwc_u.obj `if test -f 'fgetwc_u.c'; then $(CYGPATH_W) 'fgetwc_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetwc_u.c'; fi`
-
lib_a-fgetws.o: fgetws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.o `test -f 'fgetws.c' || echo '$(srcdir)/'`fgetws.c
lib_a-fgetws.obj: fgetws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws.obj `if test -f 'fgetws.c'; then $(CYGPATH_W) 'fgetws.c'; else $(CYGPATH_W) '$(srcdir)/fgetws.c'; fi`
-lib_a-fgetws_u.o: fgetws_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws_u.o `test -f 'fgetws_u.c' || echo '$(srcdir)/'`fgetws_u.c
-
-lib_a-fgetws_u.obj: fgetws_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fgetws_u.obj `if test -f 'fgetws_u.c'; then $(CYGPATH_W) 'fgetws_u.c'; else $(CYGPATH_W) '$(srcdir)/fgetws_u.c'; fi`
-
-lib_a-fileno_u.o: fileno_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno_u.o `test -f 'fileno_u.c' || echo '$(srcdir)/'`fileno_u.c
-
-lib_a-fileno_u.obj: fileno_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fileno_u.obj `if test -f 'fileno_u.c'; then $(CYGPATH_W) 'fileno_u.c'; else $(CYGPATH_W) '$(srcdir)/fileno_u.c'; fi`
-
lib_a-fmemopen.o: fmemopen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fmemopen.o `test -f 'fmemopen.c' || echo '$(srcdir)/'`fmemopen.c
@@ -1458,54 +1275,18 @@ lib_a-fpurge.o: fpurge.c
lib_a-fpurge.obj: fpurge.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fpurge.obj `if test -f 'fpurge.c'; then $(CYGPATH_W) 'fpurge.c'; else $(CYGPATH_W) '$(srcdir)/fpurge.c'; fi`
-lib_a-fputc_u.o: fputc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc_u.o `test -f 'fputc_u.c' || echo '$(srcdir)/'`fputc_u.c
-
-lib_a-fputc_u.obj: fputc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc_u.obj `if test -f 'fputc_u.c'; then $(CYGPATH_W) 'fputc_u.c'; else $(CYGPATH_W) '$(srcdir)/fputc_u.c'; fi`
-
-lib_a-fputs_u.o: fputs_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs_u.o `test -f 'fputs_u.c' || echo '$(srcdir)/'`fputs_u.c
-
-lib_a-fputs_u.obj: fputs_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputs_u.obj `if test -f 'fputs_u.c'; then $(CYGPATH_W) 'fputs_u.c'; else $(CYGPATH_W) '$(srcdir)/fputs_u.c'; fi`
-
lib_a-fputwc.o: fputwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.o `test -f 'fputwc.c' || echo '$(srcdir)/'`fputwc.c
lib_a-fputwc.obj: fputwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc.obj `if test -f 'fputwc.c'; then $(CYGPATH_W) 'fputwc.c'; else $(CYGPATH_W) '$(srcdir)/fputwc.c'; fi`
-lib_a-fputwc_u.o: fputwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc_u.o `test -f 'fputwc_u.c' || echo '$(srcdir)/'`fputwc_u.c
-
-lib_a-fputwc_u.obj: fputwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputwc_u.obj `if test -f 'fputwc_u.c'; then $(CYGPATH_W) 'fputwc_u.c'; else $(CYGPATH_W) '$(srcdir)/fputwc_u.c'; fi`
-
lib_a-fputws.o: fputws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.o `test -f 'fputws.c' || echo '$(srcdir)/'`fputws.c
lib_a-fputws.obj: fputws.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws.obj `if test -f 'fputws.c'; then $(CYGPATH_W) 'fputws.c'; else $(CYGPATH_W) '$(srcdir)/fputws.c'; fi`
-lib_a-fputws_u.o: fputws_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws_u.o `test -f 'fputws_u.c' || echo '$(srcdir)/'`fputws_u.c
-
-lib_a-fputws_u.obj: fputws_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputws_u.obj `if test -f 'fputws_u.c'; then $(CYGPATH_W) 'fputws_u.c'; else $(CYGPATH_W) '$(srcdir)/fputws_u.c'; fi`
-
-lib_a-fread_u.o: fread_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread_u.o `test -f 'fread_u.c' || echo '$(srcdir)/'`fread_u.c
-
-lib_a-fread_u.obj: fread_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fread_u.obj `if test -f 'fread_u.c'; then $(CYGPATH_W) 'fread_u.c'; else $(CYGPATH_W) '$(srcdir)/fread_u.c'; fi`
-
-lib_a-fsetlocking.o: fsetlocking.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetlocking.o `test -f 'fsetlocking.c' || echo '$(srcdir)/'`fsetlocking.c
-
-lib_a-fsetlocking.obj: fsetlocking.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fsetlocking.obj `if test -f 'fsetlocking.c'; then $(CYGPATH_W) 'fsetlocking.c'; else $(CYGPATH_W) '$(srcdir)/fsetlocking.c'; fi`
-
lib_a-funopen.o: funopen.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-funopen.o `test -f 'funopen.c' || echo '$(srcdir)/'`funopen.c
@@ -1524,12 +1305,6 @@ lib_a-fwprintf.o: fwprintf.c
lib_a-fwprintf.obj: fwprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwprintf.obj `if test -f 'fwprintf.c'; then $(CYGPATH_W) 'fwprintf.c'; else $(CYGPATH_W) '$(srcdir)/fwprintf.c'; fi`
-lib_a-fwrite_u.o: fwrite_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite_u.o `test -f 'fwrite_u.c' || echo '$(srcdir)/'`fwrite_u.c
-
-lib_a-fwrite_u.obj: fwrite_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwrite_u.obj `if test -f 'fwrite_u.c'; then $(CYGPATH_W) 'fwrite_u.c'; else $(CYGPATH_W) '$(srcdir)/fwrite_u.c'; fi`
-
lib_a-fwscanf.o: fwscanf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fwscanf.o `test -f 'fwscanf.c' || echo '$(srcdir)/'`fwscanf.c
@@ -1542,24 +1317,12 @@ lib_a-getwc.o: getwc.c
lib_a-getwc.obj: getwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc.obj `if test -f 'getwc.c'; then $(CYGPATH_W) 'getwc.c'; else $(CYGPATH_W) '$(srcdir)/getwc.c'; fi`
-lib_a-getwc_u.o: getwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc_u.o `test -f 'getwc_u.c' || echo '$(srcdir)/'`getwc_u.c
-
-lib_a-getwc_u.obj: getwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwc_u.obj `if test -f 'getwc_u.c'; then $(CYGPATH_W) 'getwc_u.c'; else $(CYGPATH_W) '$(srcdir)/getwc_u.c'; fi`
-
lib_a-getwchar.o: getwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.o `test -f 'getwchar.c' || echo '$(srcdir)/'`getwchar.c
lib_a-getwchar.obj: getwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar.obj `if test -f 'getwchar.c'; then $(CYGPATH_W) 'getwchar.c'; else $(CYGPATH_W) '$(srcdir)/getwchar.c'; fi`
-lib_a-getwchar_u.o: getwchar_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar_u.o `test -f 'getwchar_u.c' || echo '$(srcdir)/'`getwchar_u.c
-
-lib_a-getwchar_u.obj: getwchar_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getwchar_u.obj `if test -f 'getwchar_u.c'; then $(CYGPATH_W) 'getwchar_u.c'; else $(CYGPATH_W) '$(srcdir)/getwchar_u.c'; fi`
-
lib_a-open_memstream.o: open_memstream.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open_memstream.o `test -f 'open_memstream.c' || echo '$(srcdir)/'`open_memstream.c
@@ -1572,30 +1335,12 @@ lib_a-putwc.o: putwc.c
lib_a-putwc.obj: putwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc.obj `if test -f 'putwc.c'; then $(CYGPATH_W) 'putwc.c'; else $(CYGPATH_W) '$(srcdir)/putwc.c'; fi`
-lib_a-putwc_u.o: putwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc_u.o `test -f 'putwc_u.c' || echo '$(srcdir)/'`putwc_u.c
-
-lib_a-putwc_u.obj: putwc_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwc_u.obj `if test -f 'putwc_u.c'; then $(CYGPATH_W) 'putwc_u.c'; else $(CYGPATH_W) '$(srcdir)/putwc_u.c'; fi`
-
lib_a-putwchar.o: putwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.o `test -f 'putwchar.c' || echo '$(srcdir)/'`putwchar.c
lib_a-putwchar.obj: putwchar.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar.obj `if test -f 'putwchar.c'; then $(CYGPATH_W) 'putwchar.c'; else $(CYGPATH_W) '$(srcdir)/putwchar.c'; fi`
-lib_a-putwchar_u.o: putwchar_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar_u.o `test -f 'putwchar_u.c' || echo '$(srcdir)/'`putwchar_u.c
-
-lib_a-putwchar_u.obj: putwchar_u.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-putwchar_u.obj `if test -f 'putwchar_u.c'; then $(CYGPATH_W) 'putwchar_u.c'; else $(CYGPATH_W) '$(srcdir)/putwchar_u.c'; fi`
-
-lib_a-stdio_ext.o: stdio_ext.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio_ext.o `test -f 'stdio_ext.c' || echo '$(srcdir)/'`stdio_ext.c
-
-lib_a-stdio_ext.obj: stdio_ext.c
- $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stdio_ext.obj `if test -f 'stdio_ext.c'; then $(CYGPATH_W) 'stdio_ext.c'; else $(CYGPATH_W) '$(srcdir)/stdio_ext.c'; fi`
-
lib_a-swprintf.o: swprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-swprintf.o `test -f 'swprintf.c' || echo '$(srcdir)/'`swprintf.c
@@ -1614,6 +1359,12 @@ lib_a-ungetwc.o: ungetwc.c
lib_a-ungetwc.obj: ungetwc.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-ungetwc.obj `if test -f 'ungetwc.c'; then $(CYGPATH_W) 'ungetwc.c'; else $(CYGPATH_W) '$(srcdir)/ungetwc.c'; fi`
+lib_a-vasniprintf.o: vasniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.o `test -f 'vasniprintf.c' || echo '$(srcdir)/'`vasniprintf.c
+
+lib_a-vasniprintf.obj: vasniprintf.c
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasniprintf.obj `if test -f 'vasniprintf.c'; then $(CYGPATH_W) 'vasniprintf.c'; else $(CYGPATH_W) '$(srcdir)/vasniprintf.c'; fi`
+
lib_a-vasnprintf.o: vasnprintf.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vasnprintf.o `test -f 'vasnprintf.c' || echo '$(srcdir)/'`vasnprintf.c
@@ -1846,28 +1597,8 @@ objectlist.awk.in: $(noinst_LTLIBRARIES)
echo $$i `pwd`/$$i >> objectlist.awk.in ; \
done
-# Though small footprint nano-formatted-IO implementation is used
-# when NEWLIB_NANO_FORMATTED_IO is enabled, we keep all rules for
-# the other implementation of formatted IO including all i-family
-# functions. The object files in !NEWLIB_NANO_FORMATTED_IO version
-# implementation will be neither compiled nor archived into final
-# library, because they are not depended on by final makefile target.
-
-# Rules compiling small-footprint nano-formatted-io implementation.
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf.$(oext): nano-vfprintf.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_i.$(oext): nano-vfprintf_i.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_i.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_float.$(oext): nano-vfprintf_float.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -c $(srcdir)/nano-vfprintf_float.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfprintf.$(oext): nano-vfprintf.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -fshort-enums -DSTRING_ONLY -c $(srcdir)/nano-vfprintf.c -o $@
-
-# This rule is needed so that libtool compiles vfiprintf before vfprintf.
-# Otherwise libtool moves vfprintf.o and subsequently can't find it.
+# This rule is needed so that libtool compiles vfiprintf before vfprintf. Otherwise
+# libtool moves vfprintf.o and subsequently can't find it.
$(lpfx)vfprintf.$(oext): vfprintf.c
$(LIB_COMPILE) -fshort-enums -c $(srcdir)/vfprintf.c -o $@
@@ -1893,19 +1624,6 @@ $(lpfx)svfwprintf.$(oext): vfwprintf.c
$(lpfx)svfiwprintf.$(oext): vfwprintf.c
$(LIB_COMPILE) -fshort-enums -DINTEGER_ONLY -DSTRING_ONLY -c $(srcdir)/vfwprintf.c -o $@
-# Rules compiling small-footprint nano-formatted-io implementation.
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf.$(oext): nano-vfscanf.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_i.$(oext): nano-vfscanf_i.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_i.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_float.$(oext): nano-vfscanf_float.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -c $(srcdir)/nano-vfscanf_float.c -o $@
-
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfscanf.$(oext): nano-vfscanf.c
-@NEWLIB_NANO_FORMATTED_IO_TRUE@ $(LIB_COMPILE) -DSTRING_ONLY -c $(srcdir)/nano-vfscanf.c -o $@
-
$(lpfx)vfscanf.$(oext): vfscanf.c
$(LIB_COMPILE) -c $(srcdir)/vfscanf.c -o $@
@@ -1937,44 +1655,22 @@ $(lpfx)svfiwscanf.$(oext): vfwscanf.c
doc: $(CHEWOUT_FILES)
cat $(srcdir)/stdio.tex >> $(TARGETDOC)
-$(lpfx)clearerr.$(oext): local.h
-$(lpfx)clearerr_u.$(oext): local.h
$(lpfx)fclose.$(oext): local.h
$(lpfx)fdopen.$(oext): local.h
-$(lpfx)feof.$(oext): local.h
-$(lpfx)feof_u.$(oext): local.h
-$(lpfx)ferror.$(oext): local.h
-$(lpfx)ferror_u.$(oext): local.h
$(lpfx)fflush.$(oext): local.h
-$(lpfx)fflush_u.$(oext): fflush.c
-$(lpfx)fgetc.$(oext): local.h
-$(lpfx)fgetc_u.$(oext): local.h
-$(lpfx)fgets.$(oext): local.h
-$(lpfx)fgets_u.$(oext): fgets.c
$(lpfx)fgetwc.$(oext): local.h
-$(lpfx)fgetwc_u.$(oext): local.h
$(lpfx)fgetws.$(oext): local.h
-$(lpfx)fgetws_u.$(oext): fgetws.c
-$(lpfx)fileno.$(oext): local.h
-$(lpfx)fileno_u.$(oext): local.h
$(lpfx)findfp.$(oext): local.h
$(lpfx)fmemopen.$(oext): local.h
$(lpfx)fopen.$(oext): local.h
$(lpfx)fopencookie.$(oext): local.h
$(lpfx)fpurge.$(oext): local.h
-$(lpfx)fputc.$(oext): local.h
-$(lpfx)fputc_u.$(oext): local.h
$(lpfx)fputs.$(oext): fvwrite.h
-$(lpfx)fputs_u.$(oext): fputs.c
$(lpfx)fputwc.$(oext): local.h
-$(lpfx)fputwc_u.$(oext): local.h
$(lpfx)fputws.$(oext): local.h fvwrite.h
-$(lpfx)fputws_u.$(oext): fputws.c
$(lpfx)fread.$(oext): local.h
-$(lpfx)fread_u.$(oext): fread.c
$(lpfx)freopen.$(oext): local.h
$(lpfx)fseek.$(oext): local.h
-$(lpfx)fsetlocking.$(oext): local.h
$(lpfx)ftell.$(oext): local.h
$(lpfx)funopen.$(oext): local.h
$(lpfx)fvwrite.$(oext): local.h fvwrite.h
@@ -1982,20 +1678,15 @@ $(lpfx)fwalk.$(oext): local.h
$(lpfx)fwide.$(oext): local.h
$(lpfx)fwprintf.$(oext): local.h
$(lpfx)fwrite.$(oext): local.h fvwrite.h
-$(lpfx)fwrite_u.$(oext): fwrite.c
$(lpfx)fwscanf.$(oext): local.h
$(lpfx)getwc.$(oext): local.h
-$(lpfx)getwc_u.$(oext): local.h
$(lpfx)getwchar.$(oext): local.h
-$(lpfx)getwchar_u.$(oext): local.h
$(lpfx)iscanf.$(oext): local.h
$(lpfx)makebuf.$(oext): local.h
$(lpfx)open_memstream.$(oext): local.h
$(lpfx)puts.$(oext): fvwrite.h
$(lpfx)putwc.$(oext): local.h
-$(lpfx)putwc_u.$(oext): local.h
$(lpfx)putwchar.$(oext): local.h
-$(lpfx)putwchar_u.$(oext): local.h
$(lpfx)refill.$(oext): local.h
$(lpfx)scanf.$(oext): local.h
$(lpfx)setbuf.$(oext): local.h
@@ -2006,8 +1697,6 @@ $(lpfx)sniprintf.$(oext): local.h
$(lpfx)sprintf.$(oext): local.h
$(lpfx)sscanf.$(oext): local.h
$(lpfx)stdio.$(oext): local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfprintf.$(oext): local.h nano-vfprintf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-svfscanf.$(oext): local.h nano-vfscanf_local.h
$(lpfx)svfiprintf.$(oext): local.h
$(lpfx)svfiscanf.$(oext): local.h floatio.h
$(lpfx)svfprintf.$(oext): local.h
@@ -2016,12 +1705,6 @@ $(lpfx)swprintf.$(oext): local.h
$(lpfx)swscanf.$(oext): local.h
$(lpfx)ungetc.$(oext): local.h
$(lpfx)ungetwc.$(oext): local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf.$(oext): local.h nano-vfprintf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_i.$(oext): local.h nano-vfprintf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfprintf_float.$(oext): local.h floatio.h nano-vfprintf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf.$(oext): local.h nano-vfscanf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_i.$(oext): local.h nano-vfscanf_local.h
-@NEWLIB_NANO_FORMATTED_IO_TRUE@$(lpfx)nano-vfscanf_float.$(oext): local.h floatio.h nano-vfscanf_local.h
$(lpfx)vfiprintf.$(oext): local.h
$(lpfx)vfiscanf.$(oext): local.h floatio.h
$(lpfx)vfprintf.$(oext): local.h
diff --git a/newlib/libc/stdio/asnprintf.c b/newlib/libc/stdio/asnprintf.c
index 2e8d8aabb..a37c50358 100644
--- a/newlib/libc/stdio/asnprintf.c
+++ b/newlib/libc/stdio/asnprintf.c
@@ -58,12 +58,6 @@ _DEFUN(_asnprintf_r, (ptr, buf, lenp, fmt),
return (char *) f._bf._base;
}
-#ifdef _NANO_FORMATTED_IO
-char *
-_EXFUN(_asniprintf_r, (struct _reent *, char *, size_t *, const char *, ...)
- _ATTRIBUTE ((__alias__("_asnprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
char *
@@ -111,9 +105,4 @@ _DEFUN(asnprintf, (buf, lenp, fmt),
return (char *) f._bf._base;
}
-#ifdef _NANO_FORMATTED_IO
-char *
-_EXFUN(asniprintf, (char *, size_t *, const char *, ...)
- _ATTRIBUTE ((__alias__("asnprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/asprintf.c b/newlib/libc/stdio/asprintf.c
index bf214f9af..d04411251 100644
--- a/newlib/libc/stdio/asprintf.c
+++ b/newlib/libc/stdio/asprintf.c
@@ -50,12 +50,6 @@ _DEFUN(_asprintf_r, (ptr, strp, fmt),
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_asiprintf_r, (struct _reent *, char **, const char *, ...)
- _ATTRIBUTE ((__alias__("_asprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -83,9 +77,4 @@ _DEFUN(asprintf, (strp, fmt),
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(asiprintf, (char **, const char *, ...)
- _ATTRIBUTE ((__alias__("asprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/clearerr.c b/newlib/libc/stdio/clearerr.c
index 9bf0837f5..ed4603ba2 100644
--- a/newlib/libc/stdio/clearerr.c
+++ b/newlib/libc/stdio/clearerr.c
@@ -17,31 +17,20 @@
/*
FUNCTION
-<<clearerr>>, <<clearerr_unlocked>>---clear file or stream error indicator
+<<clearerr>>---clear file or stream error indicator
INDEX
clearerr
-INDEX
- clearerr_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
void clearerr(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- void clearerr_unlocked(FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
void clearerr(<[fp]>)
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- void clearerr_unlocked(<[fp]>)
- FILE *<[fp]>;
-
DESCRIPTION
The <<stdio>> functions maintain an error indicator with each file
pointer <[fp]>, to record whether any read or write errors have
@@ -53,14 +42,6 @@ Use <<clearerr>> to reset both of these indicators.
See <<ferror>> and <<feof>> to query the two indicators.
-<<clearerr_unlocked>> is a non-thread-safe version of <<clearerr>>.
-<<clearerr_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<clearerr_unlocked>> is equivalent to <<clearerr>>.
RETURNS
<<clearerr>> does not return a result.
@@ -68,8 +49,6 @@ RETURNS
PORTABILITY
ANSI C requires <<clearerr>>.
-<<clearerr_unlocked>> is a BSD extension also provided by GNU libc.
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/clearerr_u.c b/newlib/libc/stdio/clearerr_u.c
deleted file mode 100644
index 00c5e8efa..000000000
--- a/newlib/libc/stdio/clearerr_u.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include "local.h"
-
-/* A subroutine version of the macro clearerr_unlocked. */
-
-#undef clearerr_unlocked
-
-_VOID
-_DEFUN(clearerr_unlocked, (fp),
- FILE * fp)
-{
- CHECK_INIT(_REENT, fp);
- __sclearerr (fp);
-}
diff --git a/newlib/libc/stdio/dprintf.c b/newlib/libc/stdio/dprintf.c
index 2925ceb31..2271f4b5c 100644
--- a/newlib/libc/stdio/dprintf.c
+++ b/newlib/libc/stdio/dprintf.c
@@ -67,12 +67,6 @@ _DEFUN(_dprintf_r, (ptr, fd, format),
return n;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_diprintf_r, (struct _reent *, int, const char *, ...)
- _ATTRIBUTE ((__alias__("_dprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -91,9 +85,4 @@ _DEFUN(dprintf, (fd, format),
return n;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(diprintf, (int, const char *, ...)
- _ATTRIBUTE ((__alias__("dprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/fclose.c b/newlib/libc/stdio/fclose.c
index cd271c490..fd054feaa 100644
--- a/newlib/libc/stdio/fclose.c
+++ b/newlib/libc/stdio/fclose.c
@@ -92,15 +92,10 @@ _DEFUN(_fclose_r, (rptr, fp),
#endif
return (0);
}
-#ifdef _STDIO_BSD_SEMANTICS
- /* BSD and Glibc systems only flush streams which have been written to. */
- r = (fp->_flags & __SWR) ? __sflush_r (rptr, fp) : 0;
-#else
- /* Follow POSIX semantics exactly. Unconditionally flush to allow
- special handling for seekable read files to reposition file to last
- byte processed as opposed to last byte read ahead into the buffer. */
- r = __sflush_r (rptr, fp);
-#endif
+ /* Unconditionally flush to allow special handling for seekable read
+ files to reposition file to last byte processed as opposed to
+ last byte read ahead into the buffer. */
+ r = _fflush_r (rptr, fp);
if (fp->_close != NULL && fp->_close (rptr, fp->_cookie) < 0)
r = EOF;
if (fp->_flags & __SMBF)
diff --git a/newlib/libc/stdio/feof.c b/newlib/libc/stdio/feof.c
index 7aadd8209..c0216ffed 100644
--- a/newlib/libc/stdio/feof.c
+++ b/newlib/libc/stdio/feof.c
@@ -17,44 +17,24 @@
/*
FUNCTION
-<<feof>>, <<feof_unlocked>>---test for end of file
+<<feof>>---test for end of file
INDEX
feof
-INDEX
- feof_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int feof(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int feof_unlocked(FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int feof(<[fp]>)
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int feof_unlocked(<[fp]>)
- FILE *<[fp]>;
-
DESCRIPTION
<<feof>> tests whether or not the end of the file identified by <[fp]>
has been reached.
-<<feof_unlocked>> is a non-thread-safe version of <<feof>>.
-<<feof_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<feof_unlocked>> is equivalent to <<feof>>.
-
RETURNS
<<feof>> returns <<0>> if the end of file has not yet been reached; if
at end of file, the result is nonzero.
@@ -62,8 +42,6 @@ at end of file, the result is nonzero.
PORTABILITY
<<feof>> is required by ANSI C.
-<<feof_unlocked>> is a BSD extension also provided by GNU libc.
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/feof_u.c b/newlib/libc/stdio/feof_u.c
deleted file mode 100644
index 48fc4af47..000000000
--- a/newlib/libc/stdio/feof_u.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <stdio.h>
-#include "local.h"
-
-/* A subroutine version of the macro feof_unlocked. */
-
-#undef feof_unlocked
-
-int
-_DEFUN(feof_unlocked, (fp),
- FILE * fp)
-{
- CHECK_INIT(_REENT, fp);
- return __sfeof (fp);
-}
diff --git a/newlib/libc/stdio/ferror.c b/newlib/libc/stdio/ferror.c
index f93063d71..0cd3c3089 100644
--- a/newlib/libc/stdio/ferror.c
+++ b/newlib/libc/stdio/ferror.c
@@ -17,31 +17,20 @@
/*
FUNCTION
-<<ferror>>, <<ferror_unlocked>>---test whether read/write error has occurred
+<<ferror>>---test whether read/write error has occurred
INDEX
ferror
-INDEX
- ferror_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int ferror(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int ferror_unlocked(FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int ferror(<[fp]>)
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int ferror_unlocked(<[fp]>)
- FILE *<[fp]>;
-
DESCRIPTION
The <<stdio>> functions maintain an error indicator with each file
pointer <[fp]>, to record whether any read or write errors have
@@ -50,15 +39,6 @@ Use <<ferror>> to query this indicator.
See <<clearerr>> to reset the error indicator.
-<<ferror_unlocked>> is a non-thread-safe version of <<ferror>>.
-<<ferror_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<ferror_unlocked>> is equivalent to <<ferror>>.
-
RETURNS
<<ferror>> returns <<0>> if no errors have occurred; it returns a
nonzero value otherwise.
@@ -66,8 +46,6 @@ nonzero value otherwise.
PORTABILITY
ANSI C requires <<ferror>>.
-<<ferror_unlocked>> is a BSD extension also provided by GNU libc.
-
No supporting OS subroutines are required.
*/
diff --git a/newlib/libc/stdio/ferror_u.c b/newlib/libc/stdio/ferror_u.c
deleted file mode 100644
index 9b9edba24..000000000
--- a/newlib/libc/stdio/ferror_u.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include "local.h"
-
-/* A subroutine version of the macro ferror_unlocked. */
-
-#undef ferror_unlocked
-
-int
-_DEFUN(ferror_unlocked, (fp),
- FILE * fp)
-{
- CHECK_INIT(_REENT, fp);
- return __sferror (fp);
-}
diff --git a/newlib/libc/stdio/fflush.c b/newlib/libc/stdio/fflush.c
index a4e639e72..ea48b0126 100644
--- a/newlib/libc/stdio/fflush.c
+++ b/newlib/libc/stdio/fflush.c
@@ -17,32 +17,19 @@
/*
FUNCTION
-<<fflush>>, <<fflush_unlocked>>---flush buffered file output
+<<fflush>>---flush buffered file output
INDEX
fflush
INDEX
- fflush_unlocked
-INDEX
_fflush_r
-INDEX
- _fflush_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fflush(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int fflush_unlocked(FILE *<[fp]>);
-
- #include <stdio.h>
int _fflush_r(struct _reent *<[reent]>, FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int _fflush_unlocked_r(struct _reent *<[reent]>, FILE *<[fp]>);
-
DESCRIPTION
The <<stdio>> output functions can buffer output before delivering it
to the host system, in order to minimize the overhead of system calls.
@@ -58,18 +45,9 @@ descriptor, set the position of the file descriptor to match next
unread byte, useful for obeying POSIX semantics when ending a process
without consuming all input from the stream.
-<<fflush_unlocked>> is a non-thread-safe version of <<fflush>>.
-<<fflush_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fflush_unlocked>> is equivalent to <<fflush>>.
-
-The alternate functions <<_fflush_r>> and <<_fflush_unlocked_r>> are
-reentrant versions, where the extra argument <[reent]> is a pointer to
-a reentrancy structure, and <[fp]> must not be NULL.
+The alternate function <<_fflush_r>> is a reentrant version, where the
+extra argument <[reent]> is a pointer to a reentrancy structure, and
+<[fp]> must not be NULL.
RETURNS
<<fflush>> returns <<0>> unless it encounters a write error; in that
@@ -79,8 +57,6 @@ PORTABILITY
ANSI C requires <<fflush>>. The behavior on input streams is only
specified by POSIX, and not all implementations follow POSIX rules.
-<<fflush_unlocked>> is a BSD extension also provided by GNU libc.
-
No supporting OS subroutines are required.
*/
@@ -89,12 +65,6 @@ No supporting OS subroutines are required.
#include <errno.h>
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fflush_r _fflush_unlocked_r
-#define fflush fflush_unlocked
-#endif
-
-#ifndef __IMPL_UNLOCKED__
/* Flush a single file, or (if fp is NULL) all files. */
/* Core function which does not lock file pointer. This gets called
@@ -234,21 +204,6 @@ _DEFUN(__sflush_r, (ptr, fp),
return 0;
}
-#ifdef _STDIO_BSD_SEMANTICS
-/* Called from _cleanup_r. At exit time, we don't need file locking,
- and we don't want to move the underlying file pointer unless we're
- writing. */
-int
-_DEFUN(__sflushw_r, (ptr, fp),
- struct _reent *ptr _AND
- register FILE *fp)
-{
- return (fp->_flags & __SWR) ? __sflush_r (ptr, fp) : 0;
-}
-#endif
-
-#endif /* __IMPL_UNLOCKED__ */
-
int
_DEFUN(_fflush_r, (ptr, fp),
struct _reent *ptr _AND
diff --git a/newlib/libc/stdio/fflush_u.c b/newlib/libc/stdio/fflush_u.c
deleted file mode 100644
index adcc46063..000000000
--- a/newlib/libc/stdio/fflush_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fflush.c"
diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c
index 34447a2c8..20492d24b 100644
--- a/newlib/libc/stdio/fgetc.c
+++ b/newlib/libc/stdio/fgetc.c
@@ -17,53 +17,30 @@
/*
FUNCTION
-<<fgetc>>, <<fgetc_unlocked>>---get a character from a file or stream
+<<fgetc>>---get a character from a file or stream
INDEX
fgetc
INDEX
- fgetc_unlocked
-INDEX
_fgetc_r
-INDEX
- _fgetc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fgetc(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int fgetc_unlocked(FILE *<[fp]>);
-
#include <stdio.h>
int _fgetc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int _fgetc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int fgetc(<[fp]>)
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int fgetc_unlocked(<[fp]>)
- FILE *<[fp]>;
-
#include <stdio.h>
int _fgetc_r(<[ptr]>, <[fp]>)
struct _reent *<[ptr]>;
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int _fgetc_unlocked_r(<[ptr]>, <[fp]>)
- struct _reent *<[ptr]>;
- FILE *<[fp]>;
-
DESCRIPTION
Use <<fgetc>> to get the next single character from the file or stream
identified by <[fp]>. As a side effect, <<fgetc>> advances the file's
@@ -71,18 +48,9 @@ current position indicator.
For a macro version of this function, see <<getc>>.
-<<fgetc_unlocked>> is a non-thread-safe version of <<fgetc>>.
-<<fgetc_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fgetc_unlocked>> is equivalent to <<fgetc>>.
-
-The functions <<_fgetc_r>> and <<_fgetc_unlocked_r>> are simply reentrant
-versions that are passed the additional reentrant structure pointer
-argument: <[ptr]>.
+The function <<_fgetc_r>> is simply a reentrant version of
+<<fgetc>> that is passed the additional reentrant structure
+pointer argument: <[ptr]>.
RETURNS
The next character (read as an <<unsigned char>>, and cast to
@@ -95,8 +63,6 @@ using the <<ferror>> and <<feof>> functions.
PORTABILITY
ANSI C requires <<fgetc>>.
-<<fgetc_unlocked>> is a BSD extension also provided by GNU libc.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
diff --git a/newlib/libc/stdio/fgetc_u.c b/newlib/libc/stdio/fgetc_u.c
deleted file mode 100644
index 5bbd5a549..000000000
--- a/newlib/libc/stdio/fgetc_u.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include "local.h"
-
-int
-_DEFUN(_fgetc_unlocked_r, (ptr, fp),
- struct _reent * ptr _AND
- FILE * fp)
-{
- CHECK_INIT(ptr, fp);
- return __sgetc_r (ptr, fp);
-}
-
-#ifndef _REENT_ONLY
-
-int
-_DEFUN(fgetc_unlocked, (fp),
- FILE * fp)
-{
-#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
- struct _reent *reent = _REENT;
-
- CHECK_INIT(reent, fp);
- return __sgetc_r (reent, fp);
-#else
- return _fgetc_unlocked_r (_REENT, fp);
-#endif
-}
-
-#endif /* !_REENT_ONLY */
diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c
index f7c8a0300..0280ea0c5 100644
--- a/newlib/libc/stdio/fgets.c
+++ b/newlib/libc/stdio/fgets.c
@@ -17,31 +17,20 @@
/*
FUNCTION
-<<fgets>>, <<fgets_unlocked>>---get character string from a file or stream
+<<fgets>>---get character string from a file or stream
INDEX
fgets
INDEX
- fgets_unlocked
-INDEX
_fgets_r
-INDEX
- _fgets_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
char *fgets(char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- char *fgets_unlocked(char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
-
#include <stdio.h>
char *_fgets_r(struct _reent *<[ptr]>, char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
- #include <stdio.h>
- char *_fgets_unlocked_r(struct _reent *<[ptr]>, char *restrict <[buf]>, int <[n]>, FILE *restrict <[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
char *fgets(<[buf]>,<[n]>,<[fp]>)
@@ -49,13 +38,6 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- char *fgets_unlocked(<[buf]>,<[n]>,<[fp]>)
- char *<[buf]>;
- int <[n]>;
- FILE *<[fp]>;
-
#include <stdio.h>
char *_fgets_r(<[ptr]>, <[buf]>,<[n]>,<[fp]>)
struct _reent *<[ptr]>;
@@ -63,30 +45,14 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *<[fp]>;
- #include <stdio.h>
- char *_fgets_unlocked_r(<[ptr]>, <[buf]>,<[n]>,<[fp]>)
- struct _reent *<[ptr]>;
- char *<[buf]>;
- int <[n]>;
- FILE *<[fp]>;
-
DESCRIPTION
Reads at most <[n-1]> characters from <[fp]> until a newline
is found. The characters including to the newline are stored
in <[buf]>. The buffer is terminated with a 0.
- <<fgets_unlocked>> is a non-thread-safe version of <<fgets>>.
- <<fgets_unlocked>> may only safely be used within a scope
- protected by flockfile() (or ftrylockfile()) and funlockfile(). This
- function may safely be used in a multi-threaded program if and only
- if they are called while the invoking thread owns the (FILE *)
- object, as is the case after a successful call to the flockfile() or
- ftrylockfile() functions. If threads are disabled, then
- <<fgets_unlocked>> is equivalent to <<fgets>>.
-
- The functions <<_fgets_r>> and <<_fgets_unlocked_r>> are simply
- reentrant versions that are passed the additional reentrant structure
- pointer argument: <[ptr]>.
+ The <<_fgets_r>> function is simply the reentrant version of
+ <<fgets>> and is passed an additional reentrancy structure
+ pointer: <[ptr]>.
RETURNS
<<fgets>> returns the buffer passed to it, with the data
@@ -99,8 +65,6 @@ PORTABILITY
that <<fgets>> returns all of the data, while <<gets>> removes
the trailing newline (with no indication that it has done so.)
- <<fgets_unlocked>> is a GNU extension.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -110,11 +74,6 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <string.h>
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fgets_r _fgets_unlocked_r
-#define fgets fgets_unlocked
-#endif
-
/*
* Read at most n-1 characters from the given file.
* Stop when a newline has been read, or the count runs out.
diff --git a/newlib/libc/stdio/fgets_u.c b/newlib/libc/stdio/fgets_u.c
deleted file mode 100644
index b36748da1..000000000
--- a/newlib/libc/stdio/fgets_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fgets.c"
diff --git a/newlib/libc/stdio/fgetwc.c b/newlib/libc/stdio/fgetwc.c
index e89404be8..14c554786 100644
--- a/newlib/libc/stdio/fgetwc.c
+++ b/newlib/libc/stdio/fgetwc.c
@@ -26,72 +26,40 @@
/*
FUNCTION
-<<fgetwc>>, <<getwc>>, <<fgetwc_unlocked>>, <<getwc_unlocked>>---get a wide character from a file or stream
+<<fgetwc>>, <<getwc>>---get a wide character from a file or stream
INDEX
fgetwc
INDEX
- fgetwc_unlocked
-INDEX
_fgetwc_r
INDEX
- _fgetwc_unlocked_r
-INDEX
getwc
INDEX
- getwc_unlocked
-INDEX
_getwc_r
-INDEX
- _getwc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fgetwc(FILE *<[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t fgetwc_unlocked(FILE *<[fp]>);
-
#include <stdio.h>
#include <wchar.h>
wint_t _fgetwc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
#include <stdio.h>
#include <wchar.h>
- wint_t _fgetwc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
-
- #include <stdio.h>
- #include <wchar.h>
wint_t getwc(FILE *<[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t getwc_unlocked(FILE *<[fp]>);
-
#include <stdio.h>
#include <wchar.h>
wint_t _getwc_r(struct _reent *<[ptr]>, FILE *<[fp]>);
- #include <stdio.h>
- #include <wchar.h>
- wint_t _getwc_unlocked_r(struct _reent *<[ptr]>, FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fgetwc(<[fp]>)
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t fgetwc_unlocked(<[fp]>)
- FILE *<[fp]>;
-
#include <stdio.h>
#include <wchar.h>
wint_t _fgetwc_r(<[ptr]>, <[fp]>)
@@ -100,54 +68,27 @@ TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
- wint_t _fgetwc_unlocked_r(<[ptr]>, <[fp]>)
- struct _reent *<[ptr]>;
- FILE *<[fp]>;
-
- #include <stdio.h>
- #include <wchar.h>
wint_t getwc(<[fp]>)
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t getwc_unlocked(<[fp]>)
- FILE *<[fp]>;
-
#include <stdio.h>
#include <wchar.h>
wint_t _getwc_r(<[ptr]>, <[fp]>)
struct _reent *<[ptr]>;
FILE *<[fp]>;
- #include <stdio.h>
- #include <wchar.h>
- wint_t _getwc_unlocked_r(<[ptr]>, <[fp]>)
- struct _reent *<[ptr]>;
- FILE *<[fp]>;
-
DESCRIPTION
Use <<fgetwc>> to get the next wide character from the file or stream
identified by <[fp]>. As a side effect, <<fgetwc>> advances the file's
current position indicator.
-<<fgetwc_unlocked>> is a non-thread-safe version of <<fgetwc>>.
-<<fgetwc_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fgetwc_unlocked>> is equivalent to <<fgetwc>>.
-
-The <<getwc>> and <<getwc_unlocked>> functions or macros functions identically
-to <<fgetwc>> and <<fgetwc_unlocked>>. It may be implemented as a macro, and
-may evaluate its argument more than once. There is no reason ever to use it.
+The <<getwc>> function or macro functions identically to <<fgetwc>>. It
+may be implemented as a macro, and may evaluate its argument more than
+once. There is no reason ever to use it.
-<<_fgetwc_r>>, <<_getwc_r>>, <<_fgetwc_unlocked_r>>, and <<_getwc_unlocked_r>>
-are simply reentrant versions of the above functions that are passed the
-additional reentrant structure pointer argument: <[ptr]>.
+<<_fgetwc_r>> and <<_getwc_r>> are simply reentrant versions of
+<<fgetwc>> and <<getwc>> that are passed the additional reentrant
+structure pointer argument: <[ptr]>.
RETURNS
The next wide character cast to <<wint_t>>), unless there is no more data,
@@ -158,9 +99,7 @@ You can distinguish the two situations that cause an <<EOF>> result by
using the <<ferror>> and <<feof>> functions.
PORTABILITY
-<<fgetwc>> and <<getwc>> are required by C99 and POSIX.1-2001.
-
-<<fgetwc_unlocked>> and <<getwc_unlocked>> are GNU extensions.
+C99, POSIX.1-2001
*/
#include <_ansi.h>
@@ -171,7 +110,7 @@ PORTABILITY
#include <wchar.h>
#include "local.h"
-wint_t
+static wint_t
_DEFUN(__fgetwc, (ptr, fp),
struct _reent *ptr _AND
register FILE *fp)
diff --git a/newlib/libc/stdio/fgetwc_u.c b/newlib/libc/stdio/fgetwc_u.c
deleted file mode 100644
index 4ccd5765c..000000000
--- a/newlib/libc/stdio/fgetwc_u.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-wint_t
-_DEFUN(_fgetwc_unlocked_r, (ptr, fp),
- struct _reent *ptr _AND
- register FILE *fp)
-{
- ORIENT(fp, 1);
- return __fgetwc (ptr, fp);
-}
-
-wint_t
-_DEFUN(fgetwc_unlocked, (fp),
- FILE *fp)
-{
- struct _reent *reent = _REENT;
-
- CHECK_INIT(reent, fp);
- return _fgetwc_unlocked_r (reent, fp);
-}
diff --git a/newlib/libc/stdio/fgetws.c b/newlib/libc/stdio/fgetws.c
index ae1f48e66..dfd7fe9cc 100644
--- a/newlib/libc/stdio/fgetws.c
+++ b/newlib/libc/stdio/fgetws.c
@@ -26,35 +26,22 @@
/*
FUNCTION
-<<fgetws>>, <<fgetws_unlocked>>---get wide character string from a file or stream
+<<fgetws>>---get wide character string from a file or stream
INDEX
fgetws
INDEX
- fgetws_unlocked
-INDEX
_fgetws_r
-INDEX
- _fgetws_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
wchar_t *fgetws(wchar_t *__restrict <[ws]>, int <[n]>,
FILE *__restrict <[fp]>);
- #define _GNU_SOURCE
- #include <wchar.h>
- wchar_t *fgetws_unlocked(wchar_t *__restrict <[ws]>, int <[n]>,
- FILE *__restrict <[fp]>);
-
#include <wchar.h>
wchar_t *_fgetws_r(struct _reent *<[ptr]>, wchar_t *<[ws]>,
int <[n]>, FILE *<[fp]>);
- #include <wchar.h>
- wchar_t *_fgetws_unlocked_r(struct _reent *<[ptr]>, wchar_t *<[ws]>,
- int <[n]>, FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <wchar.h>
wchar_t *fgetws(<[ws]>,<[n]>,<[fp]>)
@@ -62,13 +49,6 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *__restrict <[fp]>;
- #define _GNU_SOURCE
- #include <wchar.h>
- wchar_t *fgetws_unlocked(<[ws]>,<[n]>,<[fp]>)
- wchar_t *__restrict <[ws]>;
- int <[n]>;
- FILE *__restrict <[fp]>;
-
#include <wchar.h>
wchar_t *_fgetws_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>)
struct _reent *<[ptr]>;
@@ -76,29 +56,13 @@ TRAD_SYNOPSIS
int <[n]>;
FILE *<[fp]>;
- #include <wchar.h>
- wchar_t *_fgetws_unlocked_r(<[ptr]>, <[ws]>,<[n]>,<[fp]>)
- struct _reent *<[ptr]>;
- wchar_t *<[ws]>;
- int <[n]>;
- FILE *<[fp]>;
-
DESCRIPTION
Reads at most <[n-1]> wide characters from <[fp]> until a newline
is found. The wide characters including to the newline are stored
in <[ws]>. The buffer is terminated with a 0.
-<<fgetws_unlocked>> is a non-thread-safe version of <<fgetws>>.
-<<fgetws_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fgetws_unlocked>> is equivalent to <<fgetws>>.
-
-The <<_fgetws_r>> and <<_fgetws_unlocked_r>> functions are simply reentrant
-version of the above and are passed an additional reentrancy structure
+The <<_fgetws_r>> function is simply the reentrant version of
+<<fgetws>> and is passed an additional reentrancy structure
pointer: <[ptr]>.
RETURNS
@@ -108,9 +72,7 @@ accumulated, the data is returned with no other indication. If
no data are read, NULL is returned instead.
PORTABILITY
-<<fgetws>> is required by C99 and POSIX.1-2001.
-
-<<fgetws_unlocked>> is a GNU extension.
+C99, POSIX.1-2001
*/
#include <_ansi.h>
@@ -121,11 +83,6 @@ PORTABILITY
#include <wchar.h>
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fgetws_r _fgetws_unlocked_r
-#define fgetws fgetws_unlocked
-#endif
-
wchar_t *
_DEFUN(_fgetws_r, (ptr, ws, n, fp),
struct _reent *ptr _AND
diff --git a/newlib/libc/stdio/fgetws_u.c b/newlib/libc/stdio/fgetws_u.c
deleted file mode 100644
index ae4d7d9c2..000000000
--- a/newlib/libc/stdio/fgetws_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fgetws.c"
diff --git a/newlib/libc/stdio/fileno.c b/newlib/libc/stdio/fileno.c
index 7b505827d..be8f3d66a 100644
--- a/newlib/libc/stdio/fileno.c
+++ b/newlib/libc/stdio/fileno.c
@@ -17,43 +17,23 @@
/*
FUNCTION
-<<fileno>>, <<fileno_unlocked>>---return file descriptor associated with stream
+<<fileno>>---return file descriptor associated with stream
INDEX
fileno
-INDEX
- fileno_unlocked
ANSI_SYNOPSIS
#include <stdio.h>
int fileno(FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int fileno_unlocked(FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int fileno(<[fp]>)
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int fileno_unlocked(<[fp]>)
- FILE *<[fp]>;
-
DESCRIPTION
You can use <<fileno>> to return the file descriptor identified by <[fp]>.
-<<fileno_unlocked>> is a non-thread-safe version of <<fileno>>.
-<<fileno_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fileno_unlocked>> is equivalent to <<fileno>>.
-
RETURNS
<<fileno>> returns a non-negative integer when successful.
If <[fp]> is not an open stream, <<fileno>> returns -1.
@@ -62,8 +42,6 @@ PORTABILITY
<<fileno>> is not part of ANSI C.
POSIX requires <<fileno>>.
-<<fileno_unlocked>> is a BSD extension also provided by GNU libc.
-
Supporting OS subroutines required: none.
*/
diff --git a/newlib/libc/stdio/fileno_u.c b/newlib/libc/stdio/fileno_u.c
deleted file mode 100644
index 468d1127e..000000000
--- a/newlib/libc/stdio/fileno_u.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include <errno.h>
-#include "local.h"
-
-int
-_DEFUN(fileno_unlocked, (f),
- FILE * f)
-{
- int result;
- CHECK_INIT (_REENT, f);
- if (f->_flags)
- result = __sfileno (f);
- else
- {
- result = -1;
- _REENT->_errno = EBADF;
- }
- return result;
-}
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 27408f548..e40500a07 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -35,11 +35,7 @@ const struct __sFILE_fake __sf_fake_stderr =
{_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
#endif
-#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
-_NOINLINE_STATIC _VOID
-#else
static _VOID
-#endif
_DEFUN(std, (ptr, flags, file, data),
FILE *ptr _AND
int flags _AND
@@ -174,22 +170,8 @@ _VOID
_DEFUN(_cleanup_r, (ptr),
struct _reent *ptr)
{
- int (*cleanup_func) (struct _reent *, FILE *);
-#ifdef _STDIO_BSD_SEMANTICS
- /* BSD and Glibc systems only flush streams which have been written to
- at exit time. Calling flush rather than close for speed, as on
- the aforementioned systems. */
- cleanup_func = __sflushw_r;
-#else
- /* Otherwise close files and flush read streams, too.
- Note we call flush directly if "--enable-lite-exit" is in effect. */
-#ifdef _LITE_EXIT
- cleanup_func = _fflush_r;
-#else
- cleanup_func = _fclose_r;
-#endif
-#endif
- _CAST_VOID _fwalk_reent (ptr, cleanup_func);
+ _CAST_VOID _fwalk(ptr, fclose);
+ /* _CAST_VOID _fwalk (ptr, fflush); */ /* `cheating' */
}
#ifndef _REENT_ONLY
diff --git a/newlib/libc/stdio/fprintf.c b/newlib/libc/stdio/fprintf.c
index fe92a5b99..5ea2fd006 100644
--- a/newlib/libc/stdio/fprintf.c
+++ b/newlib/libc/stdio/fprintf.c
@@ -36,12 +36,6 @@ _DEFUN(_fprintf_r, (ptr, fp, fmt),
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...)
- _ATTRIBUTE ((__alias__("_fprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -58,9 +52,4 @@ _DEFUN(fprintf, (fp, fmt),
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(fiprintf, (FILE *, const char *, ...)
- _ATTRIBUTE ((__alias__("fprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/fputc.c b/newlib/libc/stdio/fputc.c
index 0aad0a9f7..f380717d1 100644
--- a/newlib/libc/stdio/fputc.c
+++ b/newlib/libc/stdio/fputc.c
@@ -17,55 +17,32 @@
/*
FUNCTION
-<<fputc>>, <<fputc_unlocked>>---write a character on a stream or file
+<<fputc>>---write a character on a stream or file
INDEX
fputc
INDEX
- fputc_unlocked
-INDEX
_fputc_r
-INDEX
- _fputc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fputc(int <[ch]>, FILE *<[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- int fputc_unlocked(int <[ch]>, FILE *<[fp]>);
-
#include <stdio.h>
int _fputc_r(struct _rent *<[ptr]>, int <[ch]>, FILE *<[fp]>);
- #include <stdio.h>
- int _fputc_unlocked_r(struct _rent *<[ptr]>, int <[ch]>, FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int fputc(<[ch]>, <[fp]>)
int <[ch]>;
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- int fputc_unlocked(<[ch]>, <[fp]>)
- int <[ch]>;
- FILE *<[fp]>;
-
#include <stdio.h>
int _fputc_r(<[ptr]>, <[ch]>, <[fp]>)
struct _reent *<[ptr]>;
int <[ch]>;
FILE *<[fp]>;
- #include <stdio.h>
- int _fputc_unlocked_r(<[ptr]>, <[ch]>, <[fp]>)
- struct _reent *<[ptr]>;
- int <[ch]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fputc>> converts the argument <[ch]> from an <<int>> to an
<<unsigned char>>, then writes it to the file or stream identified by
@@ -79,18 +56,8 @@ oadvances by one.
For a macro version of this function, see <<putc>>.
-<<fputc_unlocked>> is a non-thread-safe version of <<fputc>>.
-<<fputc_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fputc_unlocked>> is equivalent to <<fputc>>.
-
-The <<_fputc_r>> and <<_fputc_unlocked_r>> functions are simply reentrant
-versions of the above that take an additional reentrant structure
-argument: <[ptr]>.
+The <<_fputc_r>> function is simply a reentrant version of <<fputc>>
+that takes an additional reentrant structure argument: <[ptr]>.
RETURNS
If successful, <<fputc>> returns its argument <[ch]>. If an error
@@ -100,8 +67,6 @@ query for errors.
PORTABILITY
<<fputc>> is required by ANSI C.
-<<fputc_unlocked>> is a BSD extension also provided by GNU libc.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
diff --git a/newlib/libc/stdio/fputc_u.c b/newlib/libc/stdio/fputc_u.c
deleted file mode 100644
index ac64b0bc2..000000000
--- a/newlib/libc/stdio/fputc_u.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include "local.h"
-
-int
-_DEFUN(_fputc_unlocked_r, (ptr, ch, file),
- struct _reent *ptr _AND
- int ch _AND
- FILE * file)
-{
- CHECK_INIT(ptr, file);
- return _putc_unlocked_r (ptr, ch, file);
-}
-
-#ifndef _REENT_ONLY
-int
-_DEFUN(fputc_unlocked, (ch, file),
- int ch _AND
- FILE * file)
-{
-#if !defined(__OPTIMIZE_SIZE__) && !defined(PREFER_SIZE_OVER_SPEED)
- struct _reent *reent = _REENT;
-
- CHECK_INIT(reent, file);
- return _putc_unlocked_r (reent, ch, file);
-#else
- return _fputc_unlocked_r (_REENT, ch, file);
-#endif
-}
-#endif /* !_REENT_ONLY */
diff --git a/newlib/libc/stdio/fputs.c b/newlib/libc/stdio/fputs.c
index 75f65d96e..7c1888f93 100644
--- a/newlib/libc/stdio/fputs.c
+++ b/newlib/libc/stdio/fputs.c
@@ -17,70 +17,38 @@
/*
FUNCTION
-<<fputs>>, <<fputs_unlocked>>---write a character string in a file or stream
+<<fputs>>---write a character string in a file or stream
INDEX
fputs
INDEX
- fputs_unlocked
-INDEX
_fputs_r
-INDEX
- _fputs_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
int fputs(const char *restrict <[s]>, FILE *restrict <[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- int fputs_unlocked(const char *restrict <[s]>, FILE *restrict <[fp]>);
-
#include <stdio.h>
int _fputs_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
- #include <stdio.h>
- int _fputs_unlocked_r(struct _reent *<[ptr]>, const char *restrict <[s]>, FILE *restrict <[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
int fputs(<[s]>, <[fp]>)
char *<[s]>;
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- int fputs_unlocked(<[s]>, <[fp]>)
- char *<[s]>;
- FILE *<[fp]>;
-
#include <stdio.h>
int _fputs_r(<[ptr]>, <[s]>, <[fp]>)
struct _reent *<[ptr]>;
char *<[s]>;
FILE *<[fp]>;
- #include <stdio.h>
- int _fputs_unlocked_r(<[ptr]>, <[s]>, <[fp]>)
- struct _reent *<[ptr]>;
- char *<[s]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fputs>> writes the string at <[s]> (but without the trailing null)
to the file or stream identified by <[fp]>.
-<<fputs_unlocked>> is a non-thread-safe version of <<fputs>>.
-<<fputs_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fputs_unlocked>> is equivalent to <<fputs>>.
-
-<<_fputs_r>> and <<_fputs_unlocked_r>> are simply reentrant versions of the
-above that take an additional reentrant struct pointer argument: <[ptr]>.
+<<_fputs_r>> is simply the reentrant version of <<fputs>> that takes
+an additional reentrant struct pointer argument: <[ptr]>.
RETURNS
If successful, the result is <<0>>; otherwise, the result is <<EOF>>.
@@ -89,8 +57,6 @@ PORTABILITY
ANSI C requires <<fputs>>, but does not specify that the result on
success must be <<0>>; any non-negative value is permitted.
-<<fputs_unlocked>> is a GNU extension.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -101,14 +67,10 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include "fvwrite.h"
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fputs_r _fputs_unlocked_r
-#define fputs fputs_unlocked
-#endif
-
/*
* Write the given string to the given file.
*/
+
int
_DEFUN(_fputs_r, (ptr, s, fp),
struct _reent * ptr _AND
diff --git a/newlib/libc/stdio/fputs_u.c b/newlib/libc/stdio/fputs_u.c
deleted file mode 100644
index 3b03cecdb..000000000
--- a/newlib/libc/stdio/fputs_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fputs.c"
diff --git a/newlib/libc/stdio/fputwc.c b/newlib/libc/stdio/fputwc.c
index 9c2ef6c3b..5ec85d1ab 100644
--- a/newlib/libc/stdio/fputwc.c
+++ b/newlib/libc/stdio/fputwc.c
@@ -26,60 +26,34 @@
/*
FUNCTION
-<<fputwc>>, <<putwc>>, <<fputwc_unlocked>>, <<putwc_unlocked>>---write a wide character on a stream or file
+<<fputwc>>, <<putwc>>---write a wide character on a stream or file
INDEX
fputwc
INDEX
- fputwc_unlocked
-INDEX
_fputwc_r
INDEX
- _fputwc_unlocked_r
-INDEX
putwc
INDEX
- putwc_unlocked
-INDEX
_putwc_r
-INDEX
- _putwc_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
wint_t fputwc(wchar_t <[wc]>, FILE *<[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t fputwc_unlocked(wchar_t <[wc]>, FILE *<[fp]>);
-
#include <stdio.h>
#include <wchar.h>
wint_t _fputwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
#include <stdio.h>
#include <wchar.h>
- wint_t _fputwc_unlocked_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
-
- #include <stdio.h>
- #include <wchar.h>
wint_t putwc(wchar_t <[wc]>, FILE *<[fp]>);
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t putwc_unlocked(wchar_t <[wc]>, FILE *<[fp]>);
-
#include <stdio.h>
#include <wchar.h>
wint_t _putwc_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
- #include <stdio.h>
- #include <wchar.h>
- wint_t _putwc_unlocked_r(struct _reent *<[ptr]>, wchar_t <[wc]>, FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
@@ -87,13 +61,6 @@ TRAD_SYNOPSIS
wchar_t <[wc]>;
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t fputwc_unlocked(<[wc]>, <[fp]>)
- wchar_t <[wc]>;
- FILE *<[fp]>;
-
#include <stdio.h>
#include <wchar.h>
wint_t _fputwc_r(<[ptr]>, <[wc]>, <[fp]>)
@@ -103,24 +70,10 @@ TRAD_SYNOPSIS
#include <stdio.h>
#include <wchar.h>
- wint_t _fputwc_unlocked_r(<[ptr]>, <[wc]>, <[fp]>)
- struct _reent *<[ptr]>;
- wchar_t <[wc]>;
- FILE *<[fp]>;
-
- #include <stdio.h>
- #include <wchar.h>
wint_t putwc(<[wc]>, <[fp]>)
wchar_t <[wc]>;
FILE *<[fp]>;
- #define _GNU_SOURCE
- #include <stdio.h>
- #include <wchar.h>
- wint_t putwc_unlocked(<[wc]>, <[fp]>)
- wchar_t <[wc]>;
- FILE *<[fp]>;
-
#include <stdio.h>
#include <wchar.h>
wint_t _putwc_r(<[ptr]>, <[wc]>, <[fp]>)
@@ -128,13 +81,6 @@ TRAD_SYNOPSIS
wchar_t <[wc]>;
FILE *<[fp]>;
- #include <stdio.h>
- #include <wchar.h>
- wint_t _putwc_unlocked_r(<[ptr]>, <[wc]>, <[fp]>)
- struct _reent *<[ptr]>;
- wchar_t <[wc]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fputwc>> writes the wide character argument <[wc]> to the file or
stream identified by <[fp]>.
@@ -145,22 +91,13 @@ file or stream. Otherwise, the new wide character is written at the
current value of the position indicator, and the position indicator
oadvances by one.
-<<fputwc_unlocked>> is a non-thread-safe version of <<fputwc>>.
-<<fputwc_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fputwc_unlocked>> is equivalent to <<fputwc>>.
-
-The <<putwc>> and <<putwc_unlocked>> functions or macros function identically
-to <<fputwc>> and <<fputwc_unlocked>>. They may be implemented as a macro, and
-may evaluate its argument more than once. There is no reason ever to use them.
+The <<putwc>> function or macro functions identically to <<fputwc>>. It
+may be implemented as a macro, and may evaluate its argument more than
+once. There is no reason ever to use it.
-The <<_fputwc_r>>, <<_putwc_r>>, <<_fputwc_unlocked_r>>, and
-<<_putwc_unlocked_r>> functions are simply reentrant versions of the above
-that take an additional reentrant structure argument: <[ptr]>.
+The <<_fputwc_r>> and <<_putwc_r>> functions are simply reentrant versions
+of <<fputwc>> and <<putwc>> that take an additional reentrant structure
+argument: <[ptr]>.
RETURNS
If successful, <<fputwc>> and <<putwc>> return their argument <[wc]>.
@@ -168,9 +105,7 @@ If an error intervenes, the result is <<EOF>>. You can use
`<<ferror(<[fp]>)>>' to query for errors.
PORTABILITY
-<<fputwc>> and <<putwc>> are required by C99 and POSIX.1-2001.
-
-<<fputwc_unlocked>> and <<putwc_unlocked>> are GNU extensions.
+C99, POSIX.1-2001
*/
#include <_ansi.h>
@@ -182,7 +117,7 @@ PORTABILITY
#include <wchar.h>
#include "local.h"
-wint_t
+static wint_t
_DEFUN(__fputwc, (ptr, wc, fp),
struct _reent *ptr _AND
wchar_t wc _AND
diff --git a/newlib/libc/stdio/fputwc_u.c b/newlib/libc/stdio/fputwc_u.c
deleted file mode 100644
index 43be648f7..000000000
--- a/newlib/libc/stdio/fputwc_u.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-wint_t
-_DEFUN(_fputwc_unlocked_r, (ptr, wc, fp),
- struct _reent *ptr _AND
- wchar_t wc _AND
- FILE *fp)
-{
- ORIENT(fp, 1);
- return __fputwc(ptr, wc, fp);
-}
-
-wint_t
-_DEFUN(fputwc_unlocked, (wc, fp),
- wchar_t wc _AND
- FILE *fp)
-{
- struct _reent *reent = _REENT;
-
- CHECK_INIT(reent, fp);
- return _fputwc_unlocked_r (reent, wc, fp);
-}
diff --git a/newlib/libc/stdio/fputws.c b/newlib/libc/stdio/fputws.c
index bb2fa6dbe..82945996f 100644
--- a/newlib/libc/stdio/fputws.c
+++ b/newlib/libc/stdio/fputws.c
@@ -26,81 +26,46 @@
/*
FUNCTION
-<<fputws>>, <<fputws_unlocked>>---write a wide character string in a file or stream
+<<fputws>>---write a wide character string in a file or stream
INDEX
fputws
INDEX
- fputws_unlocked
-INDEX
_fputws_r
-INDEX
- _fputws_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
int fputws(const wchar_t *__restrict <[ws]>, FILE *__restrict <[fp]>);
- #define _GNU_SOURCE
- #include <wchar.h>
- int fputws_unlocked(const wchar_t *__restrict <[ws]>, FILE *__restrict <[fp]>);
-
#include <wchar.h>
int _fputws_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>,
FILE *<[fp]>);
- #include <wchar.h>
- int _fputws_unlocked_r(struct _reent *<[ptr]>, const wchar_t *<[ws]>,
- FILE *<[fp]>);
-
TRAD_SYNOPSIS
#include <wchar.h>
int fputws(<[ws]>, <[fp]>)
wchar_t *__restrict <[ws]>;
FILE *__restrict <[fp]>;
- #define _GNU_SOURCE
- #include <wchar.h>
- int fputws_unlocked(<[ws]>, <[fp]>)
- wchar_t *__restrict <[ws]>;
- FILE *__restrict <[fp]>;
-
#include <wchar.h>
int _fputws_r(<[ptr]>, <[ws]>, <[fp]>)
struct _reent *<[ptr]>;
wchar_t *<[ws]>;
FILE *<[fp]>;
- #include <wchar.h>
- int _fputws_unlocked_r(<[ptr]>, <[ws]>, <[fp]>)
- struct _reent *<[ptr]>;
- wchar_t *<[ws]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fputws>> writes the wide character string at <[ws]> (but without the
trailing null) to the file or stream identified by <[fp]>.
-<<fputws_unlocked>> is a non-thread-safe version of <<fputws>>.
-<<fputws_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fputws_unlocked>> is equivalent to <<fputws>>.
-
-<<_fputws_r>> and <<_fputws_unlocked_r>> are simply reentrant versions of the
-above that take an additional reentrant struct pointer argument: <[ptr]>.
+<<_fputws_r>> is simply the reentrant version of <<fputws>> that takes
+an additional reentrant struct pointer argument: <[ptr]>.
RETURNS
If successful, the result is a non-negative integer; otherwise, the result
is <<-1>> to indicate an error.
PORTABILITY
-<<fputws>> is required by C99 and POSIX.1-2001.
-
-<<fputws_unlocked>> is a GNU extension.
+C99, POSIX.1-2001
*/
#include <_ansi.h>
@@ -112,11 +77,6 @@ PORTABILITY
#include "fvwrite.h"
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fputws_r _fputws_unlocked_r
-#define fputws fputws_unlocked
-#endif
-
int
_DEFUN(_fputws_r, (ptr, ws, fp),
struct _reent *ptr _AND
diff --git a/newlib/libc/stdio/fputws_u.c b/newlib/libc/stdio/fputws_u.c
deleted file mode 100644
index 0583e79fa..000000000
--- a/newlib/libc/stdio/fputws_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fputws.c"
diff --git a/newlib/libc/stdio/fread.c b/newlib/libc/stdio/fread.c
index d55ff66d8..cf9ab40b7 100644
--- a/newlib/libc/stdio/fread.c
+++ b/newlib/libc/stdio/fread.c
@@ -17,35 +17,22 @@
/*
FUNCTION
-<<fread>>. <<fread_unlocked>>---read array elements from a file
+<<fread>>---read array elements from a file
INDEX
fread
INDEX
- fread_unlocked
-INDEX
_fread_r
-INDEX
- _fread_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
size_t fread(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>,
FILE *restrict <[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- size_t fread_unlocked(void *restrict <[buf]>, size_t <[size]>, size_t <[count]>,
- FILE *restrict <[fp]>);
-
#include <stdio.h>
size_t _fread_r(struct _reent *<[ptr]>, void *restrict <[buf]>,
size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>);
- #include <stdio.h>
- size_t _fread_unlocked_r(struct _reent *<[ptr]>, void *restrict <[buf]>,
- size_t <[size]>, size_t <[count]>, FILE *restrict <[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
size_t fread(<[buf]>, <[size]>, <[count]>, <[fp]>)
@@ -54,14 +41,6 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- size_t fread_unlocked(<[buf]>, <[size]>, <[count]>, <[fp]>)
- char *<[buf]>;
- size_t <[size]>;
- size_t <[count]>;
- FILE *<[fp]>;
-
#include <stdio.h>
size_t _fread_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
struct _reent *<[ptr]>;
@@ -70,14 +49,6 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
- #include <stdio.h>
- size_t _fread_unlocked_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
- struct _reent *<[ptr]>;
- char *<[buf]>;
- size_t <[size]>;
- size_t <[count]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fread>> attempts to copy, from the file or stream identified by
<[fp]>, <[count]> elements (each of size <[size]>) into memory,
@@ -87,17 +58,8 @@ starting at <[buf]>. <<fread>> may copy fewer elements than
<<fread>> also advances the file position indicator (if any) for
<[fp]> by the number of @emph{characters} actually read.
-<<fread_unlocked>> is a non-thread-safe version of <<fread>>.
-<<fread_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fread_unlocked>> is equivalent to <<fread>>.
-
-<<_fread_r>> and <<_fread_unlocked_r>> are simply reentrant versions of the
-above that take an additional reentrant structure pointer argument: <[ptr]>.
+<<_fread_r>> is simply the reentrant version of <<fread>> that
+takes an additional reentrant structure pointer argument: <[ptr]>.
RETURNS
The result of <<fread>> is the number of elements it succeeded in
@@ -106,8 +68,6 @@ reading.
PORTABILITY
ANSI C requires <<fread>>.
-<<fread_unlocked>> is a BSD extension also provided by GNU libc.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -118,11 +78,6 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <malloc.h>
#include "local.h"
-#ifdef __IMPL_UNLOCKED__
-#define _fread_r _fread_unlocked_r
-#define fread fread_unlocked
-#endif
-
#ifdef __SCLE
static size_t
_DEFUN(crlf_r, (ptr, fp, buf, count, eof),
diff --git a/newlib/libc/stdio/fread_u.c b/newlib/libc/stdio/fread_u.c
deleted file mode 100644
index 48239a9aa..000000000
--- a/newlib/libc/stdio/fread_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fread.c"
diff --git a/newlib/libc/stdio/fscanf.c b/newlib/libc/stdio/fscanf.c
index 87b51dd88..04c9e32f1 100644
--- a/newlib/libc/stdio/fscanf.c
+++ b/newlib/libc/stdio/fscanf.c
@@ -50,12 +50,6 @@ fscanf(FILE *fp, fmt, va_alist)
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(fiscanf, (FILE *, const char *, ...)
- _ATTRIBUTE ((__alias__("fscanf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -82,8 +76,3 @@ _fscanf_r(ptr, FILE *fp, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...)
- _ATTRIBUTE ((__alias__("_fscanf_r"))));
-#endif
diff --git a/newlib/libc/stdio/fsetlocking.c b/newlib/libc/stdio/fsetlocking.c
deleted file mode 100644
index 3c489f54d..000000000
--- a/newlib/libc/stdio/fsetlocking.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-/*
-FUNCTION
-<<__fsetlocking>>---set or query locking mode on FILE stream
-
-INDEX
- __fsetlocking
-
-ANSI_SYNOPSIS
- #include <stdio.h>
- #include <stdio_ext.h>
- int __fsetlocking(FILE *<[fp]>, int <[type]>);
-
-DESCRIPTION
-This function sets how the stdio functions handle locking of FILE <[fp]>.
-The following values describe <[type]>:
-
-<<FSETLOCKING_INTERNAL>> is the default state, where stdio functions
-automatically lock and unlock the stream.
-
-<<FSETLOCKING_BYCALLER>> means that automatic locking in stdio functions
-is disabled. Applications which set this take all responsibility for file
-locking themselves.
-
-<<FSETLOCKING_QUERY>> returns the current locking mode without changing it.
-
-RETURNS
-<<__fsetlocking>> returns the current locking mode of <[fp]>.
-
-PORTABILITY
-This function originates from Solaris and is also provided by GNU libc.
-
-No supporting OS subroutines are required.
-*/
-
-#ifndef __rtems__
-
-#include <_ansi.h>
-#include <stdio.h>
-#include <stdio_ext.h>
-#include "local.h"
-
-int
-_DEFUN(__fsetlocking, (fp, type),
- FILE * fp _AND
- int type)
-{
- int result;
- CHECK_INIT(_REENT, fp);
- result = (fp->_flags2 & __SNLK) ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL;
- switch (type)
- {
- case FSETLOCKING_BYCALLER:
- fp->_flags2 |= __SNLK;
- break;
- case FSETLOCKING_INTERNAL:
- fp->_flags2 &= ~__SNLK;
- break;
- case FSETLOCKING_QUERY:
- default:
- break;
- }
- return result;
-}
-
-#endif /* __rtems__ */
diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c
index cceaa96c2..975e4b001 100644
--- a/newlib/libc/stdio/fwalk.c
+++ b/newlib/libc/stdio/fwalk.c
@@ -73,8 +73,11 @@ _DEFUN(_fwalk_reent, (ptr, reent_function),
*/
for (g = &ptr->__sglue; g != NULL; g = g->_next)
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
- if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
- ret |= (*reent_function) (ptr, fp);
+ if (fp->_flags != 0)
+ {
+ if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
+ ret |= (*reent_function) (ptr, fp);
+ }
return ret;
}
diff --git a/newlib/libc/stdio/fwrite.c b/newlib/libc/stdio/fwrite.c
index 6b3ff9015..f460ae38f 100644
--- a/newlib/libc/stdio/fwrite.c
+++ b/newlib/libc/stdio/fwrite.c
@@ -17,35 +17,22 @@
/*
FUNCTION
-<<fwrite>>, <<fwrite_unlocked>>---write array elements
+<<fwrite>>---write array elements
INDEX
fwrite
INDEX
- fwrite_unlocked
-INDEX
_fwrite_r
-INDEX
- _fwrite_unlocked_r
ANSI_SYNOPSIS
#include <stdio.h>
size_t fwrite(const void *restrict <[buf]>, size_t <[size]>,
size_t <[count]>, FILE *restrict <[fp]>);
- #define _BSD_SOURCE
- #include <stdio.h>
- size_t fwrite_unlocked(const void *restrict <[buf]>, size_t <[size]>,
- size_t <[count]>, FILE *restrict <[fp]>);
-
#include <stdio.h>
size_t _fwrite_r(struct _reent *<[ptr]>, const void *restrict <[buf]>, size_t <[size]>,
size_t <[count]>, FILE *restrict <[fp]>);
- #include <stdio.h>
- size_t _fwrite_unlocked_r(struct _reent *<[ptr]>, const void *restrict <[buf]>, size_t <[size]>,
- size_t <[count]>, FILE *restrict <[fp]>);
-
TRAD_SYNOPSIS
#include <stdio.h>
size_t fwrite(<[buf]>, <[size]>, <[count]>, <[fp]>)
@@ -54,14 +41,6 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
- #define _BSD_SOURCE
- #include <stdio.h>
- size_t fwrite_unlocked(<[buf]>, <[size]>, <[count]>, <[fp]>)
- char *<[buf]>;
- size_t <[size]>;
- size_t <[count]>;
- FILE *<[fp]>;
-
#include <stdio.h>
size_t _fwrite_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
struct _reent *<[ptr]>;
@@ -70,14 +49,6 @@ TRAD_SYNOPSIS
size_t <[count]>;
FILE *<[fp]>;
- #include <stdio.h>
- size_t _fwrite_unlocked_r(<[ptr]>, <[buf]>, <[size]>, <[count]>, <[fp]>)
- struct _reent *<[ptr]>;
- char *<[buf]>;
- size_t <[size]>;
- size_t <[count]>;
- FILE *<[fp]>;
-
DESCRIPTION
<<fwrite>> attempts to copy, starting from the memory location
<[buf]>, <[count]> elements (each of size <[size]>) into the file or
@@ -87,17 +58,8 @@ stream identified by <[fp]>. <<fwrite>> may copy fewer elements than
<<fwrite>> also advances the file position indicator (if any) for
<[fp]> by the number of @emph{characters} actually written.
-<<fwrite_unlocked>> is a non-thread-safe version of <<fwrite>>.
-<<fwrite_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<fwrite_unlocked>> is equivalent to <<fwrite>>.
-
-<<_fwrite_r>> and <<_fwrite_unlocked_r>> are simply reentrant versions of the
-above that take an additional reentrant structure argument: <[ptr]>.
+<<_fwrite_r>> is simply the reentrant version of <<fwrite>> that
+takes an additional reentrant structure argument: <[ptr]>.
RETURNS
If <<fwrite>> succeeds in writing all the elements you specify, the
@@ -108,8 +70,6 @@ the file.
PORTABILITY
ANSI C requires <<fwrite>>.
-<<fwrite_unlocked>> is a BSD extension also provided by GNU libc.
-
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
*/
@@ -129,11 +89,6 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include "fvwrite.h"
#endif
-#ifdef __IMPL_UNLOCKED__
-#define _fwrite_r _fwrite_unlocked_r
-#define fwrite fwrite_unlocked
-#endif
-
/*
* Write `count' objects (each size `size') from memory to the given file.
* Return the number of whole objects written.
diff --git a/newlib/libc/stdio/fwrite_u.c b/newlib/libc/stdio/fwrite_u.c
deleted file mode 100644
index 80154a0bf..000000000
--- a/newlib/libc/stdio/fwrite_u.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define __IMPL_UNLOCKED__
-#include "fwrite.c"
diff --git a/newlib/libc/stdio/getwc_u.c b/newlib/libc/stdio/getwc_u.c
deleted file mode 100644
index 613b69eca..000000000
--- a/newlib/libc/stdio/getwc_u.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define _GNU_SOURCE
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-#undef getwc_unlocked
-
-wint_t
-_DEFUN(_getwc_unlocked_r, (ptr, fp),
- struct _reent *ptr _AND
- FILE *fp)
-{
- return _fgetwc_unlocked_r (ptr, fp);
-}
-
-/*
- * Synonym for fgetwc_unlocked(). The only difference is that getwc(), if it is
- * a macro, may evaluate `fp' more than once.
- */
-wint_t
-_DEFUN(getwc_unlocked, (fp),
- FILE *fp)
-{
- return fgetwc_unlocked(fp);
-}
diff --git a/newlib/libc/stdio/getwchar.c b/newlib/libc/stdio/getwchar.c
index 7ab230a4c..f559c7677 100644
--- a/newlib/libc/stdio/getwchar.c
+++ b/newlib/libc/stdio/getwchar.c
@@ -26,65 +26,34 @@
/*
FUNCTION
-<<getwchar>>, <<getwchar_unlocked>>---read a wide character from standard input
+<<getwchar>>---read a wide character from standard input
INDEX
getwchar
INDEX
- getwchar_unlocked
-INDEX
_getwchar_r
-INDEX
- _getwchar_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
wint_t getwchar(void);
- #define _GNU_SOURCE
- #include <wchar.h>
- wint_t getwchar_unlocked(void);
-
- #include <wchar.h>
wint_t _getwchar_r(struct _reent *<[reent]>);
- #include <wchar.h>
- wint_t _getwchar_unlocked_r(struct _reent *<[reent]>);
-
TRAD_SYNOPSIS
#include <wchar.h>
wint_t getwchar();
- #define _GNU_SOURCE
- #include <wchar.h>
- wint_t getwchar_unlocked();
-
- #include <wchar.h>
wint_t _getwchar_r(<[reent]>)
char * <[reent]>;
- #include <wchar.h>
- wint_t _getwchar_unlocked_r(<[reent]>)
- char * <[reent]>;
-
DESCRIPTION
<<getwchar>> function or macro is the wide character equivalent of
the <<getchar>> function. You can use <<getwchar>> to get the next
wide character from the standard input stream. As a side effect,
<<getwchar>> advances the standard input's current position indicator.
-<<getwchar_unlocked>> is a non-thread-safe version of <<getwchar>>.
-<<getwchar_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<getwchar_unlocked>> is equivalent to <<getwchar>>.
-
-The alternate functions <<_getwchar_r>> and <<_getwchar_unlocked_r>> are
-reentrant versions of the above. The extra argument <[reent]> is a pointer to
-a reentrancy structure.
+The alternate function <<_getwchar_r>> is a reentrant version. The
+extra argument <[reent]> is a pointer to a reentrancy structure.
RETURNS
The next wide character cast to <<wint_t>>, unless there is no more
@@ -95,9 +64,7 @@ You can distinguish the two situations that cause an <<WEOF>> result by
using `<<ferror(stdin)>>' and `<<feof(stdin)>>'.
PORTABILITY
-<<getwchar>> is required by C99.
-
-<<getwchar_unlocked>> is a GNU extension.
+C99
*/
#include <_ansi.h>
diff --git a/newlib/libc/stdio/getwchar_u.c b/newlib/libc/stdio/getwchar_u.c
deleted file mode 100644
index f5c50cced..000000000
--- a/newlib/libc/stdio/getwchar_u.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define _GNU_SOURCE
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-#undef getwchar_unlocked
-
-wint_t
-_DEFUN (_getwchar_unlocked_r, (ptr),
- struct _reent *ptr)
-{
- return _fgetwc_unlocked_r (ptr, stdin);
-}
-
-/*
- * Synonym for fgetwc_unlocked(stdin).
- */
-wint_t
-_DEFUN_VOID (getwchar_unlocked)
-{
- _REENT_SMALL_CHECK_INIT (_REENT);
- return fgetwc_unlocked (stdin);
-}
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index cf8e6a921..0bd47a46a 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -38,7 +38,7 @@
case _STDIO_CLOSE_PER_REENT_STD_STREAMS is defined these file descriptors
will be closed via close() provided the owner of the reent structure
triggerd the on demand reent initilization, see CHECK_INIT(). */
-#if !defined(__rtems__) && !defined(__tirtos__)
+#ifndef __rtems__
#define _STDIO_CLOSE_PER_REENT_STD_STREAMS
#endif
@@ -60,16 +60,7 @@
#define _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
#endif
-#if defined(__SINGLE_THREAD__) || defined(__IMPL_UNLOCKED__)
-
-# define _newlib_flockfile_start(_fp)
-# define _newlib_flockfile_exit(_fp)
-# define _newlib_flockfile_end(_fp)
-# define _newlib_sfp_lock_start()
-# define _newlib_sfp_lock_exit()
-# define _newlib_sfp_lock_end()
-
-#elif defined(_STDIO_WITH_THREAD_CANCELLATION_SUPPORT)
+#ifdef _STDIO_WITH_THREAD_CANCELLATION_SUPPORT
#include <pthread.h>
/* Start a stream oriented critical section: */
@@ -77,19 +68,16 @@
{ \
int __oldfpcancel; \
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &__oldfpcancel); \
- if (!(_fp->_flags2 & __SNLK)) \
- _flockfile (_fp)
+ _flockfile (_fp)
/* Exit from a stream oriented critical section prematurely: */
# define _newlib_flockfile_exit(_fp) \
- if (!(_fp->_flags2 & __SNLK)) \
- _funlockfile (_fp); \
+ _funlockfile (_fp); \
pthread_setcancelstate (__oldfpcancel, &__oldfpcancel);
/* End a stream oriented critical section: */
# define _newlib_flockfile_end(_fp) \
- if (!(_fp->_flags2 & __SNLK)) \
- _funlockfile (_fp); \
+ _funlockfile (_fp); \
pthread_setcancelstate (__oldfpcancel, &__oldfpcancel); \
}
@@ -111,20 +99,17 @@
pthread_setcancelstate (__oldsfpcancel, &__oldsfpcancel); \
}
-#else /* !__SINGLE_THREAD__ && !__IMPL_UNLOCKED__ && !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
+#else /* !_STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
# define _newlib_flockfile_start(_fp) \
{ \
- if (!(_fp->_flags2 & __SNLK)) \
- _flockfile (_fp)
+ _flockfile(_fp)
# define _newlib_flockfile_exit(_fp) \
- if (!(_fp->_flags2 & __SNLK)) \
- _funlockfile(_fp); \
+ _funlockfile(_fp); \
# define _newlib_flockfile_end(_fp) \
- if (!(_fp->_flags2 & __SNLK)) \
- _funlockfile(_fp); \
+ _funlockfile(_fp); \
}
# define _newlib_sfp_lock_start() \
@@ -138,10 +123,8 @@
__sfp_lock_release (); \
}
-#endif /* __SINGLE_THREAD__ || __IMPL_UNLOCKED__ */
+#endif /* _STDIO_WITH_THREAD_CANCELLATION_SUPPORT */
-extern wint_t _EXFUN(__fgetwc, (struct _reent *, FILE *));
-extern wint_t _EXFUN(__fputwc, (struct _reent *, wchar_t, FILE *));
extern u_char *_EXFUN(__sccl, (char *, u_char *fmt));
extern int _EXFUN(__svfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
extern int _EXFUN(__ssvfscanf_r,(struct _reent *,FILE *, _CONST char *,va_list));
@@ -164,9 +147,6 @@ int _EXFUN(_svfiwprintf_r,(struct _reent *, FILE *, const wchar_t *,
extern FILE *_EXFUN(__sfp,(struct _reent *));
extern int _EXFUN(__sflags,(struct _reent *,_CONST char*, int*));
extern int _EXFUN(__sflush_r,(struct _reent *,FILE *));
-#ifdef _STDIO_BSD_SEMANTICS
-extern int _EXFUN(__sflushw_r,(struct _reent *,FILE *));
-#endif
extern int _EXFUN(__srefill_r,(struct _reent *,FILE *));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__sread,(struct _reent *, void *, char *,
_READ_WRITE_BUFSIZE_TYPE));
diff --git a/newlib/libc/stdio/nano-vfprintf.c b/newlib/libc/stdio/nano-vfprintf.c
deleted file mode 100644
index f106a4167..000000000
--- a/newlib/libc/stdio/nano-vfprintf.c
+++ /dev/null
@@ -1,665 +0,0 @@
-/*
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
-FUNCTION
-<<vfprintf>>, <<vprintf>>, <<vsprintf>>, <<vsnprintf>>, <<vasprintf>>, <<vasnprintf>>---format argument list
-
-INDEX
- vfprintf
-INDEX
- _vfprintf_r
-INDEX
- vprintf
-INDEX
- _vprintf_r
-INDEX
- vsprintf
-INDEX
- _vsprintf_r
-INDEX
- vsnprintf
-INDEX
- _vsnprintf_r
-INDEX
- vasprintf
-INDEX
- _vasprintf_r
-INDEX
- vasnprintf
-INDEX
- _vasnprintf_r
-
-ANSI_SYNOPSIS
- #include <stdio.h>
- #include <stdarg.h>
- int vprintf(const char *<[fmt]>, va_list <[list]>);
- int vfprintf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>);
- int vsprintf(char *<[str]>, const char *<[fmt]>, va_list <[list]>);
- int vsnprintf(char *<[str]>, size_t <[size]>, const char *<[fmt]>,
- va_list <[list]>);
- int vasprintf(char **<[strp]>, const char *<[fmt]>, va_list <[list]>);
- char *vasnprintf(char *<[str]>, size_t *<[size]>, const char *<[fmt]>,
- va_list <[list]>);
-
- int _vprintf_r(struct _reent *<[reent]>, const char *<[fmt]>,
- va_list <[list]>);
- int _vfprintf_r(struct _reent *<[reent]>, FILE *<[fp]>,
- const char *<[fmt]>, va_list <[list]>);
- int _vsprintf_r(struct _reent *<[reent]>, char *<[str]>,
- const char *<[fmt]>, va_list <[list]>);
- int _vasprintf_r(struct _reent *<[reent]>, char **<[str]>,
- const char *<[fmt]>, va_list <[list]>);
- int _vsnprintf_r(struct _reent *<[reent]>, char *<[str]>,
- size_t <[size]>, const char *<[fmt]>, va_list <[list]>);
- char *_vasnprintf_r(struct _reent *<[reent]>, char *<[str]>,
- size_t *<[size]>, const char *<[fmt]>, va_list <[list]>);
-
-DESCRIPTION
-<<vprintf>>, <<vfprintf>>, <<vasprintf>>, <<vsprintf>>, <<vsnprintf>>,
-and <<vasnprintf>> are (respectively) variants of <<printf>>,
-<<fprintf>>, <<asprintf>>, <<sprintf>>, <<snprintf>>, and
-<<asnprintf>>. They differ only in allowing their caller to pass the
-variable argument list as a <<va_list>> object (initialized by
-<<va_start>>) rather than directly accepting a variable number of
-arguments. The caller is responsible for calling <<va_end>>.
-
-<<_vprintf_r>>, <<_vfprintf_r>>, <<_vasprintf_r>>, <<_vsprintf_r>>,
-<<_vsnprintf_r>>, and <<_vasnprintf_r>> are reentrant versions of the
-above.
-
-RETURNS
-The return values are consistent with the corresponding functions.
-
-PORTABILITY
-ANSI C requires <<vprintf>>, <<vfprintf>>, <<vsprintf>>, and
-<<vsnprintf>>. The remaining functions are newlib extensions.
-
-Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
-<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
-*/
-
-#if defined(LIBC_SCCS) && !defined(lint)
-/*static char *sccsid = "from: @(#)vfprintf.c 5.50 (Berkeley) 12/16/92";*/
-static char *rcsid = "$Id$";
-#endif /* LIBC_SCCS and not lint */
-
-/* Actual printf innards.
- This code is large and complicated... */
-#include <newlib.h>
-
-#define VFPRINTF vfprintf
-#ifdef STRING_ONLY
-# define _VFPRINTF_R _svfprintf_r
-#else
-# define _VFPRINTF_R _vfprintf_r
-#endif
-
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <stdint.h>
-#include <wchar.h>
-#include <sys/lock.h>
-#include <stdarg.h>
-#include "local.h"
-#include "../stdlib/local.h"
-#include "fvwrite.h"
-#include "vfieeefp.h"
-#include "nano-vfprintf_local.h"
-
-/* The __ssputs_r function is shared between all versions of vfprintf
- and vfwprintf. */
-#ifdef STRING_ONLY
-int
-_DEFUN(__ssputs_r, (ptr, fp, buf, len),
- struct _reent *ptr _AND
- FILE *fp _AND
- _CONST char *buf _AND
- size_t len)
-{
- register int w;
-
- w = fp->_w;
- if (len >= w && fp->_flags & (__SMBF | __SOPT))
- {
- /* Must be asprintf family. */
- unsigned char *str;
- int curpos = (fp->_p - fp->_bf._base);
- /* Choose a geometric growth factor to avoid
- * quadratic realloc behavior, but use a rate less
- * than (1+sqrt(5))/2 to accomodate malloc
- * overhead. asprintf EXPECTS us to overallocate, so
- * that it can add a trailing \0 without
- * reallocating. The new allocation should thus be
- * max(prev_size*1.5, curpos+len+1). */
- int newsize = fp->_bf._size * 3 / 2;
- if (newsize < curpos + len + 1)
- newsize = curpos + len + 1;
- if (fp->_flags & __SOPT)
- {
- /* asnprintf leaves original buffer alone. */
- str = (unsigned char *)_malloc_r (ptr, newsize);
- if (!str)
- {
- ptr->_errno = ENOMEM;
- goto err;
- }
- memcpy (str, fp->_bf._base, curpos);
- fp->_flags = (fp->_flags & ~__SOPT) | __SMBF;
- }
- else
- {
- str = (unsigned char *)_realloc_r (ptr, fp->_bf._base, newsize);
- if (!str)
- {
- /* Free unneeded buffer. */
- _free_r (ptr, fp->_bf._base);
- /* Ensure correct errno, even if free changed it. */
- ptr->_errno = ENOMEM;
- goto err;
- }
- }
- fp->_bf._base = str;
- fp->_p = str + curpos;
- fp->_bf._size = newsize;
- w = len;
- fp->_w = newsize - curpos;
- }
- if (len < w)
- w = len;
-
- (void)memmove ((_PTR) fp->_p, (_PTR) buf, (size_t) (w));
- fp->_w -= w;
- fp->_p += w;
- return 0;
-
-err:
- fp->_flags |= __SERR;
- return EOF;
-}
-/* __ssprint_r is the original implementation of __SPRINT. In nano
- version formatted IO it is reimplemented as __ssputs_r for non-wide
- char output, but __ssprint_r cannot be discarded because it is used
- by a serial of functions like svfwprintf for wide char output. */
-int
-_DEFUN(__ssprint_r, (ptr, fp, uio),
- struct _reent *ptr _AND
- FILE *fp _AND
- register struct __suio *uio)
-{
- register size_t len;
- register int w;
- register struct __siov *iov;
- register _CONST char *p = NULL;
-
- iov = uio->uio_iov;
- len = 0;
-
- if (uio->uio_resid == 0)
- {
- uio->uio_iovcnt = 0;
- return (0);
- }
-
- do
- {
- while (len == 0)
- {
- p = iov->iov_base;
- len = iov->iov_len;
- iov++;
- }
- w = fp->_w;
- if (len >= w && fp->_flags & (__SMBF | __SOPT))
- {
- /* Must be asprintf family. */
- unsigned char *str;
- int curpos = (fp->_p - fp->_bf._base);
- /* Choose a geometric growth factor to avoid
- * quadratic realloc behavior, but use a rate less
- * than (1+sqrt(5))/2 to accomodate malloc
- * overhead. asprintf EXPECTS us to overallocate, so
- * that it can add a trailing \0 without
- * reallocating. The new allocation should thus be
- * max(prev_size*1.5, curpos+len+1). */
- int newsize = fp->_bf._size * 3 / 2;
- if (newsize < curpos + len + 1)
- newsize = curpos + len + 1;
-
- if (fp->_flags & __SOPT)
- {
- /* asnprintf leaves original buffer alone. */
- str = (unsigned char *)_malloc_r (ptr, newsize);
- if (!str)
- {
- ptr->_errno = ENOMEM;
- goto err;
- }
- memcpy (str, fp->_bf._base, curpos);
- fp->_flags = (fp->_flags & ~__SOPT) | __SMBF;
- }
- else
- {
- str = (unsigned char *)_realloc_r (ptr, fp->_bf._base,
- newsize);
- if (!str)
- {
- /* Free unneeded buffer. */
- _free_r (ptr, fp->_bf._base);
- /* Ensure correct errno, even if free changed it. */
- ptr->_errno = ENOMEM;
- goto err;
- }
- }
- fp->_bf._base = str;
- fp->_p = str + curpos;
- fp->_bf._size = newsize;
- w = len;
- fp->_w = newsize - curpos;
- }
- if (len < w)
- w = len;
-
- (void)memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (w));
- fp->_w -= w;
- fp->_p += w;
- /* Pretend we copied all. */
- w = len;
- p += w;
- len -= w;
- }
- while ((uio->uio_resid -= w) != 0);
-
- uio->uio_resid = 0;
- uio->uio_iovcnt = 0;
- return 0;
-
-err:
- fp->_flags |= __SERR;
- uio->uio_resid = 0;
- uio->uio_iovcnt = 0;
- return EOF;
-}
-#else
-/* As __ssputs_r, __sprint_r is used by output functions for wide char,
- like vfwprint. */
-/* Flush out all the vectors defined by the given uio,
- then reset it so that it can be reused. */
-int
-_DEFUN(__sprint_r, (ptr, fp, uio),
- struct _reent *ptr _AND
- FILE *fp _AND
- register struct __suio *uio)
-{
- register int err = 0;
-
- if (uio->uio_resid == 0)
- {
- uio->uio_iovcnt = 0;
- return 0;
- }
-#ifdef _WIDE_ORIENT
- if (fp->_flags2 & __SWID)
- {
- struct __siov *iov;
- wchar_t *p;
- int i, len;
-
- iov = uio->uio_iov;
- for (; uio->uio_resid != 0;
- uio->uio_resid -= len * sizeof (wchar_t), iov++)
- {
- p = (wchar_t *) iov->iov_base;
- len = iov->iov_len / sizeof (wchar_t);
- for (i = 0; i < len; i++)
- {
- if (_fputwc_r (ptr, p[i], fp) == WEOF)
- {
- err = -1;
- goto out;
- }
- }
- }
- }
- else
-#endif
- err = __sfvwrite_r(ptr, fp, uio);
-out:
- uio->uio_resid = 0;
- uio->uio_iovcnt = 0;
- return err;
-}
-
-_NOINLINE_STATIC int
-_DEFUN(__sfputc_r, (ptr, c, fp),
- struct _reent *ptr _AND
- int c _AND
- FILE *fp)
-{
- if (--fp->_w >= 0 || (fp->_w >= fp->_lbfsize && (char)c != '\n'))
- return (*fp->_p++ = c);
- else
- return (__swbuf_r(ptr, c, fp));
-}
-
-int
-_DEFUN(__sfputs_r, (ptr, fp, buf, len),
- struct _reent *ptr _AND
- FILE *fp _AND
- _CONST char *buf _AND
- size_t len)
-{
- register int i;
-
-#ifdef _WIDE_ORIENT
- if (fp->_flags2 & __SWID)
- {
- wchar_t *p;
-
- p = (wchar_t *) buf;
- for (i = 0; i < (len / sizeof (wchar_t)); i++)
- {
- if (_fputwc_r (ptr, p[i], fp) == WEOF)
- return -1;
- }
- }
- else
-#endif
- {
- for (i = 0; i < len; i++)
- {
- /* Call __sfputc_r to skip _fputc_r. */
- if (__sfputc_r (ptr, (int)buf[i], fp) == EOF)
- return -1;
- }
- }
- return (0);
-}
-#endif /* STRING_ONLY. */
-
-int _EXFUN(_VFPRINTF_R, (struct _reent *, FILE *, _CONST char *, va_list));
-
-#ifndef STRING_ONLY
-int
-_DEFUN(VFPRINTF, (fp, fmt0, ap),
- FILE * fp _AND
- _CONST char *fmt0 _AND
- va_list ap)
-{
- int result;
- result = _VFPRINTF_R (_REENT, fp, fmt0, ap);
- return result;
-}
-
-int
-_EXFUN(vfiprintf, (FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vfprintf"))));
-#endif
-
-#ifdef STRING_ONLY
-# define __SPRINT __ssputs_r
-#else
-# define __SPRINT __sfputs_r
-#endif
-
-/* Do not need FLUSH for all sprintf functions. */
-#ifdef STRING_ONLY
-# define FLUSH()
-#else
-# define FLUSH()
-#endif
-
-int
-_DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap),
- struct _reent *data _AND
- FILE * fp _AND
- _CONST char *fmt0 _AND
- va_list ap)
-{
- register char *fmt; /* Format string. */
- register int n, m; /* Handy integers (short term usage). */
- register char *cp; /* Handy char pointer (short term usage). */
- const char *flag_chars;
- struct _prt_data_t prt_data; /* All data for decoding format string. */
-
- /* Output function pointer. */
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len);
-
- pfunc = __SPRINT;
-
-#ifndef STRING_ONLY
- /* Initialize std streams if not dealing with sprintf family. */
- CHECK_INIT (data, fp);
- _newlib_flockfile_start (fp);
-
- /* Sorry, fprintf(read_only_file, "") returns EOF, not 0. */
- if (cantwrite (data, fp))
- {
- _newlib_flockfile_exit (fp);
- return (EOF);
- }
-
-#else
- /* Create initial buffer if we are called by asprintf family. */
- if (fp->_flags & __SMBF && !fp->_bf._base)
- {
- fp->_bf._base = fp->_p = _malloc_r (data, 64);
- if (!fp->_p)
- {
- data->_errno = ENOMEM;
- return EOF;
- }
- fp->_bf._size = 64;
- }
-#endif
-
- fmt = (char *)fmt0;
- prt_data.ret = 0;
- prt_data.blank = ' ';
- prt_data.zero = '0';
-
- /* Scan the format for conversions (`%' character). */
- for (;;)
- {
- cp = fmt;
- while (*fmt != '\0' && *fmt != '%')
- fmt += 1;
-
- if ((m = fmt - cp) != 0)
- {
- PRINT (cp, m);
- prt_data.ret += m;
- }
- if (*fmt == '\0')
- goto done;
-
- fmt++; /* Skip over '%'. */
-
- prt_data.flags = 0;
- prt_data.width = 0;
- prt_data.prec = -1;
- prt_data.dprec = 0;
- prt_data.l_buf[0] = '\0';
-#ifdef FLOATING_POINT
- prt_data.lead = 0;
-#endif
- /* The flags. */
- /*
- * ``Note that 0 is taken as a flag, not as the
- * beginning of a field width.''
- * -- ANSI X3J11
- */
- flag_chars = "#-0+ ";
- for (; cp = memchr (flag_chars, *fmt, 5); fmt++)
- prt_data.flags |= (1 << (cp - flag_chars));
-
- if (prt_data.flags & SPACESGN)
- prt_data.l_buf[0] = ' ';
-
- /*
- * ``If the space and + flags both appear, the space
- * flag will be ignored.''
- * -- ANSI X3J11
- */
- if (prt_data.flags & PLUSSGN)
- prt_data.l_buf[0] = '+';
-
- /* The width. */
- if (*fmt == '*')
- {
- /*
- * ``A negative field width argument is taken as a
- * - flag followed by a positive field width.''
- * -- ANSI X3J11
- * They don't exclude field widths read from args.
- */
- prt_data.width = GET_ARG (n, ap, int);
- if (prt_data.width < 0)
- {
- prt_data.width = -prt_data.width;
- prt_data.flags |= LADJUST;
- }
- fmt++;
- }
- else
- {
- for (; is_digit (*fmt); fmt++)
- prt_data.width = 10 * prt_data.width + to_digit (*fmt);
- }
-
- /* The precision. */
- if (*fmt == '.')
- {
- fmt++;
- if (*fmt == '*')
- {
- fmt++;
- prt_data.prec = GET_ARG (n, ap, int);
- if (prt_data.prec < 0)
- prt_data.prec = -1;
- }
- else
- {
- prt_data.prec = 0;
- for (; is_digit (*fmt); fmt++)
- prt_data.prec = 10 * prt_data.prec + to_digit (*fmt);
- }
- }
-
- /* The length modifiers. */
- flag_chars = "hlL";
- if ((cp = memchr (flag_chars, *fmt, 3)) != NULL)
- {
- prt_data.flags |= (SHORTINT << (cp - flag_chars));
- fmt++;
- }
-
- /* The conversion specifiers. */
- prt_data.code = *fmt++;
- cp = memchr ("efgEFG", prt_data.code, 6);
-#ifdef FLOATING_POINT
- /* If cp is not NULL, we are facing FLOATING POINT NUMBER. */
- if (cp)
- {
- /* Consume floating point argument if _printf_float is not
- linked. */
- if (_printf_float == NULL)
- {
- if (prt_data.flags & LONGDBL)
- GET_ARG (N, ap, _LONG_DOUBLE);
- else
- GET_ARG (N, ap, double);
- }
- else
- {
- n = _printf_float (data, &prt_data, fp, pfunc, &ap);
- }
- }
- else
-#endif
- n = _printf_i (data, &prt_data, fp, pfunc, &ap);
-
- if (n == -1)
- goto error;
-
- prt_data.ret += n;
- }
-done:
- FLUSH ();
-error:
-#ifndef STRING_ONLY
- _newlib_flockfile_end (fp);
-#endif
- return (__sferror (fp) ? EOF : prt_data.ret);
-}
-
-#ifdef STRING_ONLY
-int
-_EXFUN(_svfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_svfprintf_r"))));
-#else
-int
-_EXFUN(_vfiprintf_r, (struct _reent *, FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vfprintf_r"))));
-#endif
diff --git a/newlib/libc/stdio/nano-vfprintf_float.c b/newlib/libc/stdio/nano-vfprintf_float.c
deleted file mode 100644
index aca24aec0..000000000
--- a/newlib/libc/stdio/nano-vfprintf_float.c
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <newlib.h>
-
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <stdint.h>
-#include <wchar.h>
-#include <sys/lock.h>
-#include <stdarg.h>
-#include "local.h"
-#include "../stdlib/local.h"
-#include "fvwrite.h"
-#include "vfieeefp.h"
-#include "nano-vfprintf_local.h"
-
-char *__cvt (struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits,
- int flags, char *sign, int *decpt, int ch, int *length,
- char *buf);
-
-int __exponent (char *p0, int exp, int fmtch);
-
-#ifdef FLOATING_POINT
-
-/* Using reentrant DATA, convert finite VALUE into a string of digits
- with no decimal point, using NDIGITS precision and FLAGS as guides
- to whether trailing zeros must be included. Set *SIGN to nonzero
- if VALUE was negative. Set *DECPT to the exponent plus one. Set
- *LENGTH to the length of the returned string. CH must be one of
- [aAeEfFgG]; if it is [aA], then the return string lives in BUF,
- otherwise the return value shares the mprec reentrant storage. */
-char *
-__cvt (struct _reent *data, _PRINTF_FLOAT_TYPE value, int ndigits, int flags,
- char *sign, int *decpt, int ch, int *length, char *buf)
-{
- int mode, dsgn;
- char *digits, *bp, *rve;
- union double_union tmp;
-
- tmp.d = value;
- /* This will check for "< 0" and "-0.0". */
- if (word0 (tmp) & Sign_bit)
- {
- value = -value;
- *sign = '-';
- }
- else
- *sign = '\000';
-
- if (ch == 'f' || ch == 'F')
- {
- /* Ndigits after the decimal point. */
- mode = 3;
- }
- else
- {
- /* To obtain ndigits after the decimal point for the 'e'
- and 'E' formats, round to ndigits + 1 significant figures. */
- if (ch == 'e' || ch == 'E')
- {
- ndigits++;
- }
- /* Ndigits significant digits. */
- mode = 2;
- }
-
- digits = _DTOA_R (data, value, mode, ndigits, decpt, &dsgn, &rve);
-
- /* Print trailing zeros. */
- if ((ch != 'g' && ch != 'G') || flags & ALT)
- {
- bp = digits + ndigits;
- if (ch == 'f' || ch == 'F')
- {
- if (*digits == '0' && value)
- *decpt = -ndigits + 1;
- bp += *decpt;
- }
- /* Kludge for __dtoa irregularity. */
- if (value == 0)
- rve = bp;
- while (rve < bp)
- *rve++ = '0';
- }
- *length = rve - digits;
- return (digits);
-}
-
-/* This function is copied from exponent in vfprintf.c with support for
- C99 formats removed. We don't use the original function in order to
- decouple nano implementation of formatted IO from the Newlib one. */
-int
-__exponent (char *p0, int exp, int fmtch)
-{
- register char *p, *t;
- char expbuf[MAXEXPLEN];
-#define isa 0
-
- p = p0;
- *p++ = isa ? 'p' - 'a' + fmtch : fmtch;
- if (exp < 0)
- {
- exp = -exp;
- *p++ = '-';
- }
- else
- *p++ = '+';
- t = expbuf + MAXEXPLEN;
- if (exp > 9)
- {
- do
- {
- *--t = to_char (exp % 10);
- }
- while ((exp /= 10) > 9);
- *--t = to_char (exp);
- for (; t < expbuf + MAXEXPLEN; *p++ = *t++);
- }
- else
- {
- if (!isa)
- *p++ = '0';
- *p++ = to_char (exp);
- }
- return (p - p0);
-}
-
-/* Decode and print floating point number specified by "eEfgG". */
-int
-_printf_float (struct _reent *data,
- struct _prt_data_t *pdata,
- FILE * fp,
- int (*pfunc) (struct _reent *, FILE *, _CONST char *,
- size_t len), va_list * ap)
-{
-#define _fpvalue (pdata->_double_)
-
- char *decimal_point = _localeconv_r (data)->decimal_point;
- size_t decp_len = strlen (decimal_point);
- /* Temporary negative sign for floats. */
- char softsign;
- /* Integer value of exponent. */
- int expt;
- /* Character count for expstr. */
- int expsize = 0;
- /* Actual number of digits returned by cvt. */
- int ndig = 0;
- char *cp;
- int n;
- /* Field size expanded by dprec(not for _printf_float). */
- int realsz;
- char code = pdata->code;
-
- if (pdata->flags & LONGDBL)
- {
- _fpvalue = (double) GET_ARG (N, *ap, _LONG_DOUBLE);
- }
- else
- {
- _fpvalue = GET_ARG (N, *ap, double);
- }
-
- /* Do this before tricky precision changes.
-
- If the output is infinite or NaN, leading
- zeros are not permitted. Otherwise, scanf
- could not read what printf wrote. */
- if (isinf (_fpvalue))
- {
- if (_fpvalue < 0)
- pdata->l_buf[0] = '-';
- if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */
- cp = "INF";
- else
- cp = "inf";
- pdata->size = 3;
- pdata->flags &= ~ZEROPAD;
- goto print_float;
- }
- if (isnan (_fpvalue))
- {
- if (code <= 'G') /* 'A', 'E', 'F', or 'G'. */
- cp = "NAN";
- else
- cp = "nan";
- pdata->size = 3;
- pdata->flags &= ~ZEROPAD;
- goto print_float;
- }
-
- if (pdata->prec == -1)
- {
- pdata->prec = DEFPREC;
- }
- else if ((code == 'g' || code == 'G') && pdata->prec == 0)
- {
- pdata->prec = 1;
- }
-
- pdata->flags |= FPT;
-
- cp = __cvt (data, _fpvalue, pdata->prec, pdata->flags, &softsign,
- &expt, code, &ndig, cp);
-
- if (code == 'g' || code == 'G')
- {
- if (expt <= -4 || expt > pdata->prec)
- /* 'e' or 'E'. */
- code -= 2;
- else
- code = 'g';
- }
- if (code <= 'e')
- {
- /* 'a', 'A', 'e', or 'E' fmt. */
- --expt;
- expsize = __exponent (pdata->expstr, expt, code);
- pdata->size = expsize + ndig;
- if (ndig > 1 || pdata->flags & ALT)
- ++pdata->size;
- }
- else
- {
- if (code == 'f')
- {
- /* 'f' fmt. */
- if (expt > 0)
- {
- pdata->size = expt;
- if (pdata->prec || pdata->flags & ALT)
- pdata->size += pdata->prec + 1;
- }
- else
- /* "0.X". */
- pdata->size = (pdata->prec || pdata->flags & ALT)
- ? pdata->prec + 2 : 1;
- }
- else if (expt >= ndig)
- {
- /* Fixed g fmt. */
- pdata->size = expt;
- if (pdata->flags & ALT)
- ++pdata->size;
- }
- else
- pdata->size = ndig + (expt > 0 ? 1 : 2 - expt);
- pdata->lead = expt;
- }
-
- if (softsign)
- pdata->l_buf[0] = '-';
-print_float:
- if (_printf_common (data, pdata, &realsz, fp, pfunc) == -1)
- goto error;
-
- if ((pdata->flags & FPT) == 0)
- {
- PRINT (cp, pdata->size);
- }
- else
- {
- /* Glue together f_p fragments. */
- if (code >= 'f')
- {
- /* 'f' or 'g'. */
- if (_fpvalue == 0)
- {
- /* Kludge for __dtoa irregularity. */
- PRINT ("0", 1);
- if (expt < ndig || pdata->flags & ALT)
- {
- PRINT (decimal_point, decp_len);
- PAD (ndig - 1, pdata->zero);
- }
- }
- else if (expt <= 0)
- {
- PRINT ("0", 1);
- if (expt || ndig || pdata->flags & ALT)
- {
- PRINT (decimal_point, decp_len);
- PAD (-expt, pdata->zero);
- PRINT (cp, ndig);
- }
- }
- else
- {
- char *convbuf = cp;
- PRINTANDPAD (cp, convbuf + ndig, pdata->lead, pdata->zero);
- cp += pdata->lead;
- if (expt < ndig || pdata->flags & ALT)
- PRINT (decimal_point, decp_len);
- PRINTANDPAD (cp, convbuf + ndig, ndig - expt, pdata->zero);
- }
- }
- else
- {
- /* 'a', 'A', 'e', or 'E'. */
- if (ndig > 1 || pdata->flags & ALT)
- {
- PRINT (cp, 1);
- cp++;
- PRINT (decimal_point, decp_len);
- if (_fpvalue)
- {
- PRINT (cp, ndig - 1);
- }
- /* "0.[0..]". */
- else
- /* __dtoa irregularity. */
- PAD (ndig - 1, pdata->zero);
- }
- else /* "XeYYY". */
- PRINT (cp, 1);
- PRINT (pdata->expstr, expsize);
- }
- }
-
- /* Left-adjusting padding (always blank). */
- if (pdata->flags & LADJUST)
- PAD (pdata->width - realsz, pdata->blank);
-
- return (pdata->width > realsz ? pdata->width : realsz);
-error:
- return -1;
-
-#undef _fpvalue
-}
-
-#endif
diff --git a/newlib/libc/stdio/nano-vfprintf_i.c b/newlib/libc/stdio/nano-vfprintf_i.c
deleted file mode 100644
index 46945b34a..000000000
--- a/newlib/libc/stdio/nano-vfprintf_i.c
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <newlib.h>
-
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <stdint.h>
-#include <wchar.h>
-#include <sys/lock.h>
-#include <stdarg.h>
-#include "local.h"
-#include "../stdlib/local.h"
-#include "fvwrite.h"
-#include "vfieeefp.h"
-#include "nano-vfprintf_local.h"
-
-/* Decode and print non-floating point data. */
-int
-_printf_common (struct _reent *data,
- struct _prt_data_t *pdata,
- int *realsz,
- FILE *fp,
- int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len))
-{
- int n;
- /*
- * All reasonable formats wind up here. At this point, `cp'
- * points to a string which (if not flags&LADJUST) should be
- * padded out to `width' places. If flags&ZEROPAD, it should
- * first be prefixed by any sign or other prefix; otherwise,
- * it should be blank padded before the prefix is emitted.
- * After any left-hand padding and prefixing, emit zeroes
- * required by a decimal [diouxX] precision, then print the
- * string proper, then emit zeroes required by any leftover
- * floating precision; finally, if LADJUST, pad with blanks.
- * If flags&FPT, ch must be in [aAeEfg].
- *
- * Compute actual size, so we know how much to pad.
- * size excludes decimal prec; realsz includes it.
- */
- *realsz = pdata->dprec > pdata->size ? pdata->dprec : pdata->size;
- if (pdata->l_buf[0])
- (*realsz)++;
-
- if (pdata->flags & HEXPREFIX)
- *realsz += 2;
-
- /* Right-adjusting blank padding. */
- if ((pdata->flags & (LADJUST|ZEROPAD)) == 0)
- PAD (pdata->width - *realsz, pdata->blank);
-
- /* Prefix. */
- n = 0;
- if (pdata->l_buf[0])
- n++;
-
- if (pdata->flags & HEXPREFIX)
- {
- pdata->l_buf[n++] = '0';
- pdata->l_buf[n++] = pdata->l_buf[2];
- }
-
- PRINT (pdata->l_buf, n);
- n = pdata->width - *realsz;
- if ((pdata->flags & (LADJUST|ZEROPAD)) != ZEROPAD || n < 0)
- n = 0;
-
- if (pdata->dprec > pdata->size)
- n += pdata->dprec - pdata->size;
-
- PAD (n, pdata->zero);
- return 0;
-error:
- return -1;
-}
-int
-_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
- va_list *ap)
-{
- /* Field size expanded by dprec. */
- int realsz;
- u_quad_t _uquad;
- int base;
- int n;
- char *cp = pdata->buf + BUF;
- char *xdigs = "0123456789ABCDEF";
-
- /* Decoding the conversion specifier. */
- switch (pdata->code)
- {
- case 'c':
- *--cp = GET_ARG (N, *ap, int);
- pdata->size = 1;
- goto non_number_nosign;
- case 'd':
- case 'i':
- _uquad = SARG (pdata->flags);
- if ((long) _uquad < 0)
- {
- _uquad = -_uquad;
- pdata->l_buf[0] = '-';
- }
- base = 10;
- goto number;
- case 'u':
- case 'o':
- _uquad = UARG (pdata->flags);
- base = (pdata->code == 'o') ? 8 : 10;
- goto nosign;
- case 'X':
- pdata->l_buf[2] = 'X';
- goto hex;
- case 'p':
- /*
- * ``The argument shall be a pointer to void. The
- * value of the pointer is converted to a sequence
- * of printable characters, in an implementation-
- * defined manner.''
- * -- ANSI X3J11
- */
- pdata->flags |= HEXPREFIX;
- if (sizeof (void*) > sizeof (int))
- pdata->flags |= LONGINT;
- /* NOSTRICT. */
- case 'x':
- pdata->l_buf[2] = 'x';
- xdigs = "0123456789abcdef";
-hex:
- _uquad = UARG (pdata->flags);
- base = 16;
- if (pdata->flags & ALT)
- pdata->flags |= HEXPREFIX;
-
- /* Leading 0x/X only if non-zero. */
- if (_uquad == 0)
- pdata->flags &= ~HEXPREFIX;
-
- /* Unsigned conversions. */
-nosign:
- pdata->l_buf[0] = '\0';
- /*
- * ``... diouXx conversions ... if a precision is
- * specified, the 0 flag will be ignored.''
- * -- ANSI X3J11
- */
-number:
- if ((pdata->dprec = pdata->prec) >= 0)
- pdata->flags &= ~ZEROPAD;
-
- /*
- * ``The result of converting a zero value with an
- * explicit precision of zero is no characters.''
- * -- ANSI X3J11
- */
- if (_uquad != 0 || pdata->prec != 0)
- {
- do
- {
- *--cp = xdigs[_uquad % base];
- _uquad /= base;
- }
- while (_uquad);
- }
- /* For 'o' conversion, '#' increases the precision to force the first
- digit of the result to be zero. */
- if (base == 8 && (pdata->flags & ALT) && pdata->prec <= pdata->size)
- *--cp = '0';
-
- pdata->size = pdata->buf + BUF - cp;
- break;
- case 'n':
- if (pdata->flags & LONGINT)
- *GET_ARG (N, *ap, long_ptr_t) = pdata->ret;
- else if (pdata->flags & SHORTINT)
- *GET_ARG (N, *ap, short_ptr_t) = pdata->ret;
- else
- *GET_ARG (N, *ap, int_ptr_t) = pdata->ret;
- case '\0':
- pdata->size = 0;
- break;
- case 's':
- cp = GET_ARG (N, *ap, char_ptr_t);
- /* Precision gives the maximum number of chars to be written from a
- string, and take prec == -1 into consideration.
- Use normal Newlib approach here to support case where cp is not
- nul-terminated. */
- char *p = memchr (cp, 0, pdata->prec);
-
- if (p != NULL)
- pdata->prec = p - cp;
-
- pdata->size = pdata->prec;
- goto non_number_nosign;
- default:
- /* "%?" prints ?, unless ? is NUL. */
- /* Pretend it was %c with argument ch. */
- *--cp = pdata->code;
- pdata->size = 1;
-non_number_nosign:
- pdata->l_buf[0] = '\0';
- break;
- }
-
- /* Output. */
- n = _printf_common (data, pdata, &realsz, fp, pfunc);
- if (n == -1)
- goto error;
-
- PRINT (cp, pdata->size);
- /* Left-adjusting padding (always blank). */
- if (pdata->flags & LADJUST)
- PAD (pdata->width - realsz, pdata->blank);
-
- return (pdata->width > realsz ? pdata->width : realsz);
-error:
- return -1;
-}
-
diff --git a/newlib/libc/stdio/nano-vfprintf_local.h b/newlib/libc/stdio/nano-vfprintf_local.h
deleted file mode 100644
index 83b479e56..000000000
--- a/newlib/libc/stdio/nano-vfprintf_local.h
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef VFPRINTF_LOCAL
-#define VFPRINTF_LOCAL
-
-#ifndef NO_FLOATING_POINT
-# define FLOATING_POINT
-#endif
-
-#define _NO_POS_ARGS
-#undef _WANT_IO_C99_FORMATS
-
-/* Currently a test is made to see if long double processing is warranted.
- This could be changed in the future should the _ldtoa_r code be
- preferred over _dtoa_r. */
-#define _NO_LONGDBL
-
-#define _NO_LONGLONG
-
-#define _PRINTF_FLOAT_TYPE double
-
-#if defined (FLOATING_POINT)
-# include <locale.h>
-#endif
-#ifdef FLOATING_POINT
-# include <math.h>
-
-/* For %La, an exponent of 15 bits occupies the exponent character,
- a sign, and up to 5 digits. */
-# define MAXEXPLEN 7
-# define DEFPREC 6
-
-extern char *_dtoa_r _PARAMS((struct _reent *, double, int,
- int, int *, int *, char **));
-
-# define _DTOA_R _dtoa_r
-# define FREXP frexp
-
-#endif /* FLOATING_POINT. */
-
-/* BUF must be big enough for the maximum %#llo (assuming long long is
- at most 64 bits, this would be 23 characters), the maximum
- multibyte character %C, and the maximum default precision of %La
- (assuming long double is at most 128 bits with 113 bits of
- mantissa, this would be 29 characters). %e, %f, and %g use
- reentrant storage shared with mprec. All other formats that use
- buf get by with fewer characters. Making BUF slightly bigger
- reduces the need for malloc in %.*a and %S, when large precision or
- long strings are processed.
- The bigger size of 100 bytes is used on systems which allow number
- strings using the locale's grouping character. Since that's a multibyte
- value, we should use a conservative value. */
-#define BUF 40
-
-#define quad_t long
-#define u_quad_t unsigned long
-
-typedef quad_t * quad_ptr_t;
-typedef _PTR void_ptr_t;
-typedef char * char_ptr_t;
-typedef long * long_ptr_t;
-typedef int * int_ptr_t;
-typedef short * short_ptr_t;
-
-/* Macros for converting digits to letters and vice versa. */
-#define to_digit(c) ((c) - '0')
-#define is_digit(c) ((unsigned)to_digit (c) <= 9)
-#define to_char(n) ((n) + '0')
-
-/* Flags used during conversion. */
-#define ALT 0x001 /* Alternate form. */
-#define LADJUST 0x002 /* Left adjustment. */
-#define ZEROPAD 0x004 /* Zero (as opposed to blank) pad. */
-#define PLUSSGN 0x008 /* Plus sign flag. */
-#define SPACESGN 0x010 /* Space flag. */
-#define HEXPREFIX 0x020 /* Add 0x or 0X prefix. */
-#define SHORTINT 0x040 /* Short integer. */
-#define LONGINT 0x080 /* Long integer. */
-#define LONGDBL 0x100 /* Long double. */
-/* ifdef _NO_LONGLONG, make QUADINT equivalent to LONGINT, so
- that %lld behaves the same as %ld, not as %d, as expected if:
- sizeof (long long) = sizeof long > sizeof int. */
-#define QUADINT LONGINT
-#define FPT 0x400 /* Floating point number. */
-/* Define as 0, to make SARG and UARG occupy fewer instructions. */
-# define CHARINT 0
-
-/* Macros to support positional arguments. */
-#define GET_ARG(n, ap, type) (va_arg ((ap), type))
-
-/* To extend shorts properly, we need both signed and unsigned
- argument extraction methods. Also they should be used in nano-vfprintf_i.c
- and nano-vfprintf_float.c only, since ap is a pointer to va_list. */
-#define SARG(flags) \
- (flags&LONGINT ? GET_ARG (N, (*ap), long) : \
- flags&SHORTINT ? (long)(short)GET_ARG (N, (*ap), int) : \
- flags&CHARINT ? (long)(signed char)GET_ARG (N, (*ap), int) : \
- (long)GET_ARG (N, (*ap), int))
-#define UARG(flags) \
- (flags&LONGINT ? GET_ARG (N, (*ap), u_long) : \
- flags&SHORTINT ? (u_long)(u_short)GET_ARG (N, (*ap), int) : \
- flags&CHARINT ? (u_long)(unsigned char)GET_ARG (N, (*ap), int) : \
- (u_long)GET_ARG (N, (*ap), u_int))
-
-/* BEWARE, these `goto error' on error. And they are used
- in more than one functions.
-
- Following macros are each referred about twice in printf for integer,
- so it is not worth to rewrite them into functions. This situation may
- change in the future. */
-#define PRINT(ptr, len) { \
- if (pfunc (data, fp, (ptr), (len)) == EOF) \
- goto error; \
-}
-#define PAD(howmany, ch) { \
- int temp_i = 0; \
- while (temp_i < (howmany)) \
- { \
- if (pfunc (data, fp, &(ch), 1) == EOF) \
- goto error; \
- temp_i++; \
- } \
-}
-#define PRINTANDPAD(p, ep, len, ch) { \
- int temp_n = (ep) - (p); \
- if (temp_n > (len)) \
- temp_n = (len); \
- if (temp_n > 0) \
- PRINT((p), temp_n); \
- PAD((len) - (temp_n > 0 ? temp_n : 0), (ch)); \
-}
-
-/* All data needed to decode format string are kept in below struct. */
-struct _prt_data_t
-{
- int flags; /* Flags. */
- int prec; /* Precision. */
- int dprec; /* Decimal precision. */
- int width; /* Width. */
- int size; /* Size of converted field or string. */
- int ret; /* Return value accumulator. */
- char code; /* Current conversion specifier. */
- char blank; /* Blank character. */
- char zero; /* Zero character. */
- char buf[BUF]; /* Output buffer for non-floating point number. */
- char l_buf[3]; /* Sign&hex_prefix, "+/-" and "0x/X". */
-#ifdef FLOATING_POINT
- _PRINTF_FLOAT_TYPE _double_; /* Double value. */
- char expstr[MAXEXPLEN]; /* Buffer for exponent string. */
- int lead; /* The sig figs before decimal or group sep. */
-#endif
-};
-
-extern int
-_printf_common (struct _reent *data,
- struct _prt_data_t *pdata,
- int *realsz,
- FILE *fp,
- int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len));
-
-extern int
-_printf_i (struct _reent *data, struct _prt_data_t *pdata, FILE *fp,
- int (*pfunc)(struct _reent *, FILE *, _CONST char *, size_t len),
- va_list *ap);
-
-/* Make _printf_float weak symbol, so it won't be linked in if target program
- does not need it. */
-extern int
-_printf_float (struct _reent *data,
- struct _prt_data_t *pdata,
- FILE *fp,
- int (*pfunc)(struct _reent *, FILE *,
- _CONST char *, size_t len),
- va_list *ap) _ATTRIBUTE((__weak__));
-#endif
diff --git a/newlib/libc/stdio/nano-vfscanf.c b/newlib/libc/stdio/nano-vfscanf.c
deleted file mode 100644
index 6a827567a..000000000
--- a/newlib/libc/stdio/nano-vfscanf.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
-FUNCTION
-<<vfscanf>>, <<vscanf>>, <<vsscanf>>---format argument list
-
-INDEX
- vfscanf
-INDEX
- _vfscanf_r
-INDEX
- vscanf
-INDEX
- _vscanf_r
-INDEX
- vsscanf
-INDEX
- _vsscanf_r
-
-ANSI_SYNOPSIS
- #include <stdio.h>
- #include <stdarg.h>
- int vscanf(const char *<[fmt]>, va_list <[list]>);
- int vfscanf(FILE *<[fp]>, const char *<[fmt]>, va_list <[list]>);
- int vsscanf(const char *<[str]>, const char *<[fmt]>, va_list <[list]>);
-
- int _vscanf_r(struct _reent *<[reent]>, const char *<[fmt]>,
- va_list <[list]>);
- int _vfscanf_r(struct _reent *<[reent]>, FILE *<[fp]>, const char *<[fmt]>,
- va_list <[list]>);
- int _vsscanf_r(struct _reent *<[reent]>, const char *<[str]>,
- const char *<[fmt]>, va_list <[list]>);
-
-TRAD_SYNOPSIS
- #include <stdio.h>
- #include <varargs.h>
- int vscanf( <[fmt]>, <[ist]>)
- char *<[fmt]>;
- va_list <[list]>;
-
- int vfscanf( <[fp]>, <[fmt]>, <[list]>)
- FILE *<[fp]>;
- char *<[fmt]>;
- va_list <[list]>;
-
- int vsscanf( <[str]>, <[fmt]>, <[list]>)
- char *<[str]>;
- char *<[fmt]>;
- va_list <[list]>;
-
- int _vscanf_r( <[reent]>, <[fmt]>, <[ist]>)
- struct _reent *<[reent]>;
- char *<[fmt]>;
- va_list <[list]>;
-
- int _vfscanf_r( <[reent]>, <[fp]>, <[fmt]>, <[list]>)
- struct _reent *<[reent]>;
- FILE *<[fp]>;
- char *<[fmt]>;
- va_list <[list]>;
-
- int _vsscanf_r( <[reent]>, <[str]>, <[fmt]>, <[list]>)
- struct _reent *<[reent]>;
- char *<[str]>;
- char *<[fmt]>;
- va_list <[list]>;
-
-DESCRIPTION
-<<vscanf>>, <<vfscanf>>, and <<vsscanf>> are (respectively) variants
-of <<scanf>>, <<fscanf>>, and <<sscanf>>. They differ only in
-allowing their caller to pass the variable argument list as a
-<<va_list>> object (initialized by <<va_start>>) rather than
-directly accepting a variable number of arguments.
-
-RETURNS
-The return values are consistent with the corresponding functions:
-<<vscanf>> returns the number of input fields successfully scanned,
-converted, and stored; the return value does not include scanned
-fields which were not stored.
-
-If <<vscanf>> attempts to read at end-of-file, the return value
-is <<EOF>>.
-
-If no fields were stored, the return value is <<0>>.
-
-The routines <<_vscanf_r>>, <<_vfscanf_f>>, and <<_vsscanf_r>> are
-reentrant versions which take an additional first parameter which points to the
-reentrancy structure.
-
-PORTABILITY
-These are GNU extensions.
-
-Supporting OS subroutines required:
-*/
-
-#include <_ansi.h>
-#include <reent.h>
-#include <newlib.h>
-#include <ctype.h>
-#include <wctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <wchar.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include "local.h"
-#include "../stdlib/local.h"
-#include "nano-vfscanf_local.h"
-
-#define VFSCANF vfscanf
-#define _VFSCANF_R _vfscanf_r
-#define __SVFSCANF __svfscanf
-#ifdef STRING_ONLY
-# define __SVFSCANF_R __ssvfscanf_r
-#else
-# define __SVFSCANF_R __svfscanf_r
-#endif
-
-/* vfscanf. */
-
-#ifndef STRING_ONLY
-
-#ifndef _REENT_ONLY
-
-int
-_DEFUN(VFSCANF, (fp, fmt, ap),
- register FILE *fp _AND
- _CONST char *fmt _AND
- va_list ap)
-{
- CHECK_INIT(_REENT, fp);
- return __SVFSCANF_R (_REENT, fp, fmt, ap);
-}
-
-int
-_EXFUN(vfiscanf, (FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vfscanf"))));
-
-int
-_DEFUN(__SVFSCANF, (fp, fmt0, ap),
- register FILE *fp _AND
- char _CONST *fmt0 _AND
- va_list ap)
-{
- return __SVFSCANF_R (_REENT, fp, fmt0, ap);
-}
-
-#endif
-
-int
-_DEFUN(_VFSCANF_R, (data, fp, fmt, ap),
- struct _reent *data _AND
- register FILE *fp _AND
- _CONST char *fmt _AND
- va_list ap)
-{
- CHECK_INIT(data, fp);
- return __SVFSCANF_R (data, fp, fmt, ap);
-}
-
-int
-_EXFUN(_vfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vfscanf_r"))));
-#endif /* !STRING_ONLY. */
-
-#if defined (STRING_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. */
-int
-_DEFUN(_sungetc_r, (data, fp, ch),
- struct _reent *data _AND
- int c _AND
- register FILE *fp)
-{
- if (c == EOF)
- return (EOF);
-
- /* After ungetc, we won't be at eof anymore. */
- fp->_flags &= ~__SEOF;
- c = (unsigned char) c;
-
- /* If we are in the middle of ungetc'ing, just continue.
- This may require expanding the current ungetc buffer. */
-
- if (HASUB (fp))
- {
- if (fp->_r >= fp->_ub._size && __submore (data, fp))
- return EOF;
-
- *--fp->_p = c;
- fp->_r++;
- return c;
- }
-
- /* If we can handle this by simply backing up, do so,
- but never replace the original character.
- (This makes sscanf() work when scanning `const' data). */
- if (fp->_bf._base != NULL && fp->_p > fp->_bf._base && fp->_p[-1] == c)
- {
- fp->_p--;
- fp->_r++;
- return c;
- }
-
- /* Create an ungetc buffer.
- Initially, we will use the `reserve' buffer. */
- fp->_ur = fp->_r;
- fp->_up = fp->_p;
- fp->_ub._base = fp->_ubuf;
- fp->_ub._size = sizeof (fp->_ubuf);
- fp->_ubuf[sizeof (fp->_ubuf) - 1] = c;
- fp->_p = &fp->_ubuf[sizeof (fp->_ubuf) - 1];
- fp->_r = 1;
- return c;
-}
-
-/* String only version of __srefill_r for sscanf family. */
-int
-_DEFUN(__ssrefill_r, (ptr, fp),
- struct _reent * ptr _AND
- register FILE * fp)
-{
- /* Our only hope of further input is the ungetc buffer.
- If there is anything in that buffer to read, return. */
- if (HASUB (fp))
- {
- FREEUB (ptr, fp);
- if ((fp->_r = fp->_ur) != 0)
- {
- fp->_p = fp->_up;
- return 0;
- }
- }
-
- /* Otherwise we are out of character input. */
- fp->_p = fp->_bf._base;
- fp->_r = 0;
- fp->_flags |= __SEOF;
- return EOF;
-}
-
-#else
-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. */
-
-int
-_DEFUN(__SVFSCANF_R, (rptr, fp, fmt0, ap),
- struct _reent *rptr _AND
- register FILE *fp _AND
- char _CONST *fmt0 _AND
- va_list ap)
-{
- register u_char *fmt = (u_char *) fmt0;
- register int c; /* Character from format, or conversion. */
- register char *p; /* Points into all kinds of strings. */
- char ccltab[256]; /* Character class table for %[...]. */
-
- int ret;
- char *cp;
-
- struct _scan_data_t scan_data;
- int (*scan_func)(struct _reent*, struct _scan_data_t*, FILE *, va_list *);
-
- _newlib_flockfile_start (fp);
-
- scan_data.nassigned = 0;
- scan_data.nread = 0;
- scan_data.ccltab = ccltab;
- scan_data.pfn_ungetc = _ungetc_r;
- scan_data.pfn_refill = __srefill_r;
-
- for (;;)
- {
- if (*fmt == 0)
- goto all_done;
-
- if (isspace (*fmt))
- {
- while ((fp->_r > 0 || !scan_data.pfn_refill(rptr, fp))
- && isspace (*fp->_p))
- {
- scan_data.nread++;
- fp->_r--;
- fp->_p++;
- }
- fmt++;
- continue;
- }
- if ((c = *fmt++) != '%')
- goto literal;
-
- scan_data.width = 0;
- scan_data.flags = 0;
-
- if (*fmt == '*')
- {
- scan_data.flags |= SUPPRESS;
- fmt++;
- }
-
- for (; is_digit (*fmt); fmt++)
- scan_data.width = 10 * scan_data.width + to_digit (*fmt);
-
- /* The length modifiers. */
- p = "hlL";
- if ((cp = memchr (p, *fmt, 3)) != NULL) {
- scan_data.flags |= (SHORT << (cp - p));
- fmt++;
- }
-
- /* Switch on the format. continue if done; break once format
- type is derived. */
- c = *fmt++;
- switch (c)
- {
- case '%':
- literal:
- if ((fp->_r <= 0 && scan_data.pfn_refill(rptr, fp)))
- goto input_failure;
- if (*fp->_p != c)
- goto match_failure;
- fp->_r--, fp->_p++;
- scan_data.nread++;
- continue;
-
- case 'p':
- scan_data.flags |= POINTER;
- case 'x':
- scan_data.flags |= PFXOK;
- scan_data.base = 16;
- goto number;
- case 'd':
- case 'u':
- scan_data.base = 10;
- goto number;
- case 'i':
- scan_data.base = 0;
- goto number;
- case 'o':
- scan_data.base = 8;
- number:
- scan_data.code = (c < 'o') ? CT_INT : CT_UINT;
- break;
-
- case '[':
- fmt = (u_char *) __sccl (ccltab, (unsigned char *) fmt);
- scan_data.flags |= NOSKIP;
- scan_data.code = CT_CCL;
- break;
- case 'c':
- scan_data.flags |= NOSKIP;
- scan_data.code = CT_CHAR;
- break;
- case 's':
- scan_data.code = CT_STRING;
- break;
-
- case 'n':
- if (scan_data.flags & SUPPRESS) /* ??? */
- continue;
-
- if (scan_data.flags & SHORT)
- *GET_ARG (N, ap, short *) = scan_data.nread;
- else if (scan_data.flags & LONG)
- *GET_ARG (N, ap, long *) = scan_data.nread;
- else
- *GET_ARG (N, ap, int *) = scan_data.nread;
-
- continue;
-
- /* Disgusting backwards compatibility hacks. XXX. */
- case '\0': /* compat. */
- _newlib_flockfile_exit (fp);
- return EOF;
-
-#ifdef FLOATING_POINT
- case 'e':
- case 'f':
- case 'g':
- scan_data.code = CT_FLOAT;
- break;
-#endif
- default: /* compat. */
- scan_data.code = CT_INT;
- scan_data.base = 10;
- break;
- }
-
- /* We have a conversion that requires input. */
- if ((fp->_r <= 0 && scan_data.pfn_refill (rptr, fp)))
- goto input_failure;
-
- /* Consume leading white space, except for formats that
- suppress this. */
- if ((scan_data.flags & NOSKIP) == 0)
- {
- while (isspace (*fp->_p))
- {
- scan_data.nread++;
- if (--fp->_r > 0)
- fp->_p++;
- else if (scan_data.pfn_refill (rptr, fp))
- goto input_failure;
- }
- /* Note that there is at least one character in the
- buffer, so conversions that do not set NOSKIP ca
- no longer result in an input failure. */
- }
- ret = 0;
- if (scan_data.code < CT_INT)
- ret = _scanf_chars (rptr, &scan_data, fp, &ap);
- else if (scan_data.code < CT_FLOAT)
- ret = _scanf_i (rptr, &scan_data, fp, &ap);
-#ifdef FLOATING_POINT
- else if (_scanf_float)
- ret = _scanf_float (rptr, &scan_data, fp, &ap);
-#endif
-
- if (ret == MATCH_FAILURE)
- goto match_failure;
- else if (ret == INPUT_FAILURE)
- goto input_failure;
- }
-input_failure:
- /* On read failure, return EOF failure regardless of matches; errno
- should have been set prior to here. On EOF failure (including
- invalid format string), return EOF if no matches yet, else number
- of matches made prior to failure. */
- _newlib_flockfile_exit (fp);
- return scan_data.nassigned && !(fp->_flags & __SERR) ? scan_data.nassigned
- : EOF;
-match_failure:
-all_done:
- /* Return number of matches, which can be 0 on match failure. */
- _newlib_flockfile_end (fp);
- return scan_data.nassigned;
-}
-
-#ifdef STRING_ONLY
-int
-_EXFUN(__ssvfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("__ssvfscanf_r"))));
-#else
-int
-_EXFUN(__svfiscanf_r, (struct _reent *, FILE *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("__svfscanf_r"))));
-#endif
-
diff --git a/newlib/libc/stdio/nano-vfscanf_float.c b/newlib/libc/stdio/nano-vfscanf_float.c
deleted file mode 100644
index a81fe7f70..000000000
--- a/newlib/libc/stdio/nano-vfscanf_float.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#include <_ansi.h>
-#include <reent.h>
-#include <newlib.h>
-#include <ctype.h>
-#include <wctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <wchar.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include "local.h"
-#include "../stdlib/local.h"
-#include "nano-vfscanf_local.h"
-
-#ifdef FLOATING_POINT
-int
-_scanf_float (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap)
-{
- int c;
- char *p;
- float *flp;
- _LONG_DOUBLE *ldp;
-
- /* Scan a floating point number as if by strtod. */
- /* This code used to assume that the number of digits is reasonable.
- However, ANSI / ISO C makes no such stipulation; we have to get
- exact results even when there is an unreasonable amount of leading
- zeroes. */
- long leading_zeroes = 0;
- long zeroes, exp_adjust;
- char *exp_start = NULL;
- unsigned width_left = 0;
- char nancount = 0;
- char infcount = 0;
-#ifdef hardway
- if (pdata->width == 0 || pdata->width > BUF - 1)
-#else
- /* size_t is unsigned, hence this optimisation. */
- if (pdata->width - 1 > BUF - 2)
-#endif
- {
- width_left = pdata->width - (BUF - 1);
- pdata->width = BUF - 1;
- }
- pdata->flags |= SIGNOK | NDIGITS | DPTOK | EXPOK;
- zeroes = 0;
- exp_adjust = 0;
- for (p = pdata->buf; pdata->width; )
- {
- c = *fp->_p;
- /* This code mimicks the integer conversion code,
- but is much simpler. */
- switch (c)
- {
- case '0':
- if (pdata->flags & NDIGITS)
- {
- pdata->flags &= ~SIGNOK;
- zeroes++;
- if (width_left)
- {
- width_left--;
- pdata->width++;
- }
- goto fskip;
- }
- /* Fall through. */
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- if (nancount + infcount == 0)
- {
- pdata->flags &= ~(SIGNOK | NDIGITS);
- goto fok;
- }
- break;
-
- case '+':
- case '-':
- if (pdata->flags & SIGNOK)
- {
- pdata->flags &= ~SIGNOK;
- goto fok;
- }
- break;
- case 'n':
- case 'N':
- if (nancount == 0 && zeroes == 0
- && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) ==
- (NDIGITS | DPTOK | EXPOK))
- {
- pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS);
- nancount = 1;
- goto fok;
- }
- if (nancount == 2)
- {
- nancount = 3;
- goto fok;
- }
- if (infcount == 1 || infcount == 4)
- {
- infcount++;
- goto fok;
- }
- break;
- case 'a':
- case 'A':
- if (nancount == 1)
- {
- nancount = 2;
- goto fok;
- }
- break;
- case 'i':
- case 'I':
- if (infcount == 0 && zeroes == 0
- && (pdata->flags & (NDIGITS | DPTOK | EXPOK)) ==
- (NDIGITS | DPTOK | EXPOK))
- {
- pdata->flags &= ~(SIGNOK | DPTOK | EXPOK | NDIGITS);
- infcount = 1;
- goto fok;
- }
- if (infcount == 3 || infcount == 5)
- {
- infcount++;
- goto fok;
- }
- break;
- case 'f':
- case 'F':
- if (infcount == 2)
- {
- infcount = 3;
- goto fok;
- }
- break;
- case 't':
- case 'T':
- if (infcount == 6)
- {
- infcount = 7;
- goto fok;
- }
- break;
- case 'y':
- case 'Y':
- if (infcount == 7)
- {
- infcount = 8;
- goto fok;
- }
- break;
- case '.':
- if (pdata->flags & DPTOK)
- {
- pdata->flags &= ~(SIGNOK | DPTOK);
- leading_zeroes = zeroes;
- goto fok;
- }
- break;
- case 'e':
- case 'E':
- /* No exponent without some digits. */
- if ((pdata->flags & (NDIGITS | EXPOK)) == EXPOK
- || ((pdata->flags & EXPOK) && zeroes))
- {
- if (! (pdata->flags & DPTOK))
- {
- exp_adjust = zeroes - leading_zeroes;
- exp_start = p;
- }
- pdata->flags =
- (pdata->flags & ~(EXPOK | DPTOK)) | SIGNOK | NDIGITS;
- zeroes = 0;
- goto fok;
- }
- break;
- }
- break;
-fok:
- *p++ = c;
-fskip:
- pdata->width--;
- ++pdata->nread;
- if (--fp->_r > 0)
- fp->_p++;
- else if (pdata->pfn_refill (rptr, fp))
- /* "EOF". */
- break;
- }
- if (zeroes)
- pdata->flags &= ~NDIGITS;
- /* We may have a 'N' or possibly even [sign] 'N' 'a' as the
- start of 'NaN', only to run out of chars before it was
- complete (or having encountered a non-matching char). So
- check here if we have an outstanding nancount, and if so
- put back the chars we did swallow and treat as a failed
- match.
-
- FIXME - we still don't handle NAN([0xdigits]). */
- if (nancount - 1U < 2U)
- {
- /* "nancount && nancount < 3". */
- /* Newlib's ungetc works even if we called __srefill in
- the middle of a partial parse, but POSIX does not
- guarantee that in all implementations of ungetc. */
- while (p > pdata->buf)
- {
- pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+nNaA]". */
- --pdata->nread;
- }
- return MATCH_FAILURE;
- }
- /* Likewise for 'inf' and 'infinity'. But be careful that
- 'infinite' consumes only 3 characters, leaving the stream
- at the second 'i'. */
- if (infcount - 1U < 7U)
- {
- /* "infcount && infcount < 8". */
- if (infcount >= 3) /* valid 'inf', but short of 'infinity'. */
- while (infcount-- > 3)
- {
- pdata->pfn_ungetc (rptr, *--p, fp); /* "[iInNtT]". */
- --pdata->nread;
- }
- else
- {
- while (p > pdata->buf)
- {
- pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+iInN]". */
- --pdata->nread;
- }
- return MATCH_FAILURE;
- }
- }
- /* If no digits, might be missing exponent digits
- (just give back the exponent) or might be missing
- regular digits, but had sign and/or decimal point. */
- if (pdata->flags & NDIGITS)
- {
- if (pdata->flags & EXPOK)
- {
- /* No digits at all. */
- while (p > pdata->buf)
- {
- pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+.]". */
- --pdata->nread;
- }
- return MATCH_FAILURE;
- }
- /* Just a bad exponent (e and maybe sign). */
- c = *--p;
- --pdata->nread;
- if (c != 'e' && c != 'E')
- {
- pdata->pfn_ungetc (rptr, c, fp); /* "[-+]". */
- c = *--p;
- --pdata->nread;
- }
- pdata->pfn_ungetc (rptr, c, fp); /* "[eE]". */
- }
- if ((pdata->flags & SUPPRESS) == 0)
- {
- double fp;
- long new_exp = 0;
-
- *p = 0;
- if ((pdata->flags & (DPTOK | EXPOK)) == EXPOK)
- {
- exp_adjust = zeroes - leading_zeroes;
- new_exp = -exp_adjust;
- exp_start = p;
- }
- else if (exp_adjust)
- new_exp = _strtol_r (rptr, (exp_start + 1), NULL, 10) - exp_adjust;
-
- if (exp_adjust)
- {
- /* If there might not be enough space for the new exponent,
- truncate some trailing digits to make room. */
- if (exp_start >= pdata->buf + BUF - MAX_LONG_LEN)
- exp_start = pdata->buf + BUF - MAX_LONG_LEN - 1;
- sprintf (exp_start, "e%ld", new_exp);
- }
-
- /* Current _strtold routine is markedly slower than
- _strtod_r. Only use it if we have a long double
- result. */
- fp = _strtod_r (rptr, pdata->buf, NULL);
-
- /* Do not support long double. */
- if (pdata->flags & LONG)
- *GET_ARG (N, *ap, double *) = fp;
- else if (pdata->flags & LONGDBL)
- {
- ldp = GET_ARG (N, *ap, _LONG_DOUBLE *);
- *ldp = fp;
- }
- else
- {
- flp = GET_ARG (N, *ap, float *);
- if (isnan (fp))
- *flp = nanf (NULL);
- else
- *flp = fp;
- }
- pdata->nassigned++;
- }
- return 0;
-}
-#endif
-
diff --git a/newlib/libc/stdio/nano-vfscanf_i.c b/newlib/libc/stdio/nano-vfscanf_i.c
deleted file mode 100644
index aba74b0d8..000000000
--- a/newlib/libc/stdio/nano-vfscanf_i.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <_ansi.h>
-#include <reent.h>
-#include <newlib.h>
-#include <ctype.h>
-#include <wctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <limits.h>
-#include <wchar.h>
-#include <string.h>
-#include <stdarg.h>
-#include <errno.h>
-#include "local.h"
-#include "../stdlib/local.h"
-
-#include "nano-vfscanf_local.h"
-
-int
-_scanf_chars (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap)
-{
- int n;
- char *p;
-
- if (pdata->width == 0)
- pdata->width = (pdata->code == CT_CHAR) ? 1 : (size_t)~0;
-
- n = 0;
- if ((pdata->flags & SUPPRESS) == 0)
- p = GET_ARG (N, *ap, char *);
-
- /* It's impossible to have EOF when we get here. */
- while ((pdata->code == CT_CHAR)
- || (pdata->code == CT_CCL && pdata->ccltab[*fp->_p])
- || (pdata->code == CT_STRING && !isspace (*fp->_p)))
- {
- n++;
- if ((pdata->flags & SUPPRESS) == 0)
- *p++ = *fp->_p;
-
- fp->_r--, fp->_p++;
- if (--pdata->width == 0)
- break;
-
- if ((fp->_r <= 0 && pdata->pfn_refill (rptr, fp)))
- break;
- }
- /* For CT_CHAR, it is impossible to have input_failure(n == 0) here.
- For CT_CCL, it is impossible to have input_failure here.
- For CT_STRING, it is possible to have empty string. */
- if (n == 0 && pdata->code == CT_CCL)
- return MATCH_FAILURE;
-
- if ((pdata->flags & SUPPRESS) == 0)
- {
- pdata->nassigned++;
- if (pdata->code != CT_CHAR)
- *p = 0;
- }
- pdata->nread += n;
- return 0;
-}
-int
-_scanf_i (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap)
-{
-#define CCFN_PARAMS _PARAMS((struct _reent *, const char *, char **, int))
- /* Conversion function (strtol/strtoul). */
- u_long (*ccfn)CCFN_PARAMS=0;
- char *p;
- int n;
- char *xdigits = "A-Fa-f8901234567]";
- char *prefix_chars[3] = {"+-", "00", "xX"};
-
- /* Scan an integer as if by strtol/strtoul. */
- unsigned width_left = 0;
- int skips = 0;
-
- ccfn = (pdata->code == CT_INT) ? (u_long (*)CCFN_PARAMS)_strtol_r : _strtoul_r;
-#ifdef hardway
- if (pdata->width == 0 || pdata->width > BUF - 1)
-#else
- /* size_t is unsigned, hence this optimisation. */
- if (pdata->width - 1 > BUF - 2)
-#endif
- {
- width_left = pdata->width - (BUF - 1);
- pdata->width = BUF - 1;
- }
- p = pdata->buf;
- pdata->flags |= NDIGITS | NZDIGITS | NNZDIGITS;
-
- /* Process [sign] [0] [xX] prefixes sequently. */
- for (n = 0; n < 3; n++)
- {
- if (!memchr (prefix_chars[n], *fp->_p, 2))
- continue;
-
- if (n == 1)
- {
- if (pdata->base == 0)
- {
- pdata->base = 8;
- pdata->flags |= PFXOK;
- }
- pdata->flags &= ~(NZDIGITS | NDIGITS);
- }
- else if (n == 2)
- {
- if ((pdata->flags & (PFXOK | NZDIGITS)) != PFXOK)
- continue;
- pdata->base = 16;
-
- /* We must reset the NZDIGITS and NDIGITS
- flags that would have been unset by seeing
- the zero that preceded the X or x.
-
- ??? It seems unnecessary to reset the NZDIGITS. */
- pdata->flags |= NDIGITS;
- }
- if (pdata->width-- > 0)
- {
- *p++ = *fp->_p++;
- fp->_r--;
- if ((fp->_r <= 0 && pdata->pfn_refill (rptr, fp)))
- goto match_end;
- }
- }
-
- if (pdata->base == 0)
- pdata->base = 10;
-
- /* The check is un-necessary if xdigits points to exactly the string:
- "A-Fa-f8901234567]". The code is kept only for reading's sake. */
-#if 0
- if (pdata->base != 16)
-#endif
- xdigits = xdigits + 16 - pdata->base;
-
- /* Initilize ccltab according to pdata->base. */
- __sccl (pdata->ccltab, (unsigned char *) xdigits);
- for (; pdata->width; pdata->width--)
- {
- n = *fp->_p;
- if (pdata->ccltab[n] == 0)
- break;
- else if (n == '0' && (pdata->flags & NNZDIGITS))
- {
- ++skips;
- if (width_left)
- {
- width_left--;
- pdata->width++;
- }
- goto skip;
- }
- pdata->flags &= ~(NDIGITS | NNZDIGITS);
- /* Char is legal: store it and look at the next. */
- *p++ = *fp->_p;
-skip:
- if (--fp->_r > 0)
- fp->_p++;
- else if (pdata->pfn_refill (rptr, fp))
- /* "EOF". */
- break;
- }
- /* If we had only a sign, it is no good; push back the sign.
- If the number ends in `x', it was [sign] '0' 'x', so push back
- the x and treat it as [sign] '0'.
- Use of ungetc here and below assumes ASCII encoding; we are only
- pushing back 7-bit characters, so casting to unsigned char is
- not necessary. */
-match_end:
- if (pdata->flags & NDIGITS)
- {
- if (p > pdata->buf)
- pdata->pfn_ungetc (rptr, *--p, fp); /* "[-+xX]". */
-
- if (p == pdata->buf)
- return MATCH_FAILURE;
- }
- if ((pdata->flags & SUPPRESS) == 0)
- {
- u_long ul;
- *p = 0;
- ul = (*ccfn) (rptr, pdata->buf, (char **) NULL, pdata->base);
- if (pdata->flags & POINTER)
- *GET_ARG (N, *ap, void **) = (void *) (uintptr_t) ul;
- else if (pdata->flags & SHORT)
- *GET_ARG (N, *ap, short *) = ul;
- else if (pdata->flags & LONG)
- *GET_ARG (N, *ap, long *) = ul;
- else
- *GET_ARG (N, *ap, int *) = ul;
-
- pdata->nassigned++;
- }
- pdata->nread += p - pdata->buf + skips;
- return 0;
-}
-
diff --git a/newlib/libc/stdio/nano-vfscanf_local.h b/newlib/libc/stdio/nano-vfscanf_local.h
deleted file mode 100644
index 7fbd964ed..000000000
--- a/newlib/libc/stdio/nano-vfscanf_local.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley. The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-/*
- * Copyright (c) 2012-2014 ARM Ltd
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the company may not be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef VFSCANF_LOCAL
-#define VFSCANF_LOCAL
-
-#ifndef NO_FLOATING_POINT
-#define FLOATING_POINT
-#endif
-
-#ifdef STRING_ONLY
-#undef _newlib_flockfile_start
-#undef _newlib_flockfile_exit
-#undef _newlib_flockfile_end
-#define _newlib_flockfile_start(x) {}
-#define _newlib_flockfile_exit(x) {}
-#define _newlib_flockfile_end(x) {}
-#define _ungetc_r _sungetc_r
-#define __srefill_r __ssrefill_r
-#endif
-
-#ifdef FLOATING_POINT
-#include <math.h>
-#include <float.h>
-
-/* Currently a test is made to see if long double processing is warranted.
- This could be changed in the future should the _ldtoa_r code be
- preferred over _dtoa_r. */
-#define _NO_LONGDBL
-
-#include "floatio.h"
-
-#if ((MAXEXP+MAXFRACT+3) > MB_LEN_MAX)
-/* "3 = sign + decimal point + NUL". */
-# define BUF (MAXEXP+MAXFRACT+3)
-#else
-# define BUF MB_LEN_MAX
-#endif
-
-/* An upper bound for how long a long prints in decimal. 4 / 13 approximates
- log (2). Add one char for roundoff compensation and one for the sign. */
-#define MAX_LONG_LEN ((CHAR_BIT * sizeof (long) - 1) * 4 / 13 + 2)
-#else
-#define BUF 40
-#endif
-
-
-#define _NO_LONGLONG
-#undef _WANT_IO_C99_FORMATS
-#undef _WANT_IO_POS_ARGS
-
-#define _NO_POS_ARGS
-
-/* Macros for converting digits to letters and vice versa. */
-#define to_digit(c) ((c) - '0')
-#define is_digit(c) ((unsigned)to_digit (c) <= 9)
-#define to_char(n) ((n) + '0')
-
-/*
- * Flags used during conversion.
- */
-
-#define SHORT 0x01 /* "h": short. */
-#define LONG 0x02 /* "l": long or double. */
-#define LONGDBL 0x04 /* "L/ll": long double or long long. */
-#define CHAR 0x08 /* "hh": 8 bit integer. */
-#define SUPPRESS 0x10 /* Suppress assignment. */
-#define POINTER 0x20 /* Weird %p pointer (`fake hex'). */
-#define NOSKIP 0x40 /* Do not skip blanks */
-
-/* The following are used in numeric conversions only:
- SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point;
- SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral. */
-
-#define SIGNOK 0x80 /* "+/-" is (still) legal. */
-#define NDIGITS 0x100 /* No digits detected. */
-
-#define DPTOK 0x200 /* (Float) decimal point is still legal. */
-#define EXPOK 0x400 /* (Float) exponent (e+3, etc) still legal. */
-
-#define PFXOK 0x200 /* "0x" prefix is (still) legal. */
-#define NZDIGITS 0x400 /* No zero digits detected. */
-#define NNZDIGITS 0x800 /* No non-zero digits detected. */
-
-/* Conversion types. */
-
-#define CT_CHAR 0 /* "%c" conversion. */
-#define CT_CCL 1 /* "%[...]" conversion. */
-#define CT_STRING 2 /* "%s" conversion. */
-#define CT_INT 3 /* Integer, i.e., strtol. */
-#define CT_UINT 4 /* Unsigned integer, i.e., strtoul. */
-#define CT_FLOAT 5 /* Floating, i.e., strtod. */
-
-#define u_char unsigned char
-#define u_long unsigned long
-
-/* Macro to support positional arguments. */
-#define GET_ARG(n, ap, type) (va_arg ((ap), type))
-
-#define MATCH_FAILURE 1
-#define INPUT_FAILURE 2
-
-
-/* All data needed to decode format string are kept in below struct. */
-struct _scan_data_t
-{
- int flags; /* Flags. */
- int base; /* Base. */
- size_t width; /* Width. */
- int nassigned; /* Number of assignments so far. */
- int nread; /* Number of chars read so far. */
- char *ccltab; /* Table used for [ format. */
- int code; /* Current conversion specifier. */
- char buf[BUF]; /* Internal buffer for scan. */
- /* Internal buffer for scan. */
- int (*pfn_ungetc)(struct _reent*, int, FILE*);
- /* Internal buffer for scan. */
- int (*pfn_refill)(struct _reent*, FILE*);
-};
-
-extern int
-_scanf_chars (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap);
-extern int
-_scanf_i (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap);
-/* Make _scanf_float weak symbol, so it won't be linked in if target program
- does not need it. */
-extern int
-_scanf_float (struct _reent *rptr,
- struct _scan_data_t *pdata,
- FILE *fp, va_list *ap) _ATTRIBUTE((__weak__));
-
-#endif
diff --git a/newlib/libc/stdio/open_memstream.c b/newlib/libc/stdio/open_memstream.c
index 5de99474d..e33063b7c 100644
--- a/newlib/libc/stdio/open_memstream.c
+++ b/newlib/libc/stdio/open_memstream.c
@@ -355,7 +355,6 @@ _DEFUN(internal_open_memstream_r, (ptr, buf, size, wide),
c->storage = c;
c->pbuf = buf;
c->psize = size;
- c->pos = 0;
c->eof = 0;
c->saved.w = L'\0';
c->wide = (int8_t) wide;
diff --git a/newlib/libc/stdio/printf.c b/newlib/libc/stdio/printf.c
index d5dedf906..b9fd6a498 100644
--- a/newlib/libc/stdio/printf.c
+++ b/newlib/libc/stdio/printf.c
@@ -37,12 +37,6 @@ _DEFUN(_printf_r, (ptr, fmt),
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_iprintf_r, (struct _reent *, const char *, ...)
- _ATTRIBUTE ((__alias__("_printf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -60,9 +54,4 @@ _DEFUN(printf, (fmt),
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(iprintf, (const char *, ...)
- _ATTRIBUTE ((__alias__("printf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/putwc_u.c b/newlib/libc/stdio/putwc_u.c
deleted file mode 100644
index bb71acc2a..000000000
--- a/newlib/libc/stdio/putwc_u.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define _GNU_SOURCE
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-#undef putwc_unlocked
-
-wint_t
-_DEFUN(_putwc_unlocked_r, (ptr, wc, fp),
- struct _reent *ptr _AND
- wchar_t wc _AND
- FILE *fp)
-{
- return _fputwc_unlocked_r (ptr, wc, fp);
-}
-/*
- * Synonym for fputwc_unlocked(). The only difference is that putwc_unlocked(),
- * if it is a macro, may evaluate `fp' more than once.
- */
-wint_t
-_DEFUN(putwc_unlocked, (wc, fp),
- wchar_t wc _AND
- FILE *fp)
-{
- return fputwc_unlocked (wc, fp);
-}
diff --git a/newlib/libc/stdio/putwchar.c b/newlib/libc/stdio/putwchar.c
index cdd254217..fcb0a7dba 100644
--- a/newlib/libc/stdio/putwchar.c
+++ b/newlib/libc/stdio/putwchar.c
@@ -26,65 +26,34 @@
/*
FUNCTION
-<<putwchar>>, <<putwchar_unlocked>>---write a wide character to standard output
+<<putwchar>>---write a wide character to standard output
INDEX
putwchar
INDEX
- putwchar_unlocked
-INDEX
_putwchar_r
-INDEX
- _putwchar_unlocked_r
ANSI_SYNOPSIS
#include <wchar.h>
wint_t putwchar(wchar_t <[wc]>);
- #include <wchar.h>
- wint_t putwchar_unlocked(wchar_t <[wc]>);
-
- #include <wchar.h>
wint_t _putwchar_r(struct _reent *<[reent]>, wchar_t <[wc]>);
- #include <wchar.h>
- wint_t _putwchar_unlocked_r(struct _reent *<[reent]>, wchar_t <[wc]>);
-
TRAD_SYNOPSIS
#include <wchar.h>
wint_t putwchar(<[wc]>)
wchar_t <[wc]>;
- #include <wchar.h>
- wint_t putwchar_unlocked(<[wc]>)
- wchar_t <[wc]>;
-
- #include <wchar.h>
wint_t _putwchar_r(<[reent]>, <[wc]>)
struct _reent *<[reent]>;
wchar_t <[wc]>;
- #include <wchar.h>
- wint_t _putwchar_unlocked_r(<[reent]>, <[wc]>)
- struct _reent *<[reent]>;
- wchar_t <[wc]>;
-
DESCRIPTION
The <<putwchar>> function or macro is the wide-character equivalent of
the <<putchar>> function. It writes the wide character wc to stdout.
-<<putwchar_unlocked>> is a non-thread-safe version of <<putwchar>>.
-<<putwchar_unlocked>> may only safely be used within a scope
-protected by flockfile() (or ftrylockfile()) and funlockfile(). This
-function may safely be used in a multi-threaded program if and only
-if they are called while the invoking thread owns the (FILE *)
-object, as is the case after a successful call to the flockfile() or
-ftrylockfile() functions. If threads are disabled, then
-<<putwchar_unlocked>> is equivalent to <<putwchar>>.
-
-The alternate functions <<_putwchar_r>> and <<_putwchar_unlocked_r>> are
-reentrant versions of the above. The extra argument <[reent]> is a pointer
-to a reentrancy structure.
+The alternate function <<_putwchar_r>> is a reentrant version. The
+extra argument <[reent]> is a pointer to a reentrancy structure.
RETURNS
If successful, <<putwchar>> returns its argument <[wc]>. If an error
@@ -92,9 +61,7 @@ intervenes, the result is <<EOF>>. You can use `<<ferror(stdin)>>' to
query for errors.
PORTABILITY
-<<putwchar>> is required by C99.
-
-<<putwchar_unlocked>> is a GNU extension.
+C99
*/
#include <_ansi.h>
diff --git a/newlib/libc/stdio/putwchar_u.c b/newlib/libc/stdio/putwchar_u.c
deleted file mode 100644
index 3235472a2..000000000
--- a/newlib/libc/stdio/putwchar_u.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2014 Red Hat, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#define _GNU_SOURCE
-#include <_ansi.h>
-#include <reent.h>
-#include <stdio.h>
-#include <wchar.h>
-#include "local.h"
-
-#undef putwchar_unlocked
-
-wint_t
-_DEFUN(_putwchar_unlocked_r, (ptr, wc),
- struct _reent *ptr _AND
- wchar_t wc)
-{
- return _fputwc_unlocked_r (ptr, wc, stdout);
-}
-
-/*
- * Synonym for fputwc_unlocked(wc, stdout).
- */
-wint_t
-_DEFUN(putwchar_unlocked, (wc),
- wchar_t wc)
-{
- _REENT_SMALL_CHECK_INIT (_REENT);
- return fputwc_unlocked (wc, stdout);
-}
diff --git a/newlib/libc/stdio/scanf.c b/newlib/libc/stdio/scanf.c
index 23e97b83d..84992a558 100644
--- a/newlib/libc/stdio/scanf.c
+++ b/newlib/libc/stdio/scanf.c
@@ -51,12 +51,6 @@ scanf(fmt, va_alist)
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(iscanf, (const char *, ...)
- _ATTRIBUTE ((__alias__("scanf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -83,8 +77,3 @@ _scanf_r(ptr, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_iscanf_r, (struct _reent *, const char *, ...)
- _ATTRIBUTE ((__alias__("_scanf_r"))));
-#endif
diff --git a/newlib/libc/stdio/snprintf.c b/newlib/libc/stdio/snprintf.c
index d2408b2f0..c95e026d5 100644
--- a/newlib/libc/stdio/snprintf.c
+++ b/newlib/libc/stdio/snprintf.c
@@ -72,12 +72,6 @@ _snprintf_r(ptr, str, size, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_sniprintf_r, (struct _reent *, char *, size_t, const char *, ...)
- _ATTRIBUTE ((__alias__("_snprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -122,9 +116,4 @@ snprintf(str, size, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(sniprintf, (char *, size_t, const char *, ...)
- _ATTRIBUTE ((__alias__("snprintf"))));
-#endif
#endif
diff --git a/newlib/libc/stdio/sprintf.c b/newlib/libc/stdio/sprintf.c
index c3be9b1d2..65dcc0fde 100644
--- a/newlib/libc/stdio/sprintf.c
+++ b/newlib/libc/stdio/sprintf.c
@@ -608,12 +608,6 @@ _sprintf_r(ptr, str, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_siprintf_r, (struct _reent *, char *, const char *, ...)
- _ATTRIBUTE ((__alias__("_sprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -647,9 +641,4 @@ sprintf(str, fmt, va_alist)
return (ret);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(siprintf, (char *, const char *, ...)
- _ATTRIBUTE ((__alias__("sprintf"))));
-#endif
#endif
diff --git a/newlib/libc/stdio/sscanf.c b/newlib/libc/stdio/sscanf.c
index a32ce5d27..e08002ea2 100644
--- a/newlib/libc/stdio/sscanf.c
+++ b/newlib/libc/stdio/sscanf.c
@@ -430,12 +430,6 @@ sscanf(str, fmt, va_alist)
return ret;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(siscanf, (const char *, const char *, ...)
- _ATTRIBUTE ((__alias__("sscanf"))));
-#endif
-
#endif /* !_REENT_ONLY */
#ifdef _HAVE_STDC
@@ -473,9 +467,3 @@ _sscanf_r(ptr, str, fmt, va_alist)
va_end (ap);
return ret;
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_siscanf_r, (struct _reent *, const char *, const char *, ...)
- _ATTRIBUTE ((__alias__("_sscanf_r"))));
-#endif
diff --git a/newlib/libc/stdio/stdio.tex b/newlib/libc/stdio/stdio.tex
index 363efd48d..2088d74ed 100644
--- a/newlib/libc/stdio/stdio.tex
+++ b/newlib/libc/stdio/stdio.tex
@@ -50,7 +50,6 @@ structure.
* fread:: Read array elements from a file
* freopen:: Open a file using an existing file descriptor
* fseek:: Set file position
-* __fsetlocking:: Set or query locking mode on FILE stream
* fsetpos:: Restore position of a stream or file
* ftell:: Return position in a stream or file
* funopen:: Open a stream with custom callbacks
@@ -86,7 +85,6 @@ structure.
* siscanf:: Scan and format input (integer only)
* sprintf:: Write formatted output
* sscanf:: Scan and format input
-* stdio_ext:: Access internals of FILE structure
* swprintf:: Write formatted wide character output
* swscanf:: Scan and format wide character input
* tmpfile:: Create a temporary file
@@ -180,9 +178,6 @@ structure.
@include stdio/fseek.def
@page
-@include stdio/fsetlocking.def
-
-@page
@include stdio/fsetpos.def
@page
@@ -288,9 +283,6 @@ structure.
@include stdio/sscanf.def
@page
-@include stdio/stdio_ext.def
-
-@page
@include stdio/swprintf.def
@page
diff --git a/newlib/libc/stdio/stdio_ext.c b/newlib/libc/stdio/stdio_ext.c
deleted file mode 100644
index 588209d18..000000000
--- a/newlib/libc/stdio/stdio_ext.c
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-FUNCTION
-<<stdio_ext>>,<<__fbufsize>>,<<__fpending>>,<<__flbf>>,<<__freadable>>,<<__fwritable>>,<<__freading>>,<<__fwriting>>---access internals of FILE structure
-
-INDEX
- __fbufsize
-INDEX
- __fpending
-INDEX
- __flbf
-INDEX
- __freadable
-INDEX
- __fwritable
-INDEX
- __freading
-INDEX
- __fwriting
-
-ANSI_SYNOPSIS
- #include <stdio.h>
- #include <stdio_ext.h>
- size_t __fbufsize(FILE *<[fp]>);
- size_t __fpending(FILE *<[fp]>);
- int __flbf(FILE *<[fp]>);
- int __freadable(FILE *<[fp]>);
- int __fwritable(FILE *<[fp]>);
- int __freading(FILE *<[fp]>);
- int __fwriting(FILE *<[fp]>);
-
-DESCRIPTION
-These functions provides access to the internals of the FILE structure <[fp]>.
-
-RETURNS
-<<__fbufsize>> returns the number of bytes in the buffer of stream <[fp]>.
-
-<<__fpending>> returns the number of bytes in the output buffer of stream <[fp]>.
-
-<<__flbf>> returns nonzero if stream <[fp]> is line-buffered, and <<0>> if not.
-
-<<__freadable>> returns nonzero if stream <[fp]> may be read, and <<0>> if not.
-
-<<__fwritable>> returns nonzero if stream <[fp]> may be written, and <<0>> if not.
-
-<<__freading>> returns nonzero if stream <[fp]> if the last operation on
-it was a read, or if it read-only, and <<0>> if not.
-
-<<__fwriting>> returns nonzero if stream <[fp]> if the last operation on
-it was a write, or if it write-only, and <<0>> if not.
-
-PORTABILITY
-These functions originate from Solaris and are also provided by GNU libc.
-
-No supporting OS subroutines are required.
-*/
-
-#ifndef __rtems__
-
-#include <_ansi.h>
-#include <stdio.h>
-
-/* Subroutine versions of the inline or macro functions. */
-
-size_t
-_DEFUN(__fbufsize, (fp),
- FILE * fp)
-{
- return (size_t) fp->_bf._size;
-}
-
-size_t
-_DEFUN(__fpending, (fp),
- FILE * fp)
-{
- return fp->_p - fp->_bf._base;
-}
-
-int
-_DEFUN(__flbf, (fp),
- FILE * fp)
-{
- return (fp->_flags & __SLBF) != 0;
-}
-
-int
-_DEFUN(__freadable, (fp),
- FILE * fp)
-{
- return (fp->_flags & (__SRD | __SRW)) != 0;
-}
-
-int
-_DEFUN(__fwritable, (fp),
- FILE * fp)
-{
- return (fp->_flags & (__SWR | __SRW)) != 0;
-}
-
-int
-_DEFUN(__freading, (fp),
- FILE * fp)
-{
- return (fp->_flags & __SRD) != 0;
-}
-
-int
-_DEFUN(__fwriting, (fp),
- FILE * fp)
-{
- return (fp->_flags & __SWR) != 0;
-}
-
-#endif /* __rtems__ */
diff --git a/newlib/libc/stdio/vasnprintf.c b/newlib/libc/stdio/vasnprintf.c
index 4cb43ce7a..cab89beff 100644
--- a/newlib/libc/stdio/vasnprintf.c
+++ b/newlib/libc/stdio/vasnprintf.c
@@ -56,13 +56,6 @@ _DEFUN(_vasnprintf_r, (ptr, buf, lenp, fmt, ap),
return (char *) f._bf._base;
}
-#ifdef _NANO_FORMATTED_IO
-char *
-_EXFUN(_vasniprintf_r, (struct _reent*, char *, size_t *,
- const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vasnprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
char *
@@ -75,9 +68,4 @@ _DEFUN(vasnprintf, (buf, lenp, fmt, ap),
return _vasnprintf_r (_REENT, buf, lenp, fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-char *
-_EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vasnprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c
index 5ba817d7b..fbb54cbe8 100644
--- a/newlib/libc/stdio/vasprintf.c
+++ b/newlib/libc/stdio/vasprintf.c
@@ -39,12 +39,6 @@ _DEFUN(vasprintf, (strp, fmt, ap),
return _vasprintf_r (_REENT, strp, fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(vasiprintf, (char **, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vasprintf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -69,9 +63,3 @@ _DEFUN(_vasprintf_r, (ptr, strp, fmt, ap),
}
return ret;
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_vasiprintf_r, (struct _reent *, char **, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vasprintf_r"))));
-#endif
diff --git a/newlib/libc/stdio/vdprintf.c b/newlib/libc/stdio/vdprintf.c
index c295a3959..7e875ac32 100644
--- a/newlib/libc/stdio/vdprintf.c
+++ b/newlib/libc/stdio/vdprintf.c
@@ -33,12 +33,6 @@ _DEFUN(_vdprintf_r, (ptr, fd, format, ap),
return n;
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_vdiprintf_r, (struct _reent *, int, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vdprintf_r"))));
-#endif
-
#ifndef _REENT_ONLY
int
@@ -50,9 +44,4 @@ _DEFUN(vdprintf, (fd, format, ap),
return _vdprintf_r (_REENT, fd, format, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(vdiprintf, (int, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vdprintf"))));
-#endif
#endif /* ! _REENT_ONLY */
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index 5e6c61ca4..dd9c22a6d 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -1521,9 +1521,11 @@ string:
*/
char *p = memchr (cp, 0, prec);
- if (p != NULL)
+ if (p != NULL) {
size = p - cp;
- else
+ if (size > prec)
+ size = prec;
+ } else
size = prec;
} else
size = strlen (cp);
diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c
index 00b8023b7..581efeb2e 100644
--- a/newlib/libc/stdio/vprintf.c
+++ b/newlib/libc/stdio/vprintf.c
@@ -39,11 +39,6 @@ _DEFUN(vprintf, (fmt, ap),
return _vfprintf_r (reent, _stdout_r (reent), fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(viprintf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vprintf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -55,9 +50,3 @@ _DEFUN(_vprintf_r, (ptr, fmt, ap),
_REENT_SMALL_CHECK_INIT (ptr);
return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap);
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_viprintf_r, (struct _reent *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vprintf_r"))));
-#endif
diff --git a/newlib/libc/stdio/vscanf.c b/newlib/libc/stdio/vscanf.c
index 4371e23a7..74b148d44 100644
--- a/newlib/libc/stdio/vscanf.c
+++ b/newlib/libc/stdio/vscanf.c
@@ -40,11 +40,6 @@ _DEFUN(vscanf, (fmt, ap),
return __svfscanf_r (reent, _stdin_r (reent), fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(viscanf, (const char *, __VALIST) _ATTRIBUTE ((__alias__("vscanf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -57,8 +52,3 @@ _DEFUN(_vscanf_r, (ptr, fmt, ap),
return __svfscanf_r (ptr, _stdin_r (ptr), fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_viscanf_r, (struct _reent *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vscanf_r"))));
-#endif
diff --git a/newlib/libc/stdio/vsnprintf.c b/newlib/libc/stdio/vsnprintf.c
index e08f267bd..d9f1e3dfd 100644
--- a/newlib/libc/stdio/vsnprintf.c
+++ b/newlib/libc/stdio/vsnprintf.c
@@ -41,12 +41,6 @@ _DEFUN(vsnprintf, (str, size, fmt, ap),
return _vsnprintf_r (_REENT, str, size, fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vsnprintf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -76,9 +70,3 @@ _DEFUN(_vsnprintf_r, (ptr, str, size, fmt, ap),
*f._p = 0;
return ret;
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_vsniprintf_r, (struct _reent *, char *, size_t, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vsnprintf_r"))));
-#endif
diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c
index 742cde0df..8bc99321e 100644
--- a/newlib/libc/stdio/vsprintf.c
+++ b/newlib/libc/stdio/vsprintf.c
@@ -39,12 +39,6 @@ _DEFUN(vsprintf, (str, fmt, ap),
return _vsprintf_r (_REENT, str, fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(vsiprintf, (char *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vsprintf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -65,9 +59,3 @@ _DEFUN(_vsprintf_r, (ptr, str, fmt, ap),
*f._p = 0;
return ret;
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_vsiprintf_r, (struct _reent *, char *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vsprintf_r"))));
-#endif
diff --git a/newlib/libc/stdio/vsscanf.c b/newlib/libc/stdio/vsscanf.c
index 1660fa1cf..a6d0793b1 100644
--- a/newlib/libc/stdio/vsscanf.c
+++ b/newlib/libc/stdio/vsscanf.c
@@ -43,12 +43,6 @@ _DEFUN(vsscanf, (str, fmt, ap),
return _vsscanf_r (_REENT, str, fmt, ap);
}
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(vsiscanf, (const char *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("vsscanf"))));
-#endif
-
#endif /* !_REENT_ONLY */
int
@@ -69,9 +63,3 @@ _DEFUN(_vsscanf_r, (ptr, str, fmt, ap),
f._file = -1; /* No file. */
return __ssvfscanf_r (ptr, &f, fmt, ap);
}
-
-#ifdef _NANO_FORMATTED_IO
-int
-_EXFUN(_vsiscanf_r, (struct _reent *, const char *, const char *, __VALIST)
- _ATTRIBUTE ((__alias__("_vsscanf_r"))));
-#endif