From 03e039820dc5092e27e81f3671652f25da7f25f1 Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Tue, 12 Mar 2002 01:18:50 +0000 Subject: Swap in the new stdio code. --- libc/stdio/Makefile | 75 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 14 deletions(-) (limited to 'libc/stdio/Makefile') diff --git a/libc/stdio/Makefile b/libc/stdio/Makefile index bbbc46664..c2a557a45 100644 --- a/libc/stdio/Makefile +++ b/libc/stdio/Makefile @@ -24,26 +24,73 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak -MSRC=stdio.c -MOBJ=_stdio_init.o _alloc_stdio_buffer.o _free_stdio_buffer_of_file.o \ - _free_stdio_stream.o clearerr.o feof.o ferror.o fileno.o setbuffer.o \ - setvbuf.o setbuf.o setlinebuf.o fclose.o _fopen.o fopen.o freopen.o \ - fdopen.o fflush.o fsfopen.o fseek.o rewind.o ftell.o fgetpos.o fsetpos.o \ - fputc.o fgetc.o fgets.o gets.o fputs.o puts.o ungetc.o fread.o fwrite.o \ - getchar.o putchar.o _uClibc_fwrite.o _uClibc_fread.o fopen64.o getc.o putc.o - -MSRC2=printf.c -MOBJ2=printf.o sprintf.o fprintf.o vprintf.o vsprintf.o vfprintf.o snprintf.o \ - vsnprintf.o asprintf.o vfnprintf.o fnprintf.o vdprintf.o +# Set to true to use the old vfprintf instead of the new. The old is roughly +# C89 compliant, but doesn't deal with qualifiers on %n and doesn't deal with +# %h correctly or %hh at all on the interger conversions. But on i386 it is +# over 1.5k smaller than the new code. Of course, the new code fixes the +# above mentioned deficiencies and adds custom specifier support similar to +# glibc, as well as handling positional args. This option is here temporarily +# until the configuration system gets rewritten. Note also that the old +# vfprintf code will be rewritten at some point to bring it into at least C89 +# standards compliance. + +USE_OLD_VFPRINTF = false + +# Note: The *64.o objects are empty when compiled without large file support. +# To not build them at all, remove the appropriate line from the MOBJ +# definition and uncomment the DOLFS test below. + +# Note: Use the libpthreads of: flockfile.o ftrylockfile.o funlockfile.o +# Also, maybe move __fsetlocking.o as well? + +MSRC = stdio.c +MOBJ = fclose.o fflush.o fopen.o freopen.o perror.o remove.o \ + setbuf.o setvbuf.o fgetc.o fgets.o fputc.o fputs.o \ + getc.o getchar.o gets.o putc.o putchar.o puts.o \ + ungetc.o fread.o fwrite.o fgetpos.o fseek.o fsetpos.o ftell.o \ + rewind.o clearerr.o feof.o ferror.o \ + fileno.o fdopen.o getw.o putw.o setbuffer.o setlinebuf.o fcloseall.o \ + fopen64.o freopen64.o ftello64.o fseeko64.o fsetpos64.o fgetpos64.o \ + __fbufsize.o __freading.o __fwriting.o __freadable.o __fwritable.o \ + __flbf.o __fpurge.o __fpending.o _flushlbf.o \ + fopencookie.o fmemopen.o open_memstream.o \ + __fsetlocking.o \ + _stdio_fopen.o _stdio_fread.o _stdio_fwrite.o _stdio_adjpos.o \ + _stdio_lseek.o _stdio_init.o \ + _stdio_fsfopen.o _stdio_fdout.o _uintmaxtostr.o + +# ifeq ($(DOLFS),true) +# MOBJ += fopen64.o freopen64.o ftello64.o fseeko64.o fsetpos64.o fgetpos64.o +# endif + +MSRC2= printf.c +MOBJ2= vsnprintf.o vdprintf.o vasprintf.o vprintf.o vsprintf.o \ + fprintf.o snprintf.o dprintf.o asprintf.o printf.o sprintf.o + +ifneq ($(USE_OLD_VFPRINTF),true) + MOBJ2 += _ppfs_init.o _ppfs_prepargs.o _ppfs_setargs.o \ + _ppfs_parsespec.o _do_one_spec.o vfprintf.o \ + _store_inttype.o _load_inttype.o \ + register_printf_function.o parse_printf_format.o +endif + + + +ifeq ($(HAS_FLOATING_POINT),true) + MOBJ2 += _dtostr.o +endif MSRC3=scanf.c MOBJ3=scanf.o sscanf.o fscanf.o vscanf.o vsscanf.o vfscanf.o -CSRC=popen.c perror.c remove.c getdelim.c getline.c tmpfile.c tmpnam.c \ - tmpnam_r.c tempnam.c ctermid.c getw.c putw.c +CSRC=popen.c getdelim.c getline.c tmpfile.c tmpnam.c \ + tmpnam_r.c tempnam.c ctermid.c +ifeq ($(USE_OLD_VFPRINTF),true) + CSRC += old_vfprintf.c +endif COBJS=$(patsubst %.c,%.o, $(CSRC)) -OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS) +OBJS=$(MOBJ) $(MOBJ2) $(MOBJ3) $(COBJS) all: $(OBJS) $(LIBC) -- cgit v1.2.3