aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib')
-rw-r--r--com32/lib/Makefile4
-rw-r--r--com32/lib/exit.c42
2 files changed, 44 insertions, 2 deletions
diff --git a/com32/lib/Makefile b/com32/lib/Makefile
index 9896befd..8b622c8a 100644
--- a/com32/lib/Makefile
+++ b/com32/lib/Makefile
@@ -5,7 +5,7 @@ LIBOBJS = abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \
ctypes.o errno.o fgetc.o fgets.o fopen.o fprintf.o fputc.o \
fputs.o fread2.o fread.o free.o fwrite2.o fwrite.o getopt.o \
lrand48.o malloc.o memccpy.o memchr.o memcmp.o memcpy.o \
- memmem.o memmove.o memset.o memswap.o onexit.o perror.o \
+ memmem.o memmove.o memset.o memswap.o exit.o onexit.o perror.o \
printf.o puts.o qsort.o realloc.o seed48.o snprintf.o \
sprintf.o srand48.o sscanf.o stack.o strcasecmp.o strcat.o \
strchr.o strcmp.o strcpy.o strdup.o strerror.o strlen.o \
@@ -20,7 +20,7 @@ LIBOBJS = abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \
libgcc/__moddi3.o sys/entry.o sys/exit.o sys/fileinfo.o \
sys/opendev.o sys/read.o sys/write.o sys/close.o sys/open.o \
sys/fileread.o sys/fileclose.o sys/isatty.o sys/openconsole.o \
- sys/line_input.o \
+ sys/line_input.o \
sys/stdcon_read.o sys/stdcon_write.o \
sys/rawcon_read.o sys/rawcon_write.o \
sys/err_read.o sys/err_write.o \
diff --git a/com32/lib/exit.c b/com32/lib/exit.c
index e69de29b..dcbbf373 100644
--- a/com32/lib/exit.c
+++ b/com32/lib/exit.c
@@ -0,0 +1,42 @@
+#ident "$Id$"
+/* ----------------------------------------------------------------------- *
+ *
+ * Copyright 2004 H. Peter Anvin - All Rights Reserved
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom
+ * the Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall
+ * be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * ----------------------------------------------------------------------- */
+
+/*
+ * exit.c
+ *
+ * The regular exit
+ */
+
+#include <stdlib.h>
+
+extern __noreturn (*__exit_handler)(int);
+
+__noreturn exit(int rv)
+{
+ __exit_handler(rv);
+}