scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 91a85e0d7900626ac7f1591145781db56c07f083
parent 2e6af0449443b9307aa880883645598ecbc66f86
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Wed,  6 Dec 2017 20:30:59 +0100

[lib/c] Add abort()

Diffstat:
Mlib/c/src/Makefile | 4++--
Alib/c/src/abort.c | 12++++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/lib/c/src/Makefile b/lib/c/src/Makefile @@ -9,11 +9,11 @@ OBJ = assert.o strcpy.o strcmp.o strlen.o strchr.o \ isalnum.o isalpha.o isascii.o isblank.o iscntrl.o isdigit.o \ isgraph.o islower.o isprint.o ispunct.o isspace.o isupper.o \ isxdigit.o toupper.o tolower.o ctype.o setlocale.o \ - localeconv.o atoi.o atol.o atoll.o atexit.o exit.o \ printf.o fprintf.o vfprintf.o \ fgets.o gets.of fgetc.o fputc.o getchar.o putchar.o \ fputs.o puts.o fread.o fwrite.o \ - realloc.o calloc.o malloc.o + realloc.o calloc.o malloc.o \ + localeconv.o atoi.o atol.o atoll.o atexit.o abort.o exit.o all: $(ARCH)-libc.a diff --git a/lib/c/src/abort.c b/lib/c/src/abort.c @@ -0,0 +1,12 @@ + +#include <signal.h> +#include <stdio.h> +#include <stdlib.h> +#undef abort + +void +abort(void) +{ + raise(SIGABRT); + _Exit(127); +}