OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/tags/gnu-src/newlib-1.18.0/newlib-1.18.0-or32-1.0rc1/newlib/libc/reent
    from Rev 207 to Rev 345
    Reverse comparison

Rev 207 → Rev 345

/signalr.c
0,0 → 1,100
/* Reentrant versions of syscalls need to support signal/raise.
These implementations just call the usual system calls. */
 
#include <reent.h>
#include <signal.h>
#include <unistd.h>
#include <_syslist.h>
 
/* Some targets provides their own versions of these functions. Those
targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
 
#ifdef _REENT_ONLY
#ifndef REENTRANT_SYSCALLS_PROVIDED
#define REENTRANT_SYSCALLS_PROVIDED
#endif
#endif
 
#ifdef REENTRANT_SYSCALLS_PROVIDED
 
int _dummy_link_syscalls = 1;
 
#else
 
/* We use the errno variable used by the system dependent layer. */
#undef errno
extern int errno;
 
/*
FUNCTION
<<_kill_r>>---Reentrant version of kill
INDEX
_kill_r
 
ANSI_SYNOPSIS
#include <reent.h>
int _kill_r(struct _reent *<[ptr]>, int <[pid]>, int <[sig]>);
 
TRAD_SYNOPSIS
#include <reent.h>
int _kill_r(<[ptr]>, <[pid]>, <[sig]>)
struct _reent *<[ptr]>;
int <[pid]>;
int <[sig]>;
 
DESCRIPTION
This is a reentrant version of <<kill>>. It
takes a pointer to the global data block, which holds
<<errno>>.
*/
 
int
_DEFUN (_kill_r, (ptr, pid, sig),
struct _reent *ptr _AND
int pid _AND
int sig)
{
int ret;
 
errno = 0;
if ((ret = _kill (pid, sig)) == -1 && errno != 0)
ptr->_errno = errno;
return ret;
}
 
/*
FUNCTION
<<_getpid_r>>---Reentrant version of getpid
INDEX
_getpid_r
 
ANSI_SYNOPSIS
#include <reent.h>
int _getpid_r(struct _reent *<[ptr]>);
 
TRAD_SYNOPSIS
#include <reent.h>
int _getpid_r(<[ptr]>)
struct _reent *<[ptr]>;
 
DESCRIPTION
This is a reentrant version of <<getpid>>. It
takes a pointer to the global data block, which holds
<<errno>>.
 
We never need <<errno>>, of course, but for consistency we
still must have the reentrant pointer argument.
*/
 
int
_DEFUN (_getpid_r, (ptr),
struct _reent *ptr)
{
int ret;
ret = _getpid ();
return ret;
}
 
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
signalr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: isattyr.c =================================================================== --- isattyr.c (nonexistent) +++ isattyr.c (revision 345) @@ -0,0 +1,63 @@ +/* Reentrant versions of isatty system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_isatty_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_isatty_r>>---Reentrant version of isatty + +INDEX + _isatty_r + +ANSI_SYNOPSIS + #include + int _isatty_r(struct _reent *<[ptr]>, + int <[fd]>); + +TRAD_SYNOPSIS + #include + int _isatty_r(<[ptr]>, <[fd]>) + struct _reent *<[ptr]>; + int <[fd]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_isatty_r (ptr, fd) + struct _reent *ptr; + int fd; +{ + int ret; + + errno = 0; + if ((ret = _isatty (fd)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
isattyr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: lseek64r.c =================================================================== --- lseek64r.c (nonexistent) +++ lseek64r.c (revision 345) @@ -0,0 +1,68 @@ +/* Reentrant versions of lseek system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef __LARGE64_FILES + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_lseek64_r>>---Reentrant version of lseek + +INDEX + _lseek64_r + +ANSI_SYNOPSIS + #include + off64_t _lseek64_r(struct _reent *<[ptr]>, + int <[fd]>, off64_t <[pos]>, int <[whence]>); + +TRAD_SYNOPSIS + #include + off64_t _lseek64_r(<[ptr]>, <[fd]>, <[pos]>, <[whence]>) + struct _reent *<[ptr]>; + int <[fd]>; + off64_t <[pos]>; + int <[whence]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. This function only exists on a system + with large file support. +*/ + +_off64_t +_DEFUN (_lseek64_r, (ptr, fd, pos, whence), + struct _reent *ptr _AND + int fd _AND + _off64_t pos _AND + int whence) +{ + _off64_t ret; + + errno = 0; + if ((ret = _lseek64 (fd, pos, whence)) == (_off64_t) -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */ + +#endif /* __LARGE64_FILES */
lseek64r.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: Makefile.in =================================================================== --- Makefile.in (nonexistent) +++ Makefile.in (revision 345) @@ -0,0 +1,750 @@ +# Makefile.in generated by automake 1.11 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../Makefile.shared $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am +subdir = reent +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../../libtool.m4 \ + $(top_srcdir)/../../ltoptions.m4 \ + $(top_srcdir)/../../ltsugar.m4 \ + $(top_srcdir)/../../ltversion.m4 \ + $(top_srcdir)/../../lt~obsolete.m4 \ + $(top_srcdir)/../acinclude.m4 $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +lib_a_AR = $(AR) $(ARFLAGS) +lib_a_LIBADD = +am__objects_1 = lib_a-closer.$(OBJEXT) lib_a-reent.$(OBJEXT) \ + lib_a-impure.$(OBJEXT) lib_a-fcntlr.$(OBJEXT) \ + lib_a-fstatr.$(OBJEXT) lib_a-getreent.$(OBJEXT) \ + lib_a-gettimeofdayr.$(OBJEXT) lib_a-isattyr.$(OBJEXT) \ + lib_a-linkr.$(OBJEXT) lib_a-lseekr.$(OBJEXT) \ + lib_a-mkdirr.$(OBJEXT) lib_a-openr.$(OBJEXT) \ + lib_a-readr.$(OBJEXT) lib_a-renamer.$(OBJEXT) \ + lib_a-signalr.$(OBJEXT) lib_a-signgam.$(OBJEXT) \ + lib_a-sbrkr.$(OBJEXT) lib_a-statr.$(OBJEXT) \ + lib_a-timesr.$(OBJEXT) lib_a-unlinkr.$(OBJEXT) \ + lib_a-writer.$(OBJEXT) +@HAVE_STDIO64_DIR_TRUE@am__objects_2 = lib_a-fstat64r.$(OBJEXT) \ +@HAVE_STDIO64_DIR_TRUE@ lib_a-lseek64r.$(OBJEXT) \ +@HAVE_STDIO64_DIR_TRUE@ lib_a-stat64r.$(OBJEXT) \ +@HAVE_STDIO64_DIR_TRUE@ lib_a-open64r.$(OBJEXT) +am__objects_3 = $(am__objects_2) +am__objects_4 = lib_a-execr.$(OBJEXT) +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@am__objects_5 = \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ $(am__objects_3) \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ $(am__objects_4) +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@am__objects_5 = \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ $(am__objects_3) +@USE_LIBTOOL_FALSE@am_lib_a_OBJECTS = $(am__objects_1) \ +@USE_LIBTOOL_FALSE@ $(am__objects_5) +lib_a_OBJECTS = $(am_lib_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libreent_la_LIBADD = +am__objects_6 = closer.lo reent.lo impure.lo fcntlr.lo fstatr.lo \ + getreent.lo gettimeofdayr.lo isattyr.lo linkr.lo lseekr.lo \ + mkdirr.lo openr.lo readr.lo renamer.lo signalr.lo signgam.lo \ + sbrkr.lo statr.lo timesr.lo unlinkr.lo writer.lo +@HAVE_STDIO64_DIR_TRUE@am__objects_7 = fstat64r.lo lseek64r.lo \ +@HAVE_STDIO64_DIR_TRUE@ stat64r.lo open64r.lo +am__objects_8 = $(am__objects_7) +am__objects_9 = execr.lo +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@am__objects_10 = \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ $(am__objects_8) \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ $(am__objects_9) +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@am__objects_10 = \ +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ $(am__objects_8) +@USE_LIBTOOL_TRUE@am_libreent_la_OBJECTS = $(am__objects_6) \ +@USE_LIBTOOL_TRUE@ $(am__objects_10) +libreent_la_OBJECTS = $(am_libreent_la_OBJECTS) +libreent_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libreent_la_LDFLAGS) $(LDFLAGS) -o $@ +@USE_LIBTOOL_TRUE@am_libreent_la_rpath = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(lib_a_SOURCES) $(libreent_la_SOURCES) +DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CRT0 = @CRT0@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBC_EXTRA_DEF = @LIBC_EXTRA_DEF@ +LIBC_EXTRA_LIB = @LIBC_EXTRA_LIB@ +LIBC_MACHINE_LIB = @LIBC_MACHINE_LIB@ +LIBC_POSIX_LIB = @LIBC_POSIX_LIB@ +LIBC_SIGNAL_DEF = @LIBC_SIGNAL_DEF@ +LIBC_SIGNAL_LIB = @LIBC_SIGNAL_LIB@ +LIBC_STDIO64_DEF = @LIBC_STDIO64_DEF@ +LIBC_STDIO64_LIB = @LIBC_STDIO64_LIB@ +LIBC_STDIO_DEF = @LIBC_STDIO_DEF@ +LIBC_STDIO_LIB = @LIBC_STDIO_LIB@ +LIBC_SYSCALL_LIB = @LIBC_SYSCALL_LIB@ +LIBC_SYS_LIB = @LIBC_SYS_LIB@ +LIBC_UNIX_LIB = @LIBC_UNIX_LIB@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +RANLIB = @RANLIB@ +READELF = @READELF@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +aext = @aext@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +extra_dir = @extra_dir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libm_machine_dir = @libm_machine_dir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lpfx = @lpfx@ +lt_ECHO = @lt_ECHO@ +machine_dir = @machine_dir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +newlib_basedir = @newlib_basedir@ +oext = @oext@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sys_dir = @sys_dir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = cygnus +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) +@HAVE_STDIO64_DIR_TRUE@STDIO64_SOURCES = \ +@HAVE_STDIO64_DIR_TRUE@ fstat64r.c \ +@HAVE_STDIO64_DIR_TRUE@ lseek64r.c \ +@HAVE_STDIO64_DIR_TRUE@ stat64r.c \ +@HAVE_STDIO64_DIR_TRUE@ open64r.c + +@HAVE_STDIO64_DIR_TRUE@STDIO64_DEFS = \ +@HAVE_STDIO64_DIR_TRUE@ fstat64r.def \ +@HAVE_STDIO64_DIR_TRUE@ lseek64r.def \ +@HAVE_STDIO64_DIR_TRUE@ stat64r.def \ +@HAVE_STDIO64_DIR_TRUE@ open64r.def + +ELIX_2_SOURCES = $(STDIO64_SOURCES) +ELIX_3_SOURCES = execr.c +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_FALSE@ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) +@ELIX_LEVEL_1_FALSE@@ELIX_LEVEL_2_TRUE@ELIX_SOURCES = $(ELIX_2_SOURCES) +@ELIX_LEVEL_1_TRUE@ELIX_SOURCES = +GENERAL_SOURCES = \ + closer.c \ + reent.c \ + impure.c \ + fcntlr.c \ + fstatr.c \ + getreent.c \ + gettimeofdayr.c \ + isattyr.c \ + linkr.c \ + lseekr.c \ + mkdirr.c \ + openr.c \ + readr.c \ + renamer.c \ + signalr.c \ + signgam.c \ + sbrkr.c \ + statr.c \ + timesr.c \ + unlinkr.c \ + writer.c + +libreent_la_LDFLAGS = -Xcompiler -nostdlib +@USE_LIBTOOL_TRUE@noinst_LTLIBRARIES = libreent.la +@USE_LIBTOOL_TRUE@libreent_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) +@USE_LIBTOOL_FALSE@noinst_DATA = +@USE_LIBTOOL_TRUE@noinst_DATA = objectlist.awk.in +@USE_LIBTOOL_FALSE@noinst_LIBRARIES = lib.a +@USE_LIBTOOL_FALSE@lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) +@USE_LIBTOOL_FALSE@lib_a_CFLAGS = $(AM_CFLAGS) +CHEWOUT_FILES = \ + closer.def \ + reent.def \ + execr.def \ + fcntlr.def \ + fstatr.def \ + gettimeofdayr.def \ + linkr.def \ + lseekr.def \ + mkdirr.def \ + openr.def \ + readr.def \ + renamer.def \ + signalr.def \ + sbrkr.def \ + statr.def \ + timesr.def \ + unlinkr.def \ + $(STDIO64_DEFS) \ + writer.def + +SUFFIXES = .def .h +CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str +TARGETDOC = ../tmp.texi +CLEANFILES = $(CHEWOUT_FILES) *.ref +all: all-am + +.SUFFIXES: +.SUFFIXES: .def .h .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../Makefile.shared $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus reent/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --cygnus reent/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +lib.a: $(lib_a_OBJECTS) $(lib_a_DEPENDENCIES) + -rm -f lib.a + $(lib_a_AR) lib.a $(lib_a_OBJECTS) $(lib_a_LIBADD) + $(RANLIB) lib.a + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libreent.la: $(libreent_la_OBJECTS) $(libreent_la_DEPENDENCIES) + $(libreent_la_LINK) $(am_libreent_la_rpath) $(libreent_la_OBJECTS) $(libreent_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(COMPILE) -c $< + +.c.obj: + $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(LTCOMPILE) -c -o $@ $< + +lib_a-closer.o: closer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-closer.o `test -f 'closer.c' || echo '$(srcdir)/'`closer.c + +lib_a-closer.obj: closer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-closer.obj `if test -f 'closer.c'; then $(CYGPATH_W) 'closer.c'; else $(CYGPATH_W) '$(srcdir)/closer.c'; fi` + +lib_a-reent.o: reent.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reent.o `test -f 'reent.c' || echo '$(srcdir)/'`reent.c + +lib_a-reent.obj: reent.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-reent.obj `if test -f 'reent.c'; then $(CYGPATH_W) 'reent.c'; else $(CYGPATH_W) '$(srcdir)/reent.c'; fi` + +lib_a-impure.o: impure.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-impure.o `test -f 'impure.c' || echo '$(srcdir)/'`impure.c + +lib_a-impure.obj: impure.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-impure.obj `if test -f 'impure.c'; then $(CYGPATH_W) 'impure.c'; else $(CYGPATH_W) '$(srcdir)/impure.c'; fi` + +lib_a-fcntlr.o: fcntlr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcntlr.o `test -f 'fcntlr.c' || echo '$(srcdir)/'`fcntlr.c + +lib_a-fcntlr.obj: fcntlr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fcntlr.obj `if test -f 'fcntlr.c'; then $(CYGPATH_W) 'fcntlr.c'; else $(CYGPATH_W) '$(srcdir)/fcntlr.c'; fi` + +lib_a-fstatr.o: fstatr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fstatr.o `test -f 'fstatr.c' || echo '$(srcdir)/'`fstatr.c + +lib_a-fstatr.obj: fstatr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fstatr.obj `if test -f 'fstatr.c'; then $(CYGPATH_W) 'fstatr.c'; else $(CYGPATH_W) '$(srcdir)/fstatr.c'; fi` + +lib_a-getreent.o: getreent.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getreent.o `test -f 'getreent.c' || echo '$(srcdir)/'`getreent.c + +lib_a-getreent.obj: getreent.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-getreent.obj `if test -f 'getreent.c'; then $(CYGPATH_W) 'getreent.c'; else $(CYGPATH_W) '$(srcdir)/getreent.c'; fi` + +lib_a-gettimeofdayr.o: gettimeofdayr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gettimeofdayr.o `test -f 'gettimeofdayr.c' || echo '$(srcdir)/'`gettimeofdayr.c + +lib_a-gettimeofdayr.obj: gettimeofdayr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-gettimeofdayr.obj `if test -f 'gettimeofdayr.c'; then $(CYGPATH_W) 'gettimeofdayr.c'; else $(CYGPATH_W) '$(srcdir)/gettimeofdayr.c'; fi` + +lib_a-isattyr.o: isattyr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isattyr.o `test -f 'isattyr.c' || echo '$(srcdir)/'`isattyr.c + +lib_a-isattyr.obj: isattyr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-isattyr.obj `if test -f 'isattyr.c'; then $(CYGPATH_W) 'isattyr.c'; else $(CYGPATH_W) '$(srcdir)/isattyr.c'; fi` + +lib_a-linkr.o: linkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-linkr.o `test -f 'linkr.c' || echo '$(srcdir)/'`linkr.c + +lib_a-linkr.obj: linkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-linkr.obj `if test -f 'linkr.c'; then $(CYGPATH_W) 'linkr.c'; else $(CYGPATH_W) '$(srcdir)/linkr.c'; fi` + +lib_a-lseekr.o: lseekr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lseekr.o `test -f 'lseekr.c' || echo '$(srcdir)/'`lseekr.c + +lib_a-lseekr.obj: lseekr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lseekr.obj `if test -f 'lseekr.c'; then $(CYGPATH_W) 'lseekr.c'; else $(CYGPATH_W) '$(srcdir)/lseekr.c'; fi` + +lib_a-mkdirr.o: mkdirr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mkdirr.o `test -f 'mkdirr.c' || echo '$(srcdir)/'`mkdirr.c + +lib_a-mkdirr.obj: mkdirr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-mkdirr.obj `if test -f 'mkdirr.c'; then $(CYGPATH_W) 'mkdirr.c'; else $(CYGPATH_W) '$(srcdir)/mkdirr.c'; fi` + +lib_a-openr.o: openr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-openr.o `test -f 'openr.c' || echo '$(srcdir)/'`openr.c + +lib_a-openr.obj: openr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-openr.obj `if test -f 'openr.c'; then $(CYGPATH_W) 'openr.c'; else $(CYGPATH_W) '$(srcdir)/openr.c'; fi` + +lib_a-readr.o: readr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-readr.o `test -f 'readr.c' || echo '$(srcdir)/'`readr.c + +lib_a-readr.obj: readr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-readr.obj `if test -f 'readr.c'; then $(CYGPATH_W) 'readr.c'; else $(CYGPATH_W) '$(srcdir)/readr.c'; fi` + +lib_a-renamer.o: renamer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-renamer.o `test -f 'renamer.c' || echo '$(srcdir)/'`renamer.c + +lib_a-renamer.obj: renamer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-renamer.obj `if test -f 'renamer.c'; then $(CYGPATH_W) 'renamer.c'; else $(CYGPATH_W) '$(srcdir)/renamer.c'; fi` + +lib_a-signalr.o: signalr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signalr.o `test -f 'signalr.c' || echo '$(srcdir)/'`signalr.c + +lib_a-signalr.obj: signalr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signalr.obj `if test -f 'signalr.c'; then $(CYGPATH_W) 'signalr.c'; else $(CYGPATH_W) '$(srcdir)/signalr.c'; fi` + +lib_a-signgam.o: signgam.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signgam.o `test -f 'signgam.c' || echo '$(srcdir)/'`signgam.c + +lib_a-signgam.obj: signgam.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-signgam.obj `if test -f 'signgam.c'; then $(CYGPATH_W) 'signgam.c'; else $(CYGPATH_W) '$(srcdir)/signgam.c'; fi` + +lib_a-sbrkr.o: sbrkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrkr.o `test -f 'sbrkr.c' || echo '$(srcdir)/'`sbrkr.c + +lib_a-sbrkr.obj: sbrkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sbrkr.obj `if test -f 'sbrkr.c'; then $(CYGPATH_W) 'sbrkr.c'; else $(CYGPATH_W) '$(srcdir)/sbrkr.c'; fi` + +lib_a-statr.o: statr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-statr.o `test -f 'statr.c' || echo '$(srcdir)/'`statr.c + +lib_a-statr.obj: statr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-statr.obj `if test -f 'statr.c'; then $(CYGPATH_W) 'statr.c'; else $(CYGPATH_W) '$(srcdir)/statr.c'; fi` + +lib_a-timesr.o: timesr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timesr.o `test -f 'timesr.c' || echo '$(srcdir)/'`timesr.c + +lib_a-timesr.obj: timesr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-timesr.obj `if test -f 'timesr.c'; then $(CYGPATH_W) 'timesr.c'; else $(CYGPATH_W) '$(srcdir)/timesr.c'; fi` + +lib_a-unlinkr.o: unlinkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-unlinkr.o `test -f 'unlinkr.c' || echo '$(srcdir)/'`unlinkr.c + +lib_a-unlinkr.obj: unlinkr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-unlinkr.obj `if test -f 'unlinkr.c'; then $(CYGPATH_W) 'unlinkr.c'; else $(CYGPATH_W) '$(srcdir)/unlinkr.c'; fi` + +lib_a-writer.o: writer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-writer.o `test -f 'writer.c' || echo '$(srcdir)/'`writer.c + +lib_a-writer.obj: writer.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-writer.obj `if test -f 'writer.c'; then $(CYGPATH_W) 'writer.c'; else $(CYGPATH_W) '$(srcdir)/writer.c'; fi` + +lib_a-fstat64r.o: fstat64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fstat64r.o `test -f 'fstat64r.c' || echo '$(srcdir)/'`fstat64r.c + +lib_a-fstat64r.obj: fstat64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fstat64r.obj `if test -f 'fstat64r.c'; then $(CYGPATH_W) 'fstat64r.c'; else $(CYGPATH_W) '$(srcdir)/fstat64r.c'; fi` + +lib_a-lseek64r.o: lseek64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lseek64r.o `test -f 'lseek64r.c' || echo '$(srcdir)/'`lseek64r.c + +lib_a-lseek64r.obj: lseek64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-lseek64r.obj `if test -f 'lseek64r.c'; then $(CYGPATH_W) 'lseek64r.c'; else $(CYGPATH_W) '$(srcdir)/lseek64r.c'; fi` + +lib_a-stat64r.o: stat64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stat64r.o `test -f 'stat64r.c' || echo '$(srcdir)/'`stat64r.c + +lib_a-stat64r.obj: stat64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-stat64r.obj `if test -f 'stat64r.c'; then $(CYGPATH_W) 'stat64r.c'; else $(CYGPATH_W) '$(srcdir)/stat64r.c'; fi` + +lib_a-open64r.o: open64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open64r.o `test -f 'open64r.c' || echo '$(srcdir)/'`open64r.c + +lib_a-open64r.obj: open64r.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-open64r.obj `if test -f 'open64r.c'; then $(CYGPATH_W) 'open64r.c'; else $(CYGPATH_W) '$(srcdir)/open64r.c'; fi` + +lib_a-execr.o: execr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-execr.o `test -f 'execr.c' || echo '$(srcdir)/'`execr.c + +lib_a-execr.obj: execr.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-execr.obj `if test -f 'execr.c'; then $(CYGPATH_W) 'execr.c'; else $(CYGPATH_W) '$(srcdir)/execr.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +check-am: +check: check-am +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(DATA) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + clean-noinstLTLIBRARIES mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ + ctags distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags dvi dvi-am html html-am info \ + info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am + +objectlist.awk.in: $(noinst_LTLIBRARIES) + -rm -f objectlist.awk.in + for i in `ls *.lo` ; \ + do \ + echo $$i `pwd`/$$i >> objectlist.awk.in ; \ + done + +.c.def: + $(CHEW) < $< > $*.def 2> $*.ref + touch stmp-def + +doc: $(CHEWOUT_FILES) + cat $(srcdir)/reent.tex >> $(TARGETDOC) + +$(lpfx)impure.$(oext): $(srcdir)/impure.c $(srcdir)/../include/sys/reent.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Index: impure.c =================================================================== --- impure.c (nonexistent) +++ impure.c (revision 345) @@ -0,0 +1,28 @@ +#include + +/* Note that there is a copy of this in sys/reent.h. */ +#ifndef __ATTRIBUTE_IMPURE_PTR__ +#define __ATTRIBUTE_IMPURE_PTR__ +#endif + +#ifndef __ATTRIBUTE_IMPURE_DATA__ +#define __ATTRIBUTE_IMPURE_DATA__ +#endif + +/* Redeclare these symbols locally as weak so that the file containing + their definitions (along with a lot of other stuff) isn't sucked in + unless they are actually used by other compilation units. This is + important to reduce image size for targets with very small amounts + of memory. */ +#ifdef _REENT_SMALL +extern const struct __sFILE_fake __sf_fake_stdin _ATTRIBUTE ((weak)); +extern const struct __sFILE_fake __sf_fake_stdout _ATTRIBUTE ((weak)); +extern const struct __sFILE_fake __sf_fake_stderr _ATTRIBUTE ((weak)); +#endif + +static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data); +#ifdef __CYGWIN__ +extern struct _reent reent_data __attribute__ ((alias("impure_data"))); +#endif +struct _reent *__ATTRIBUTE_IMPURE_PTR__ _impure_ptr = &impure_data; +struct _reent *_CONST __ATTRIBUTE_IMPURE_PTR__ _global_impure_ptr = &impure_data;
impure.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: timesr.c =================================================================== --- timesr.c (nonexistent) +++ timesr.c (revision 345) @@ -0,0 +1,63 @@ +/* Reentrant versions of times system calls */ + +#include +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_times_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_times_r>>---Reentrant version of times + +INDEX + _times_r + +ANSI_SYNOPSIS + #include + #include + clock_t _times_r(struct _reent *<[ptr]>, struct tms *<[ptms]>); + +TRAD_SYNOPSIS + #include + #include + clock_t _times_r(<[ptr]>, <[ptms]>) + struct _reent *<[ptr]>; + struct tms *<[ptms]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +clock_t +_DEFUN (_times_r, (ptr, ptms), + struct _reent *ptr _AND + struct tms *ptms) +{ + clock_t ret; + + ret = _times (ptms); + return ret; +} +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
timesr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: fstatr.c =================================================================== --- fstatr.c (nonexistent) +++ fstatr.c (revision 345) @@ -0,0 +1,67 @@ +/* Reentrant versions of fstat system call. This implementation just + calls the fstat system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_fstat_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_fstat_r>>---Reentrant version of fstat + +INDEX + _fstat_r + +ANSI_SYNOPSIS + #include + int _fstat_r(struct _reent *<[ptr]>, + int <[fd]>, struct stat *<[pstat]>); + +TRAD_SYNOPSIS + #include + int _fstat_r(<[ptr]>, <[fd]>, <[pstat]>) + struct _reent *<[ptr]>; + int <[fd]>; + struct stat *<[pstat]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_fstat_r (ptr, fd, pstat) + struct _reent *ptr; + int fd; + struct stat *pstat; +{ + int ret; + + errno = 0; + if ((ret = _fstat (fd, pstat)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
fstatr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: gettimeofdayr.c =================================================================== --- gettimeofdayr.c (nonexistent) +++ gettimeofdayr.c (revision 345) @@ -0,0 +1,76 @@ +/* Reentrant version of gettimeofday system call + This implementation just calls the times/gettimeofday system calls. + Gettimeofday may not be available on all targets. It's presence + here is dubious. Consider it for internal use only. */ + +#include +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_gettimeofday_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_gettimeofday_r>>---Reentrant version of gettimeofday + +INDEX + _gettimeofday_r + +ANSI_SYNOPSIS + #include + #include + int _gettimeofday_r(struct _reent *<[ptr]>, + struct timeval *<[ptimeval]>, + void *<[ptimezone]>); + +TRAD_SYNOPSIS + #include + #include + int _gettimeofday_r(<[ptr]>, <[ptimeval]>, <[ptimezone]>) + struct _reent *<[ptr]>; + struct timeval *<[ptimeval]>; + void *<[ptimezone]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. + + This function is only available for a few targets. + Check libc.a to see if its available on yours. +*/ + +int +_DEFUN (_gettimeofday_r, (ptr, ptimeval, ptimezone), + struct _reent *ptr _AND + struct timeval *ptimeval _AND + void *ptimezone) +{ + int ret; + + errno = 0; + if ((ret = _gettimeofday (ptimeval, ptimezone)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
gettimeofdayr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: execr.c =================================================================== --- execr.c (nonexistent) +++ execr.c (revision 345) @@ -0,0 +1,145 @@ +/* Reentrant versions of execution system calls. These + implementations just call the usual system calls. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +/* If NO_EXEC is defined, we don't need these functions. */ + +#if defined (REENTRANT_SYSCALLS_PROVIDED) || defined (NO_EXEC) + +int _dummy_exec_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_execve_r>>---Reentrant version of execve +INDEX + _execve_r + +ANSI_SYNOPSIS + #include + int _execve_r(struct _reent *<[ptr]>, const char *<[name]>, + char *const <[argv]>[], char *const <[env]>[]); + +TRAD_SYNOPSIS + #include + int _execve_r(<[ptr]>, <[name]>, <[argv]>, <[env]>) + struct _reent *<[ptr]>; + char *<[name]>; + char *<[argv]>[]; + char *<[env]>[]; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_execve_r, (ptr, name, argv, env), + struct _reent *ptr _AND + _CONST char *name _AND + char *_CONST argv[] _AND + char *_CONST env[]) +{ + int ret; + + errno = 0; + if ((ret = _execve (name, argv, env)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + + +/* +FUNCTION + <<_fork_r>>---Reentrant version of fork + +INDEX + _fork_r + +ANSI_SYNOPSIS + #include + int _fork_r(struct _reent *<[ptr]>); + +TRAD_SYNOPSIS + #include + int _fork_r(<[ptr]>) + struct _reent *<[ptr]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +#ifndef NO_FORK + +int +_DEFUN (_fork_r, (ptr), + struct _reent *ptr) +{ + int ret; + + errno = 0; + if ((ret = _fork ()) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif + +/* +FUNCTION + <<_wait_r>>---Reentrant version of wait + +INDEX + _wait_r + +ANSI_SYNOPSIS + #include + int _wait_r(struct _reent *<[ptr]>, int *<[status]>); + +TRAD_SYNOPSIS + #include + int _wait_r(<[ptr]>, <[status]>) + struct _reent *<[ptr]>; + int *<[status]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_wait_r, (ptr, status), + struct _reent *ptr _AND + int *status) +{ + int ret; + + errno = 0; + if ((ret = _wait (status)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
execr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: stat64r.c =================================================================== --- stat64r.c (nonexistent) +++ stat64r.c (revision 345) @@ -0,0 +1,68 @@ +/* Reentrant versions of stat64 system call. This implementation just + calls the stat64 system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in + TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_stat64_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_stat64_r>>---Reentrant version of stat64 + +INDEX + _stat64_r + +ANSI_SYNOPSIS + #include + int _stat64_r(struct _reent *<[ptr]>, + const char *<[file]>, struct stat64 *<[pstat]>); + +TRAD_SYNOPSIS + #include + int _stat64_r(<[ptr]>, <[file]>, <[pstat]>) + struct _reent *<[ptr]>; + char *<[file]>; + struct stat64 *<[pstat]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_stat64_r, (ptr, file, pstat), + struct _reent *ptr _AND + _CONST char *file _AND + struct stat64 *pstat) +{ + int ret; + + errno = 0; + if ((ret = _stat64 (file, pstat)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
stat64r.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: writer.c =================================================================== --- writer.c (nonexistent) +++ writer.c (revision 345) @@ -0,0 +1,63 @@ +/* Reentrant versions of write system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_write_r>>---Reentrant version of write + +INDEX + _write_r + +ANSI_SYNOPSIS + #include + _ssize_t _write_r(struct _reent *<[ptr]>, + int <[fd]>, const void *<[buf]>, size_t <[cnt]>); + +TRAD_SYNOPSIS + #include + _ssize_t _write_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) + struct _reent *<[ptr]>; + int <[fd]>; + char *<[buf]>; + size_t <[cnt]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +_ssize_t +_DEFUN (_write_r, (ptr, fd, buf, cnt), + struct _reent *ptr _AND + int fd _AND + _CONST _PTR buf _AND + size_t cnt) +{ + _ssize_t ret; + + errno = 0; + if ((ret = (_ssize_t)_write (fd, buf, cnt)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
writer.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: reent.c =================================================================== --- reent.c (nonexistent) +++ reent.c (revision 345) @@ -0,0 +1,151 @@ +/* +FUNCTION + <>---definition of impure data. + +INDEX + reent + +DESCRIPTION + This module defines the impure data area used by the + non-reentrant functions, such as strtok. +*/ + +#include +#include + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +int errno; + +#endif + +/* Interim cleanup code */ + +void +_DEFUN (cleanup_glue, (ptr, glue), + struct _reent *ptr _AND + struct _glue *glue) +{ + /* Have to reclaim these in reverse order: */ + if (glue->_next) + cleanup_glue (ptr, glue->_next); + + _free_r (ptr, glue); +} + +void +_DEFUN (_reclaim_reent, (ptr), + struct _reent *ptr) +{ + if (ptr != _impure_ptr) + { + /* used by mprec routines. */ +#ifdef _REENT_SMALL + if (ptr->_mp) /* don't bother allocating it! */ + { +#endif + if (_REENT_MP_FREELIST(ptr)) + { + int i; + for (i = 0; i < _Kmax; i++) + { + struct _Bigint *thisone, *nextone; + + nextone = _REENT_MP_FREELIST(ptr)[i]; + while (nextone) + { + thisone = nextone; + nextone = nextone->_next; + _free_r (ptr, thisone); + } + } + + _free_r (ptr, _REENT_MP_FREELIST(ptr)); + } + if (_REENT_MP_RESULT(ptr)) + _free_r (ptr, _REENT_MP_RESULT(ptr)); +#ifdef _REENT_SMALL + } +#endif + +#ifdef _REENT_SMALL + if (ptr->_emergency) + _free_r (ptr, ptr->_emergency); + if (ptr->_mp) + _free_r (ptr, ptr->_mp); + if (ptr->_r48) + _free_r (ptr, ptr->_r48); + if (ptr->_localtime_buf) + _free_r (ptr, ptr->_localtime_buf); + if (ptr->_asctime_buf) + _free_r (ptr, ptr->_asctime_buf); + if (ptr->_atexit && ptr->_atexit->_on_exit_args_ptr) + _free_r (ptr, ptr->_atexit->_on_exit_args_ptr); +#else + /* atexit stuff */ + if ((ptr->_atexit) && (ptr->_atexit != &ptr->_atexit0)) + { + struct _atexit *p, *q; + for (p = ptr->_atexit; p != &ptr->_atexit0;) + { + q = p; + p = p->_next; + _free_r (ptr, q); + } + } +#endif + + if (ptr->_cvtbuf) + _free_r (ptr, ptr->_cvtbuf); + + if (ptr->__sdidinit) + { + /* cleanup won't reclaim memory 'coz usually it's run + before the program exits, and who wants to wait for that? */ + ptr->__cleanup (ptr); + + if (ptr->__sglue._next) + cleanup_glue (ptr, ptr->__sglue._next); + } + + /* Malloc memory not reclaimed; no good way to return memory anyway. */ + + } +} + +/* + * Do atexit() processing and cleanup + * + * NOTE: This is to be executed at task exit. It does not tear anything + * down which is used on a global basis. + */ + +void +_DEFUN (_wrapup_reent, (ptr), struct _reent *ptr) +{ + register struct _atexit *p; + register int n; + + if (ptr == NULL) + ptr = _REENT; + +#ifdef _REENT_SMALL + for (p = ptr->_atexit, n = p ? p->_ind : 0; --n >= 0;) + (*p->_fns[n]) (); +#else + for (p = ptr->_atexit; p; p = p->_next) + for (n = p->_ind; --n >= 0;) + (*p->_fns[n]) (); +#endif + if (ptr->__cleanup) + (*ptr->__cleanup) (ptr); +} +
reent.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: fstat64r.c =================================================================== --- fstat64r.c (nonexistent) +++ fstat64r.c (revision 345) @@ -0,0 +1,72 @@ +/* Reentrant versions of fstat system call. This implementation just + calls the fstat system call. */ + +#include +#include +#include +#include <_syslist.h> + +#ifdef __LARGE64_FILES + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_fstat_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_fstat64_r>>---Reentrant version of fstat64 + +INDEX + _fstat64_r + +ANSI_SYNOPSIS + #include + int _fstat64_r(struct _reent *<[ptr]>, + int <[fd]>, struct stat64 *<[pstat]>); + +TRAD_SYNOPSIS + #include + int _fstat64_r(<[ptr]>, <[fd]>, <[pstat]>) + struct _reent *<[ptr]>; + int <[fd]>; + struct stat *<[pstat]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. This function is only enabled on systems + that define __LARGE64_FILES. +*/ + +int +_DEFUN (_fstat64_r, (ptr, fd, pstat), + struct _reent *ptr _AND + int fd _AND + struct stat64 *pstat) +{ + int ret; + + errno = 0; + if ((ret = _fstat64 (fd, pstat)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */ + +#endif /* __LARGE64_FILES */
fstat64r.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: getreent.c =================================================================== --- getreent.c (nonexistent) +++ getreent.c (revision 345) @@ -0,0 +1,14 @@ +/* default reentrant pointer when multithread enabled */ + +#include <_ansi.h> +#include + +#ifdef __getreent +#undef __getreent +#endif + +struct _reent * +_DEFUN_VOID(__getreent) +{ + return _impure_ptr; +}
getreent.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: linkr.c =================================================================== --- linkr.c (nonexistent) +++ linkr.c (revision 345) @@ -0,0 +1,66 @@ +/* Reentrant versions of file system calls. These implementations + just call the usual system calls. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_link_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_link_r>>---Reentrant version of link + +INDEX + _link_r + +ANSI_SYNOPSIS + #include + int _link_r(struct _reent *<[ptr]>, + const char *<[old]>, const char *<[new]>); + +TRAD_SYNOPSIS + #include + int _link_r(<[ptr]>, <[old]>, <[new]>) + struct _reent *<[ptr]>; + char *<[old]>; + char *<[new]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_link_r, (ptr, old, new), + struct _reent *ptr _AND + _CONST char *old _AND + _CONST char *new) +{ + int ret; + + errno = 0; + if ((ret = _link (old, new)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
linkr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: unlinkr.c =================================================================== --- unlinkr.c (nonexistent) +++ unlinkr.c (revision 345) @@ -0,0 +1,59 @@ +/* Reentrant versions of file system calls. These implementations + just call the usual system calls. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_unlink_r>>---Reentrant version of unlink + +INDEX + _unlink_r + +ANSI_SYNOPSIS + #include + int _unlink_r(struct _reent *<[ptr]>, const char *<[file]>); + +TRAD_SYNOPSIS + #include + int _unlink_r(<[ptr]>, <[file]>) + struct _reent *<[ptr]>; + char *<[file]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_unlink_r, (ptr, file), + struct _reent *ptr _AND + _CONST char *file) +{ + int ret; + + errno = 0; + if ((ret = _unlink (file)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
unlinkr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: openr.c =================================================================== --- openr.c (nonexistent) +++ openr.c (revision 345) @@ -0,0 +1,65 @@ +/* Reentrant versions of open system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_open_r>>---Reentrant version of open + +INDEX + _open_r + +ANSI_SYNOPSIS + #include + int _open_r(struct _reent *<[ptr]>, + const char *<[file]>, int <[flags]>, int <[mode]>); + +TRAD_SYNOPSIS + #include + int _open_r(<[ptr]>, <[file]>, <[flags]>, <[mode]>) + struct _reent *<[ptr]>; + char *<[file]>; + int <[flags]>; + int <[mode]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_open_r, (ptr, file, flags, mode), + struct _reent *ptr _AND + _CONST char *file _AND + int flags _AND + int mode) +{ + int ret; + + errno = 0; + if ((ret = _open (file, flags, mode)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
openr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: sbrkr.c =================================================================== --- sbrkr.c (nonexistent) +++ sbrkr.c (revision 345) @@ -0,0 +1,65 @@ +/* Reentrant version of sbrk system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +/* If MALLOC_PROVIDED is defined, we don't need this function. */ + +#if defined (REENTRANT_SYSCALLS_PROVIDED) || defined (MALLOC_PROVIDED) + +int _dummy_sbrk_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_sbrk_r>>---Reentrant version of sbrk + +INDEX + _sbrk_r + +ANSI_SYNOPSIS + #include + void *_sbrk_r(struct _reent *<[ptr]>, ptrdiff_t <[incr]>); + +TRAD_SYNOPSIS + #include + void *_sbrk_r(<[ptr]>, <[incr]>) + struct _reent *<[ptr]>; + ptrdiff_t <[incr]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +void * +_DEFUN (_sbrk_r, (ptr, incr), + struct _reent *ptr _AND + ptrdiff_t incr) +{ + char *ret; + void *_sbrk(ptrdiff_t); + + errno = 0; + if ((ret = (char *)(_sbrk (incr))) == (void *) -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
sbrkr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: lseekr.c =================================================================== --- lseekr.c (nonexistent) +++ lseekr.c (revision 345) @@ -0,0 +1,63 @@ +/* Reentrant versions of lseek system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_lseek_r>>---Reentrant version of lseek + +INDEX + _lseek_r + +ANSI_SYNOPSIS + #include + off_t _lseek_r(struct _reent *<[ptr]>, + int <[fd]>, off_t <[pos]>, int <[whence]>); + +TRAD_SYNOPSIS + #include + off_t _lseek_r(<[ptr]>, <[fd]>, <[pos]>, <[whence]>) + struct _reent *<[ptr]>; + int <[fd]>; + off_t <[pos]>; + int <[whence]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +_off_t +_DEFUN (_lseek_r, (ptr, fd, pos, whence), + struct _reent *ptr _AND + int fd _AND + _off_t pos _AND + int whence) +{ + _off_t ret; + + errno = 0; + if ((ret = _lseek (fd, pos, whence)) == (_off_t) -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
lseekr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: signgam.c =================================================================== --- signgam.c (nonexistent) +++ signgam.c (revision 345) @@ -0,0 +1,16 @@ +/* The signgam variable is stored in the reentrancy structure. This + function returns its address for use by the macro signgam defined in + math.h. */ + +#include +#include + +#ifndef _REENT_ONLY + +int * +_DEFUN_VOID (__signgam) +{ + return &_REENT_SIGNGAM(_REENT); +} + +#endif
signgam.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: closer.c =================================================================== --- closer.c (nonexistent) +++ closer.c (revision 345) @@ -0,0 +1,58 @@ +/* Reentrant version of close system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_close_r>>---Reentrant version of close + +INDEX + _close_r + +ANSI_SYNOPSIS + #include + int _close_r(struct _reent *<[ptr]>, int <[fd]>); + +TRAD_SYNOPSIS + #include + int _close_r(<[ptr]>, <[fd]>) + struct _reent *<[ptr]>; + int <[fd]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_close_r (ptr, fd) + struct _reent *ptr; + int fd; +{ + int ret; + + errno = 0; + if ((ret = _close (fd)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
closer.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: mkdirr.c =================================================================== --- mkdirr.c (nonexistent) +++ mkdirr.c (revision 345) @@ -0,0 +1,62 @@ +/* Reentrant versions of mkdir system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_mkdir_r>>---Reentrant version of mkdir + +INDEX + _mkdir_r + +ANSI_SYNOPSIS + #include + int _mkdir_r(struct _reent *<[ptr]>, + const char *<[path]>, int <[mode]>); + +TRAD_SYNOPSIS + #include + int _mkdir_r(<[ptr]>, <[path]>, <[mode]>) + struct _reent *<[ptr]>; + char *<[path]>; + int <[mode]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_mkdir_r, (ptr, path, mode), + struct _reent *ptr _AND + _CONST char *path _AND + int mode) +{ + int ret; + + errno = 0; + if ((ret = _mkdir (path, mode)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
mkdirr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: fcntlr.c =================================================================== --- fcntlr.c (nonexistent) +++ fcntlr.c (revision 345) @@ -0,0 +1,65 @@ +/* Reentrant versions of fcntl system call. This implementation just + calls the fcntl system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_fcntl_r>>---Reentrant version of fcntl + +INDEX + _fcntl_r + +ANSI_SYNOPSIS + #include + int _fcntl_r(struct _reent *<[ptr]>, + int <[fd]>, int <[cmd]>, <[arg]>); + +TRAD_SYNOPSIS + #include + int _fcntl_r(<[ptr]>, <[fd]>, <[cmd]>, <[arg]>) + struct _reent *<[ptr]>; + int <[fd]>; + int <[cmd]>; + int <[arg]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_fcntl_r, (ptr, fd, cmd, arg), + struct _reent *ptr _AND + int fd _AND + int cmd _AND + int arg) +{ + int ret; + + errno = 0; + if ((ret = _fcntl (fd, cmd, arg)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
fcntlr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: Makefile.am =================================================================== --- Makefile.am (nonexistent) +++ Makefile.am (revision 345) @@ -0,0 +1,108 @@ +## Process this file with automake to generate Makefile.in + +AUTOMAKE_OPTIONS = cygnus + +INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) + +if HAVE_STDIO64_DIR +STDIO64_SOURCES = \ + fstat64r.c \ + lseek64r.c \ + stat64r.c \ + open64r.c + +STDIO64_DEFS = \ + fstat64r.def \ + lseek64r.def \ + stat64r.def \ + open64r.def +endif + +ELIX_2_SOURCES = $(STDIO64_SOURCES) +ELIX_3_SOURCES = execr.c + +if ELIX_LEVEL_1 +ELIX_SOURCES = +else +if ELIX_LEVEL_2 +ELIX_SOURCES = $(ELIX_2_SOURCES) +else +ELIX_SOURCES = $(ELIX_2_SOURCES) $(ELIX_3_SOURCES) +endif +endif + +GENERAL_SOURCES = \ + closer.c \ + reent.c \ + impure.c \ + fcntlr.c \ + fstatr.c \ + getreent.c \ + gettimeofdayr.c \ + isattyr.c \ + linkr.c \ + lseekr.c \ + mkdirr.c \ + openr.c \ + readr.c \ + renamer.c \ + signalr.c \ + signgam.c \ + sbrkr.c \ + statr.c \ + timesr.c \ + unlinkr.c \ + writer.c + +libreent_la_LDFLAGS = -Xcompiler -nostdlib + +if USE_LIBTOOL +noinst_LTLIBRARIES = libreent.la +libreent_la_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) +noinst_DATA = objectlist.awk.in +else +noinst_LIBRARIES = lib.a +lib_a_SOURCES = $(GENERAL_SOURCES) $(ELIX_SOURCES) +lib_a_CFLAGS = $(AM_CFLAGS) +noinst_DATA = +endif # USE_LIBTOOL + +include $(srcdir)/../../Makefile.shared + +CHEWOUT_FILES = \ + closer.def \ + reent.def \ + execr.def \ + fcntlr.def \ + fstatr.def \ + gettimeofdayr.def \ + linkr.def \ + lseekr.def \ + mkdirr.def \ + openr.def \ + readr.def \ + renamer.def \ + signalr.def \ + sbrkr.def \ + statr.def \ + timesr.def \ + unlinkr.def \ + $(STDIO64_DEFS) \ + writer.def + +SUFFIXES = .def .h + +CHEW = ../../doc/makedoc -f $(srcdir)/../../doc/doc.str + +.c.def: + $(CHEW) < $< > $*.def 2> $*.ref + touch stmp-def + +TARGETDOC = ../tmp.texi + +doc: $(CHEWOUT_FILES) + cat $(srcdir)/reent.tex >> $(TARGETDOC) + +$(lpfx)impure.$(oext): $(srcdir)/impure.c $(srcdir)/../include/sys/reent.h + +CLEANFILES = $(CHEWOUT_FILES) *.ref
Makefile.am Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: renamer.c =================================================================== --- renamer.c (nonexistent) +++ renamer.c (revision 345) @@ -0,0 +1,73 @@ +/* Reentrant version of rename system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_rename_r>>---Reentrant version of rename + +INDEX + _rename_r + +ANSI_SYNOPSIS + #include + int _rename_r(struct _reent *<[ptr]>, + const char *<[old]>, const char *<[new]>); + +TRAD_SYNOPSIS + #include + int _rename_r(<[ptr]>, <[old]>, <[new]>) + struct _reent *<[ptr]>; + char *<[old]>; + char *<[new]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_rename_r, (ptr, old, new), + struct _reent *ptr _AND + _CONST char *old _AND + _CONST char *new) +{ + int ret = 0; + +#ifdef HAVE_RENAME + errno = 0; + if ((ret = _rename (old, new)) == -1 && errno != 0) + ptr->_errno = errno; +#else + if (_link_r (ptr, old, new) == -1) + return -1; + + if (_unlink_r (ptr, old) == -1) + { + /* ??? Should we unlink new? (rhetorical question) */ + return -1; + } +#endif + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
renamer.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: reent.tex =================================================================== --- reent.tex (nonexistent) +++ reent.tex (revision 345) @@ -0,0 +1,117 @@ +@node Reentrancy +@chapter Reentrancy + +@cindex reentrancy +Reentrancy is a characteristic of library functions which allows multiple +processes to use the same address space with assurance that the values stored +in those spaces will remain constant between calls. The Red Hat +newlib implementation of the library functions ensures that +whenever possible, these library functions are reentrant. However, +there are some functions that can not be trivially made reentrant. +Hooks have been provided to allow you to use these functions in a fully +reentrant fashion. + +@findex _reent +@findex reent.h +@cindex reentrancy structure +These hooks use the structure @code{_reent} defined in @file{reent.h}. +A variable defined as @samp{struct _reent} is called a @dfn{reentrancy +structure}. All functions which must manipulate global information are +available in two versions. The first version has the usual name, and +uses a single global instance of the reentrancy structure. The second +has a different name, normally formed by prepending @samp{_} and +appending @samp{_r}, and takes a pointer to the particular reentrancy +structure to use. + +For example, the function @code{fopen} takes two arguments, @var{file} +and @var{mode}, and uses the global reentrancy structure. The function +@code{_fopen_r} takes the arguments, @var{struct_reent}, which is a +pointer to an instance of the reentrancy structure, @var{file} +and @var{mode}. + +There are two versions of @samp{struct _reent}, a normal one and one +for small memory systems, controlled by the @code{_REENT_SMALL} +definition from the (automatically included) @file{}. + +@cindex global reentrancy structure +@findex _impure_ptr +Each function which uses the global reentrancy structure uses the global +variable @code{_impure_ptr}, which points to a reentrancy structure. + +This means that you have two ways to achieve reentrancy. Both require +that each thread of execution control initialize a unique global +variable of type @samp{struct _reent}: + +@enumerate +@item +@cindex extra argument, reentrant fns +Use the reentrant versions of the library functions, after initializing +a global reentrancy structure for each process. Use the pointer to this +structure as the extra argument for all library functions. + +@item +Ensure that each thread of execution control has a pointer to its own +unique reentrancy structure in the global variable @code{_impure_ptr}, +and call the standard library subroutines. +@end enumerate + +@cindex list of reentrant functions +@cindex reentrant function list +The following functions are provided in both reentrant +and non-reentrant versions. + +@example +@exdent @emph{Equivalent for errno variable:} +_errno_r + +@exdent @emph{Locale functions:} +_localeconv_r _setlocale_r + +@exdent @emph{Equivalents for stdio variables:} +_stdin_r _stdout_r _stderr_r + +@page +@exdent @emph{Stdio functions:} +_fdopen_r _perror_r _tempnam_r +_fopen_r _putchar_r _tmpnam_r +_getchar_r _puts_r _tmpfile_r +_gets_r _remove_r _vfprintf_r +_iprintf_r _rename_r _vsnprintf_r +_mkstemp_r _snprintf_r _vsprintf_r +_mktemp_t _sprintf_r + +@exdent @emph{Signal functions:} +_init_signal_r _signal_r +_kill_r __sigtramp_r +_raise_r + +@exdent @emph{Stdlib functions:} +_calloc_r _mblen_r _setenv_r +_dtoa_r _mbstowcs_r _srand_r +_free_r _mbtowc_r _strtod_r +_getenv_r _memalign_r _strtol_r +_mallinfo_r _mstats_r _strtoul_r +_malloc_r _putenv_r _system_r +_malloc_r _rand_r _wcstombs_r +_malloc_stats_r _realloc_r _wctomb_r + +@exdent @emph{String functions:} +_strdup_r _strtok_r + +@exdent @emph{System functions:} +_close_r _link_r _unlink_r +_execve_r _lseek_r _wait_r +_fcntl_r _open_r _write_r +_fork_r _read_r +_fstat_r _sbrk_r +_gettimeofday_r _stat_r +_getpid_r _times_r + +@ifset STDIO64 +@exdent @emph{Additional 64-bit I/O System functions:} +_fstat64_r _lseek64_r _open64_r +@end ifset + +@exdent @emph{Time function:} +_asctime_r +@end example Index: open64r.c =================================================================== --- open64r.c (nonexistent) +++ open64r.c (revision 345) @@ -0,0 +1,69 @@ +/* Reentrant versions of open system call. */ + +#include +#include +#include +#include <_syslist.h> + +#ifdef __LARGE64_FILES + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_open64_r>>---Reentrant version of open64 + +INDEX + _open64_r + +ANSI_SYNOPSIS + #include + int _open64_r(struct _reent *<[ptr]>, + const char *<[file]>, int <[flags]>, int <[mode]>); + +TRAD_SYNOPSIS + #include + int _open64_r(<[ptr]>, <[file]>, <[flags]>, <[mode]>) + struct _reent *<[ptr]>; + char *<[file]>; + int <[flags]>; + int <[mode]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. This function only exists on systems with + large file support. +*/ + +int +_open64_r (ptr, file, flags, mode) + struct _reent *ptr; + _CONST char *file; + int flags; + int mode; +{ + int ret; + + errno = 0; + if ((ret = _open64 (file, flags, mode)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */ + +#endif /* __LARGE64_FILES */
open64r.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: readr.c =================================================================== --- readr.c (nonexistent) +++ readr.c (revision 345) @@ -0,0 +1,63 @@ +/* Reentrant versions of read system call. */ + +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of this functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifndef REENTRANT_SYSCALLS_PROVIDED + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_read_r>>---Reentrant version of read + +INDEX + _read_r + +ANSI_SYNOPSIS + #include + _ssize_t _read_r(struct _reent *<[ptr]>, + int <[fd]>, void *<[buf]>, size_t <[cnt]>); + +TRAD_SYNOPSIS + #include + _ssize_t _read_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) + struct _reent *<[ptr]>; + int <[fd]>; + char *<[buf]>; + size_t <[cnt]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +_ssize_t +_DEFUN (_read_r, (ptr, fd, buf, cnt), + struct _reent *ptr _AND + int fd _AND + _PTR buf _AND + size_t cnt) +{ + _ssize_t ret; + + errno = 0; + if ((ret = (_ssize_t)_read (fd, buf, cnt)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
readr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: statr.c =================================================================== --- statr.c (nonexistent) +++ statr.c (revision 345) @@ -0,0 +1,68 @@ +/* Reentrant versions of stat system call. This implementation just + calls the stat system call. */ + +#include +#include +#include +#include <_syslist.h> + +/* Some targets provides their own versions of these functions. Those + targets should define REENTRANT_SYSCALLS_PROVIDED in + TARGET_CFLAGS. */ + +#ifdef _REENT_ONLY +#ifndef REENTRANT_SYSCALLS_PROVIDED +#define REENTRANT_SYSCALLS_PROVIDED +#endif +#endif + +#ifdef REENTRANT_SYSCALLS_PROVIDED + +int _dummy_stat_syscalls = 1; + +#else + +/* We use the errno variable used by the system dependent layer. */ +#undef errno +extern int errno; + +/* +FUNCTION + <<_stat_r>>---Reentrant version of stat + +INDEX + _stat_r + +ANSI_SYNOPSIS + #include + int _stat_r(struct _reent *<[ptr]>, + const char *<[file]>, struct stat *<[pstat]>); + +TRAD_SYNOPSIS + #include + int _stat_r(<[ptr]>, <[file]>, <[pstat]>) + struct _reent *<[ptr]>; + char *<[file]>; + struct stat *<[pstat]>; + +DESCRIPTION + This is a reentrant version of <>. It + takes a pointer to the global data block, which holds + <>. +*/ + +int +_DEFUN (_stat_r, (ptr, file, pstat), + struct _reent *ptr _AND + _CONST char *file _AND + struct stat *pstat) +{ + int ret; + + errno = 0; + if ((ret = _stat (file, pstat)) == -1 && errno != 0) + ptr->_errno = errno; + return ret; +} + +#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
statr.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.