diff options
Diffstat (limited to 'newlib/libc/stdio64')
-rw-r--r-- | newlib/libc/stdio64/Makefile.am | 34 | ||||
-rw-r--r-- | newlib/libc/stdio64/Makefile.in | 42 | ||||
-rw-r--r-- | newlib/libc/stdio64/dummy.c | 1 | ||||
-rw-r--r-- | newlib/libc/stdio64/fgetpos64.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio64/fopen64.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio64/freopen64.c | 6 | ||||
-rw-r--r-- | newlib/libc/stdio64/fseeko64.c | 7 | ||||
-rw-r--r-- | newlib/libc/stdio64/fsetpos64.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio64/ftello64.c | 4 | ||||
-rw-r--r-- | newlib/libc/stdio64/tmpfile64.c | 4 |
10 files changed, 61 insertions, 49 deletions
diff --git a/newlib/libc/stdio64/Makefile.am b/newlib/libc/stdio64/Makefile.am index 2ae728d73..422d64909 100644 --- a/newlib/libc/stdio64/Makefile.am +++ b/newlib/libc/stdio64/Makefile.am @@ -4,26 +4,38 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -LIB_SOURCES = \ - fgetpos64.c \ - fopen64.c \ - freopen64.c \ - fseeko64.c \ - fsetpos64.c \ - ftello64.c \ - stdio64.c \ - tmpfile64.c +# need a dummy object so objectlist.awk.in will build every time +GENERAL_SOURCES = dummy.c local64.h + +## All interfaces are EL/IX level 2 +if ELIX_LEVEL_1 +LIB_OBJS = +else +LIB_OBJS = \ + fgetpos64.$(oext) \ + fopen64.$(oext) \ + freopen64.$(oext) \ + fseeko64.$(oext) \ + fsetpos64.$(oext) \ + ftello64.$(oext) \ + stdio64.$(oext) \ + tmpfile64.$(oext) +endif libstdio64_la_LDFLAGS = -Xcompiler -nostdlib if USE_LIBTOOL noinst_LTLIBRARIES = libstdio64.la -libstdio64_la_SOURCES = $(LIB_SOURCES) +libstdio64_la_SOURCES = $(GENERAL_SOURCES) +libstdio64_la_LIBADD = $(LIB_OBJS) +libstdio64_la_DEPENDENCIES = $(LIB_OBJS) LIB_COMPILE = $(LTCOMPILE) noinst_DATA = objectlist.awk.in else noinst_LIBRARIES = lib.a -lib_a_SOURCES = $(LIB_SOURCES) +lib_a_SOURCES = $(GENERAL_SOURCES) +lib_a_LIBADD = $(LIB_OBJS) +lib_a_DEPENDENCIES = $(LIB_OBJS) LIB_COMPILE = $(COMPILE) noinst_DATA = endif # USE_LIBTOOL diff --git a/newlib/libc/stdio64/Makefile.in b/newlib/libc/stdio64/Makefile.in index d403afae0..09b0bf580 100644 --- a/newlib/libc/stdio64/Makefile.in +++ b/newlib/libc/stdio64/Makefile.in @@ -110,27 +110,33 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -LIB_SOURCES = \ - fgetpos64.c \ - fopen64.c \ - freopen64.c \ - fseeko64.c \ - fsetpos64.c \ - ftello64.c \ - stdio64.c \ - tmpfile64.c - +# need a dummy object so objectlist.awk.in will build every time +GENERAL_SOURCES = dummy.c local64.h +@ELIX_LEVEL_1_TRUE@LIB_OBJS = +@ELIX_LEVEL_1_FALSE@LIB_OBJS = @ELIX_LEVEL_1_FALSE@\ +@ELIX_LEVEL_1_FALSE@ fgetpos64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ fopen64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ freopen64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ fseeko64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ fsetpos64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ ftello64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ stdio64.$(oext) \ +@ELIX_LEVEL_1_FALSE@ tmpfile64.$(oext) libstdio64_la_LDFLAGS = -Xcompiler -nostdlib @USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = @USE_LIBTOOL_TRUE@libstdio64.la -@USE_LIBTOOL_TRUE@libstdio64_la_SOURCES = @USE_LIBTOOL_TRUE@$(LIB_SOURCES) +@USE_LIBTOOL_TRUE@libstdio64_la_SOURCES = @USE_LIBTOOL_TRUE@$(GENERAL_SOURCES) +@USE_LIBTOOL_TRUE@libstdio64_la_LIBADD = @USE_LIBTOOL_TRUE@$(LIB_OBJS) +@USE_LIBTOOL_TRUE@libstdio64_la_DEPENDENCIES = @USE_LIBTOOL_TRUE@$(LIB_OBJS) @USE_LIBTOOL_TRUE@LIB_COMPILE = @USE_LIBTOOL_TRUE@$(LTCOMPILE) @USE_LIBTOOL_FALSE@LIB_COMPILE = @USE_LIBTOOL_FALSE@$(COMPILE) @USE_LIBTOOL_TRUE@noinst_DATA = @USE_LIBTOOL_TRUE@objectlist.awk.in @USE_LIBTOOL_FALSE@noinst_DATA = @USE_LIBTOOL_FALSE@noinst_LIBRARIES = @USE_LIBTOOL_FALSE@lib.a -@USE_LIBTOOL_FALSE@lib_a_SOURCES = @USE_LIBTOOL_FALSE@$(LIB_SOURCES) +@USE_LIBTOOL_FALSE@lib_a_SOURCES = @USE_LIBTOOL_FALSE@$(GENERAL_SOURCES) +@USE_LIBTOOL_FALSE@lib_a_LIBADD = @USE_LIBTOOL_FALSE@$(LIB_OBJS) +@USE_LIBTOOL_FALSE@lib_a_DEPENDENCIES = @USE_LIBTOOL_FALSE@$(LIB_OBJS) AM_CFLAGS = -I $(srcdir)/../stdio @@ -159,18 +165,10 @@ LIBRARIES = $(noinst_LIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) CPPFLAGS = @CPPFLAGS@ LIBS = @LIBS@ -lib_a_LIBADD = -@USE_LIBTOOL_FALSE@lib_a_OBJECTS = fgetpos64.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@fopen64.$(OBJEXT) freopen64.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@fseeko64.$(OBJEXT) fsetpos64.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@ftello64.$(OBJEXT) stdio64.$(OBJEXT) \ -@USE_LIBTOOL_FALSE@tmpfile64.$(OBJEXT) +@USE_LIBTOOL_FALSE@lib_a_OBJECTS = dummy.$(OBJEXT) LTLIBRARIES = $(noinst_LTLIBRARIES) -libstdio64_la_LIBADD = -@USE_LIBTOOL_TRUE@libstdio64_la_OBJECTS = fgetpos64.lo fopen64.lo \ -@USE_LIBTOOL_TRUE@freopen64.lo fseeko64.lo fsetpos64.lo ftello64.lo \ -@USE_LIBTOOL_TRUE@stdio64.lo tmpfile64.lo +@USE_LIBTOOL_TRUE@libstdio64_la_OBJECTS = dummy.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) diff --git a/newlib/libc/stdio64/dummy.c b/newlib/libc/stdio64/dummy.c new file mode 100644 index 000000000..90d0120ed --- /dev/null +++ b/newlib/libc/stdio64/dummy.c @@ -0,0 +1 @@ +/* empty stub so there's at least one file to put in objectlist.awk.in */ diff --git a/newlib/libc/stdio64/fgetpos64.c b/newlib/libc/stdio64/fgetpos64.c index 055d53655..3a0f0d910 100644 --- a/newlib/libc/stdio64/fgetpos64.c +++ b/newlib/libc/stdio64/fgetpos64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* FUNCTION <<fgetpos64>>---record position in a large stream or file @@ -46,6 +44,8 @@ No supporting OS subroutines are required. #include <stdio.h> +#ifdef __LARGE64_FILES + int _DEFUN (fgetpos64, (fp, pos), FILE * fp _AND diff --git a/newlib/libc/stdio64/fopen64.c b/newlib/libc/stdio64/fopen64.c index 58ea1459c..1eb89874e 100644 --- a/newlib/libc/stdio64/fopen64.c +++ b/newlib/libc/stdio64/fopen64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -73,6 +71,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include <fcntl.h> #endif +#ifdef __LARGE64_FILES + FILE * _DEFUN (_fopen64_r, (ptr, file, mode), struct _reent *ptr _AND diff --git a/newlib/libc/stdio64/freopen64.c b/newlib/libc/stdio64/freopen64.c index 53b8e3ee8..1828b0656 100644 --- a/newlib/libc/stdio64/freopen64.c +++ b/newlib/libc/stdio64/freopen64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -68,6 +66,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, * Re-direct an existing, open (probably) file to some other file. */ +#ifdef __LARGE64_FILES + FILE * _DEFUN (freopen64, (file, mode, fp), _CONST char *file _AND @@ -160,7 +160,7 @@ _DEFUN (freopen64, (file, mode, fp), fp->_flags |= __SCLE; #endif - fp->flags |= __SL64; + fp->_flags |= __SL64; _funlockfile(fp); return fp; diff --git a/newlib/libc/stdio64/fseeko64.c b/newlib/libc/stdio64/fseeko64.c index 2c312cfbe..3623ba7f9 100644 --- a/newlib/libc/stdio64/fseeko64.c +++ b/newlib/libc/stdio64/fseeko64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -77,17 +75,20 @@ Supporting OS subroutines required: <<close>>, <<fstat64>>, <<isatty>>, #include <fcntl.h> #include <stdlib.h> #include <errno.h> +#include <sys/types.h> #include <sys/stat.h> #include "local64.h" #define POS_ERR (-(_fpos64_t)1) +#ifdef __LARGE64_FILES + /* * Seek the given file to the given offset. * `Whence' must be one of the three SEEK_* macros. */ -int +_off64_t fseeko64 (fp, offset, whence) register FILE *fp; _off64_t offset; diff --git a/newlib/libc/stdio64/fsetpos64.c b/newlib/libc/stdio64/fsetpos64.c index 0cc552d47..f0ec64ebf 100644 --- a/newlib/libc/stdio64/fsetpos64.c +++ b/newlib/libc/stdio64/fsetpos64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* FUNCTION <<fsetpos64>>---restore position of a large stream or file @@ -42,6 +40,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>, #include <stdio.h> +#ifdef __LARGE64_FILES + int _DEFUN (fsetpos64, (iop, pos), FILE * iop _AND diff --git a/newlib/libc/stdio64/ftello64.c b/newlib/libc/stdio64/ftello64.c index c6b888cf4..1ca5b0452 100644 --- a/newlib/libc/stdio64/ftello64.c +++ b/newlib/libc/stdio64/ftello64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -77,6 +75,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include "local64.h" +#ifdef __LARGE64_FILES + _off64_t _DEFUN (ftello64, (fp), register FILE * fp) diff --git a/newlib/libc/stdio64/tmpfile64.c b/newlib/libc/stdio64/tmpfile64.c index c26a6204b..1f97c071c 100644 --- a/newlib/libc/stdio64/tmpfile64.c +++ b/newlib/libc/stdio64/tmpfile64.c @@ -1,5 +1,3 @@ -#ifdef __LARGE64_FILES - /* FUNCTION <<tmpfile64>>---create a large temporary file @@ -52,6 +50,8 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<getpid>>, #include <stdio.h> #include <errno.h> +#ifdef __LARGE64_FILES + FILE * _DEFUN (_tmpfile64_r, (ptr), struct _reent *ptr) |