Jeff Johnston
9fc9e1c916
2003-08-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/reent.h: Add _GLOBAL_REENT macro.
* libc/stdio: Globally remove/replace all references to fp->_data.
Replace with _REENT or _GLOBAL_REENT where appropriate.
* libc/stdio/asprintf.c: Ditto.
* libc/stdio/fclose.c: Ditto.
* libc/stdio/fvwrite.c: Ditto.
* libc/stdio/makebuf.c: Ditto.
* libc/stdio/refill.c: Ditto.
* libc/stdio/local.h: Ditto.
* libc/stdio/setvbuf.c: Ditto.
* libc/stdio/sscanf.c: Ditto.
* libc/stdio/stdio.c: Ditto.
* libc/stdio/ungetc.c: Ditto.
* libc/stdio/vfscanf.c: Ditto.
* libc/stdio/vsscanf.c: Ditto.
* libc/stdio/fopen.c: Ditto. Also use _fseek_r in _fopen_r.
* libc/stdio/vasprintf.c: Ditto. Also call _vfprintf_r directly.
* libc/stdio/vsnprintf.c: Ditto.
* libc/stdio/vsprintf.c: Ditto.
* libc/stdio/fcloseall.c(fcloseall): Use _GLOBAL_REENT macro
instead of _REENT to walk file list.
* libc/stdio/fflush.c: Ditto.
* libc/stdio/fgetpos.c: Add reentrant version and have regular
version call reentrant version with _REENT argument.
* libc/stdio/fsetpos.c: Ditto.
* libc/stdio/fseek.c: Ditto.
* libc/stdio/fseeko.c: Ditto.
* libc/stdio/ftell.c: Ditto.
* libc/stdio/ftello.c: Ditto.
* libc/stdio/freopen.c: Ditto.
* libc/stdio/findfp.c: Use _GLOBAL_REENT pointer when adding
new files to chain. Also use _GLOBAL_REENT pointer for
cleaning up.
* libc/stdio/fiprintf.c: Reformatted to minimize duplicate code.
* libc/stdio/siprintf.c: Ditto.
* libc/stdio/iprintf.c: Ditto.
* libc/stdio/fprintf.c: Ditto.
* libc/stdio/printf.c: Ditto.
* libc/stdio/snprintf.c: Call _vfprintf_r directly.
* libc/stdio/sprintf.c: Ditto.
* libc/stdio/vprintf.c: Ditto. Also add _REENT_ONLY check.
* libc/stdio/rewind.c: Call _fseek_r directly.
* libc/stdio/tmpfile.c: Call _fopen_r and _remove_r directly.
* libc/stdio/vfprintf.c (_VFPRINTF_R): Change _r routines to use
data pointer.
(get_arg): Add extra struct _reent pointer argument.
* libc/stdio64/fgetpos64.c: Add _r versions, remove any reference
to fp->_data.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/local64.h: Ditto.
* libc/stdio64/stdio64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto plus use _fstat_r instead of
_fstat64_r for the meantime.
2003-08-22 18:52:25 +00:00
Christopher Faylor
3c98a59309
* libc/stdio64/fdopen64.c: Include sys/lock.h.
2003-07-25 16:19:55 +00:00
Christopher Faylor
035367578f
* libc/stdio64/fdopen64.c: New file.
...
* libc/stdio64/Makefile.am (LIB_OBJS): Add fdopen64.o
* libc/stdio64/Makefile.in: Regenerate.
* libc/include/stdio.h (fdopen64): Define.
* libc/include/stdio.h (_fdopen64_r): Ditto.
2003-07-25 16:06:01 +00:00
Corinna Vinschen
5582abd2c7
* configure.host: Define stdio64_dir for Cygwin.
...
* libc/include/stdio.h: Change definition of fpos_t to fulfill
Cygwin 64bit file access requirements.
Drop definition of f*64() functions when compiled for Cygwin.
* libc/include/sys/config.h: Define __LARGE64_FILES for Cygwin.
* libc/reent/lseek64r.c: Use _off64_t instead of off64_t.
* libc/stdio64/local64.h: Use _fpos64_t instead of fpos64_t.
2003-03-07 20:41:49 +00:00
Jeff Johnston
3db40db7d8
2002-09-03 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/sys/_types.h (_flock_t): Added.
* libc/include/sys/lock.h (__lock_try_acquire): New interface.
(__lock_try_acquire_recursive): Ditto.
* libc/include/sys/reent.h (__sFILE, __sFILE64): Add new
_lock field.
* libc/stdio/findfp.c (std)[!__SINGLE_THREAD__]: Initialize _lock
field.
* libc/stdio/fopen.c (_fopen_r)[!__SINGLE_THREAD__]: Ditto.
* libc/stdio64/fopen64.c (_fopen64_r)[!__SINGLE_THREAD__]: Ditto.
* libc/sys/linux/include/time.h (struct timespec): Moved from
<sys/types.h> and added check for __need_timespec flag so type
can be defined by itself.
* libc/sys/linux/sys/_types.h (_flock_t): New type.
* libc/sys/linux/sys/types.h (struct timespec): Moved to
<time.h>.
2002-09-03 19:40:36 +00:00
Jeff Johnston
90b65e2d06
2002-08-26 Jeff Johnston <jjohnstn@redhat.com>
...
* Makefile.am(LIBC_OBJECTLISTS): Add STDIO64_OBJECTLIST.
* Makefile.in: Regenerated.
* acinclude.m4: Add support for --enable-newlib-elix-level option.
* aclocal.m4: Regenerated.
* configure: Ditto.
* configure.host: Add code to define _ELIX_LEVEL if
--enable-newlib-elix-level option is used.
* configure.in:
* libc/aclocal.m4: Regenerated.
* libc/configure: Ditto.
* libc/argz/Makefile.am: Add EL/IX level checking.
* libc/argz/Makefile.in: Regenerated.
* libc/argz/dummy.c: New file.
* libc/ctype/Makefile.am: Add EL/IX level checking.
* libc/ctype/Makefile.in: Regenerated.
* libc/locale/Makefile.am: Add EL/IX level checking.
* libc/locale/Makefile.in: Regenerated.
* libc/posix/Makefile.am: Add EL/IX level checking.
* libc/posix/Makefile.in: Regenerated.
* libc/posix/telldir.c: Add EL/IX level checking.
* libc/reent/Makefile.am: Ditto.
* libc/reent/fstat64r.c: Ditto.
* libc/reent/lseek64r.c: Ditto.
* libc/reent/open64r.c: Ditto.
* libc/reent/Makefile.in: Regenerated.
* libc/search/Makefile.am: Add EL/IX level checking.
* libc/search/Makefile.in: Regenerated.
* libc/stdio/Makefile.am: Add EL/IX level checking.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio64/Makefile.am: Add EL/IX level checking.
* libc/stdio64/Makefile.in: Regenerated.
* libc/stdio64/dummy.c: New file.
* libc/stdio64/fgetpos64.c: Fix so _LARGEFILE_64 macro is checked
after first include.
* libc/stdio64/fopen64.c: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/tmpfile64.c: Ditto.
* libc/stdlib/Makefile.am: Add EL/IX level checking.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/mstats.c: Add EL/IX level checking.
* libc/string/Makefile.am: Ditto.
* libc/string/Makefile.in: Regenerated.
* libc/sys/linux/Makefile.am: Add EL/IX level checking.
* libc/sys/linux/Makefile.in: Regenerated.
* libc/sys/linux/aclocal.m4: Ditto.
* libc/sys/linux/configure: Ditto.
* libc/sys/linux/aio.c: Add EL/IX level checking.
* libc/sys/linux/ftok.c: Ditto.
* libc/sys/linux/getdate.c: Ditto.
* libc/sys/linux/ids.c: Ditto.
* libc/sys/linux/inode.c: Ditto.
* libc/sys/linux/io.c: Ditto.
* libc/sys/linux/process.c: Ditto.
* libc/sys/linux/resource.c: Ditto.
* libc/sys/linux/sched.c: Ditto.
* libc/sys/linux/sig.c: Ditto.
* libc/sys/linux/termios.c: Ditto.
* libc/sys/linux/wait.c: Ditto plus add __waitpid and
__libc___waitpid weak aliases.
* libc/sys/linux/machine/i386/syscall.h: Add new _base macros
that generate the code for a syscall, but do not create a
weak alias.
* libc/syscalls/Makefile.am: Add EL/IX level checking.
* libc/syscalls/Makefile.in: Regenerated.
* libc/time/tzset_r.c: Change to replace strdup with equivalent
functionality.
* libc/unix/Makefile.am: Add EL/IX level checking.
* libc/unix/Makefile.in: Regenerated.
2002-08-26 18:56:09 +00:00
Thomas Fitzsimmons
8d9112f2f3
* libc/include/langinfo.h: New file.
...
* libc/include/wchar.h: Likewise.
* libc/include/sys/syslimits.h: Likewise.
* libc/locale/fix_grouping.c: Likewise.
* libc/locale/ldpart.c: Likewise.
* libc/locale/ldpart.h: Likewise.
* libc/locale/lmessages.c: Likewise.
* libc/locale/lmessages.h: Likewise.
* libc/locale/lmonetary.c: Likewise.
* libc/locale/lmonetary.h: Likewise.
* libc/locale/lnumeric.c: Likewise.
* libc/locale/lnumeric.h: Likewise.
* libc/locale/nl_langinfo.3: Likewise.
* libc/locale/nl_langinfo.c: Likewise.
* libc/locale/timelocal.c: Likewise.
* libc/locale/timelocal.h: Likewise.
* libc/stdlib/btowc.c: Likewise.
* libc/stdlib/mbrlen.c: Likewise.
* libc/stdlib/mbrtowc.c: Likewise.
* libc/stdlib/mbsinit.c: Likewise.
* libc/stdlib/mbsrtowcs.c: Likewise.
* libc/stdlib/wcrtomb.c: Likewise.
* libc/stdlib/wcsrtombs.c: Likewise.
* libc/stdlib/wctob.c: Likewise.
* libc/sys/linux/prof-freq.c: Likewise.
* libc/sys/linux/profile.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.c: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/include/stdlib.h: Change re-entrant functions to take
mbstate_t pointers.
* libc/include/sys/_types.h: Define _mbstate_t.
* libc/include/sys/config.h (MB_LEN_MAX): New macro.
* libc/include/sys/errno.h (EILSEQ): New error code.
* libc/include/sys/reent.h: Include wchar.h. Change reentrant
structure to use mbstate_t.
* libc/locale/Makefile.am (LIB_SOURCES): Add new files.
* libc/machine/powerpc/vfprintf.c: Use mbstate_t.
* libc/machine/powerpc/vfscanf.c: Likewise.
* libc/stdio/getdelim.c: Reallocate buffer only when necessary.
* libc/stdio/vfprintf.c: Likewise.
* libc/stdio/vfscanf.c: Likewise.
* libc/stdlib/Makefile.am (LIB_SOURCES): Add new files.
* libc/stdlib/mblen.c: Use mbstate_t.
* libc/stdlib/mblen_r.c: Likewise.
* libc/stdlib/mbstowcs.c: Likewise.
* libc/stdlib/mbstowcs_r.c: Likewise.
* libc/stdlib/mbtowc.c: Likewise.
* libc/stdlib/mbtowc_r.c: Likewise.
* libc/stdlib/wcstombs.c: Likewise.
* libc/stdlib/wcstombs_r.c: Likewise.
* libc/stdlib/wctomb_r.c: Likewise.
* libc/sys/linux/Makefile.am (LIB_SOURCES): Add prof-freq.c and
profile.c.
* libc/sys/linux/machine/i386/Makefile.am (LIB_SOURCES): Add
dl-procinfo.c.
* libc/sys/linux/sys/errno.h (EILSEQ): New error code.
* libc/sys/linux/sys/types.h (off_t): Define type.
* testsuite/newlib.locale/UTF-8.c: Change locale name from UTF-8
to C-UTF-8.
* testsuite/newlib.locale/UTF-8.exp: Likewise.
2002-08-23 01:56:05 +00:00
Jeff Johnston
f5f27f0778
2002-07-22 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/stdio.h (fcloseall, _fcloseall_r): Added prototypes.
* libc/stdio/Makefile.am: Added fcloseall.c support.
* libc/stdio/Makefile.in: Regenerated.
* libc/stdio/fcloseall.c: New file.
* libc/stdio64/Makefile.am: Remove missing .def references.
* libc/stdio64/Makefile.in: Regenerated.
2002-07-22 23:53:50 +00:00
Jeff Johnston
b155ad9f64
2002-07-19 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/stdio64/Makefile.am: Remove missing files.
* libc/stdio64/Makefile.in: Regenerated.
2002-07-19 23:27:05 +00:00
Thomas Fitzsimmons
9b022d6db8
* libc/argz/argz_replace.c: Include buf_findstr.h.
...
* libc/argz/buf_findstr.c: Likewise.
* libc/argz/envz_entry.c: Include buf_findstr.h. Cast return
value to (char *).
* libc/argz/envz_get.c: Likewise.
* libc/include/sys/unistd.h: Add getopt and getsubopt declarations.
* libc/stdlib/Makefile.am (LIB_SOURCES): Add getsubopt.c.
* libc/stdlib/getsubopt.3: New file.
* libc/stdlib/getsubopt.c: New file.
* libc/sys/linux/machine/i386/socketcall.h (__sockcall_base):
Change esp to ebp.
2002-07-19 20:36:09 +00:00
Jeff Johnston
dee5139131
2002-07-17 Jeff Johnston <jjohnstn@redhat.com>
...
* configure.host(stdio64_dir): New setting that is used to
enable building of new stdio64 directory.
* libc/Makefile.am[HAVE_STDIO64_DIR]: Add support for
large files.
(stmp-stdio64,stdio64.texi): New targets to optionally add in
stdio64 info to info files.
* libc/Makefile.in: Regenerated.
* libc/configure: Ditto.
* libc/configure.in: Add configuration variables that are set
when stdio64 is selected as subdir in configure.host.
* libc/libc.texinfo: Add optional menu item for Stdio64, based
on whether STDIO64 flag is set or not.
* libc/sys.tex: Add optional stdio64 syscalls based on whether
STDIO64 flag is set or not.
* libc/include/reent.h[__LARGE64_FILES]: Add new stdio64
_r sycall routines.
* libc/include/stdio.h[__LARGE64_FILES]: Add new stdio64 prototypes.
(FILE): Typedef'd to __FILE instead of struct __sFILE directly.
(__SL64): New file flag indicating file is opened via fopen64.
* libc/include/sys/_types.h(_off64_t): Added.
* libc/include/sys/config.h: For x86-linux, define __LARGE64_FILES.
* libc/include/sys/reent.h(struct __sFILE64): New file structure
for 64-bit offset large file support.
(__FILE): New intermediate type either set to struct __sFILE64 or
struct __sFILE, depending on whether __LARGE64_FILES is set or not.
* libc/reent/Makefile.am[HAVE_STDIO64_DIR]: Add new files.
* libc/reent/Makefile.in: Regenerated.
* libc/reent/fstat64r.c: New file.
* libc/reent/lseek64r.c: Ditto.
* libc/reent/open64r.c: Ditto.
* libc/reent/reent.tex: Optionally add stdio64 reentrant syscalls
based on whether STDIO64 flag is set.
* libc/stdio/stdio.tex: Add blank line.
* libc/stdio64/Makefile.am: New file.
* libc/stdio64/Makefile.in: Ditto.
* libc/stdio64/fgetpos64.c: Ditto.
* libc/stdio64/fopen64.: Ditto.
* libc/stdio64/freopen64.c: Ditto.
* libc/stdio64/fseeko64.c: Ditto.
* libc/stdio64/fsetpos64.c: Ditto.
* libc/stdio64/ftello64.c: Ditto.
* libc/stdio64/local64.h: Ditto.
* libc/stdio64/stdio64.c: Ditto.
* libc/stdio64/stdio64.tex: Ditto.
* libc/stdio64/tmpfile64.c: Ditto.
* libc/sys/linux/io64.c: Add weak aliases for lseek64, fstat64, and
open64.
2002-07-17 23:25:44 +00:00