(CHEWOUT_FILES): Added unlinkr.def.
* libc/reent/Makefile.in: Rebuilt.
* libc/sys.tex: Include unlinkr.def.
* libc/reent/linkr.c (_unlink_r): Moved to...
* libc/reent/unlinkr.c: ... new file.
+Wed Mar 8 00:46:41 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * libc/reent/Makefile.am (lib_a_SOURCES): Added unlinkr.c.
+ (CHEWOUT_FILES): Added unlinkr.def.
+ * libc/reent/Makefile.in: Rebuilt.
+ * libc/sys.tex: Include unlinkr.def.
+ * libc/reent/linkr.c (_unlink_r): Moved to...
+ * libc/reent/unlinkr.c: ... new file.
+
Wed Mar 8 00:43:07 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* libc/string/Makefile.am (lib_a_SOURCES): Added swab.c.
sbrkr.c \
statr.c \
timer.c \
+ unlinkr.c \
writer.c
CHEWOUT_FILES = \
sbrkr.def \
statr.def \
timer.def \
+ unlinkr.def \
writer.def
SUFFIXES = .def .h
sbrkr.c \
statr.c \
timer.c \
+ unlinkr.c \
writer.c
sbrkr.def \
statr.def \
timer.def \
+ unlinkr.def \
writer.def
LIBS = @LIBS@
lib_a_LIBADD =
lib_a_OBJECTS = closer.o reent.o impure.o execr.o fstatr.o linkr.o \
-lseekr.o openr.o readr.o signalr.o sbrkr.o statr.o timer.o writer.o
+lseekr.o openr.o readr.o signalr.o sbrkr.o statr.o timer.o unlinkr.o writer.o
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
return ret;
}
-/*
-FUNCTION
- <<_unlink_r>>---Reentrant version of unlink
-
-INDEX
- _unlink_r
-
-ANSI_SYNOPSIS
- #include <reent.h>
- int _unlink_r(struct _reent *<[ptr]>, const char *<[file]>);
-
-TRAD_SYNOPSIS
- #include <reent.h>
- int _unlink_r(<[ptr]>, <[file]>)
- struct _reent *<[ptr]>;
- char *<[file]>;
-
-DESCRIPTION
- This is a reentrant version of <<unlink>>. It
- takes a pointer to the global data block, which holds
- <<errno>>.
-*/
-
-int
-_unlink_r (ptr, file)
- struct _reent *ptr;
- _CONST char *file;
-{
- int ret;
-
- errno = 0;
- if ((ret = _unlink (file)) == -1 && errno != 0)
- ptr->_errno = errno;
- return ret;
-}
-
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
--- /dev/null
+/* Reentrant versions of file system calls. These implementations
+ just call the usual system calls. */
+
+#include <reent.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
+
+#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 <reent.h>
+ int _unlink_r(struct _reent *<[ptr]>, const char *<[file]>);
+
+TRAD_SYNOPSIS
+ #include <reent.h>
+ int _unlink_r(<[ptr]>, <[file]>)
+ struct _reent *<[ptr]>;
+ char *<[file]>;
+
+DESCRIPTION
+ This is a reentrant version of <<unlink>>. It
+ takes a pointer to the global data block, which holds
+ <<errno>>.
+*/
+
+int
+_unlink_r (ptr, file)
+ struct _reent *ptr;
+ _CONST char *file;
+{
+ int ret;
+
+ errno = 0;
+ if ((ret = _unlink (file)) == -1 && errno != 0)
+ ptr->_errno = errno;
+ return ret;
+}
+
+#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
@include reent/statr.def
@include reent/fstatr.def
@include reent/linkr.def
+@include reent/unlinkr.def
@include reent/sbrkr.def
@up
@end ignore