aboutsummaryrefslogtreecommitdiff
path: root/libgloss
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-06-25 22:17:04 +0000
committerJeff Johnston <jjohnstn@redhat.com>2004-06-25 22:17:04 +0000
commitdce592cd8c5237dafba82dfcb1e97192250322b9 (patch)
treebe2fe28d4cc5304daf68d0a70e737283a3bceac3 /libgloss
parentd68d3538bb0cd6c1aabbf05232cdd70e9d4b48c7 (diff)
downloadnewlib-dce592cd8c5237dafba82dfcb1e97192250322b9.zip
newlib-dce592cd8c5237dafba82dfcb1e97192250322b9.tar.gz
newlib-dce592cd8c5237dafba82dfcb1e97192250322b9.tar.bz2
2004-06-25 Jeff Johnston <jjohnstn@redhat.com>
* libnosys/_exit.c: New file. * libnosys/Makefile.in: Add _exit.o.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog5
-rw-r--r--libgloss/libnosys/Makefile.in2
-rw-r--r--libgloss/libnosys/_exit.c15
3 files changed, 21 insertions, 1 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index 7780986..807192d 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,3 +1,8 @@
+2004-06-25 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libnosys/_exit.c: New file.
+ * libnosys/Makefile.in: Add _exit.o.
+
2004-06-17 Jeff Johnston <jjohnstn@redhat.com>
* arm/configure.in: Check the value of newlib-may-supply-syscalls
diff --git a/libgloss/libnosys/Makefile.in b/libgloss/libnosys/Makefile.in
index 3aaf04d..62f8caa 100644
--- a/libgloss/libnosys/Makefile.in
+++ b/libgloss/libnosys/Makefile.in
@@ -66,7 +66,7 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \
# object files needed
OBJS = close.o environ.o errno.o execve.o fork.o fstat.o getpid.o gettod.o \
isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o \
- times.o unlink.o wait.o write.o
+ times.o unlink.o wait.o write.o _exit.o
# Object files specific to particular targets.
EVALOBJS = ${OBJS}
diff --git a/libgloss/libnosys/_exit.c b/libgloss/libnosys/_exit.c
new file mode 100644
index 0000000..d4dd232
--- /dev/null
+++ b/libgloss/libnosys/_exit.c
@@ -0,0 +1,15 @@
+/* Stub version of _exit. */
+
+#include <limits.h>
+#include "config.h"
+#include <_ansi.h>
+#include <_syslist.h>
+
+_VOID
+_DEFUN (_exit, (rc),
+ int rc)
+{
+ /* Default stub just causes a divide by 0 exception. */
+ int x = rc / INT_MAX;
+ x = 4 / x;
+}