From 5613ba3c0749fa494d35c4dc36b57c5b4e6edb55 Mon Sep 17 00:00:00 2001 From: Robert de Bath Date: Thu, 31 Jul 2003 21:29:34 +0200 Subject: Import Dev86src-0.16.12.tar.gz --- libc/bios/Makefile | 4 ++-- libc/bios/bios.c | 13 +++++++++++++ libc/error/Makefile | 7 +++---- libc/include/assert.h | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-) (limited to 'libc') diff --git a/libc/bios/Makefile b/libc/bios/Makefile index ffa5027..b491e98 100644 --- a/libc/bios/Makefile +++ b/libc/bios/Makefile @@ -4,7 +4,7 @@ ifeq ($(LIB_OS),BIOS) ASRC=bios.c -AOBJ=bios_start.o bios_isatty.o bios_nofiles.o \ +AOBJ=bios_start.o bios_isatty.o bios_abort.o bios_nofiles.o \ bios_read.o bios_write.o bios_lseek.o bios_close.o BSRC=bios_vid.c @@ -12,7 +12,7 @@ BOBJ=bios_putch.o bios_getch.o bios_getche.o bios_cputs.o bios_kbhit.o \ bios_rdline.o CSRC=bios_min.c -COBJ=bios_putc.o bios_getc.o +COBJ=bios_putc.o bios_getc.o bios_khit.o DSRC=bios_disk.c DOBJ=bios_disk_rd.o bios_disk_wr.o bios_disk_rs.o bios_get_dpt.o diff --git a/libc/bios/bios.c b/libc/bios/bios.c index 3e10686..41b02c2 100644 --- a/libc/bios/bios.c +++ b/libc/bios/bios.c @@ -257,6 +257,19 @@ int fd; /****************************************************************************/ +#ifdef L_bios_abort +abort() +{ + static const char msg[] = "Program aborted, press return:"; + write(2, msg, sizeof(msg)-1); + getch(); + _exit(255); +} + +#endif + +/****************************************************************************/ + #endif #endif #endif diff --git a/libc/error/Makefile b/libc/error/Makefile index 8ec26dc..f14e956 100644 --- a/libc/error/Makefile +++ b/libc/error/Makefile @@ -6,13 +6,12 @@ CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) ifeq ($(LIB_OS),ELKS) OBJ=error.o sys_errlist.o perror.o sys_siglist.o __assert.o +else +OBJ=__assert.o +endif all: $(LIBC)($(OBJ)) @$(RM) $(OBJ) -else -all: - @: -endif clean: rm -f *.o libc.a diff --git a/libc/include/assert.h b/libc/include/assert.h index c58c57f..aef6cdf 100644 --- a/libc/include/assert.h +++ b/libc/include/assert.h @@ -1,4 +1,4 @@ -#ifdef __ASSERT_H +#ifndef __ASSERT_H #define __ASSERT_H #include -- cgit v1.2.1