Do you have a question? Post it now! No Registration Necessary
- Robert Kaiser
July 28, 2003, 7:47 pm

snipped-for-privacy@yahoo.com (James Huang) writes:

This is IMHO a bug in the BCC distribution: in assert.h, there is an
"#ifdef" that should be an "#ifndef". Here is a patch against the current
dev86 source tree to fix this problem (and a few others, too):
-------------------------- cut here ------------------------------
diff -urN dev86-0.16.11/libc/bios/Makefile dev86-0.16.11.rob/libc/bios/Makefile
--- dev86-0.16.11/libc/bios/Makefile Sat Aug 3 14:04:40 2002
+++ dev86-0.16.11.rob/libc/bios/Makefile Mon Jul 28 21:27:49 2003
@@ -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_kbhit.o bios_nofiles.o \
bios_read.o bios_write.o bios_lseek.o bios_close.o
BSRC=bios_vid.c
@@ -12,7 +12,7 @@
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 -urN dev86-0.16.11/libc/error/Makefile dev86-0.16.11.rob/libc/error/Makefile
--- dev86-0.16.11/libc/error/Makefile Sat Mar 8 21:11:22 1997
+++ dev86-0.16.11.rob/libc/error/Makefile Mon Jul 28 21:09:46 2003
@@ -6,13 +6,12 @@
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 -urN dev86-0.16.11/libc/error/__assert.c
dev86-0.16.11.rob/libc/error/__assert.c
--- dev86-0.16.11/libc/error/__assert.c Sun Mar 3 22:29:51 1996
+++ dev86-0.16.11.rob/libc/error/__assert.c Mon Jul 28 21:10:59 2003
@@ -24,5 +24,10 @@
errput(" at line ");
errput(itoa(linenumber));
errput(".\n");
+#ifdef __STANDALONE__
+ errput("Program Halted.\n");
+ while(1);
+#else
abort();
+#endif
}
diff -urN dev86-0.16.11/libc/include/assert.h
dev86-0.16.11.rob/libc/include/assert.h
--- dev86-0.16.11/libc/include/assert.h Sat Feb 24 16:21:20 1996
+++ dev86-0.16.11.rob/libc/include/assert.h Mon Jul 28 20:10:15 2003
@@ -1,4 +1,4 @@
-#ifdef __ASSERT_H
+#ifndef __ASSERT_H
#define __ASSERT_H
#include <features.h>
-------------------------- cut here ------------------------------
Get the latest source tarball (version 0.16.11) from
http://www.cix.co.uk/~mayday /, apply this patch,
do a make; make install. That should do it.
Rob

This is IMHO a bug in the BCC distribution: in assert.h, there is an
"#ifdef" that should be an "#ifndef". Here is a patch against the current
dev86 source tree to fix this problem (and a few others, too):
-------------------------- cut here ------------------------------
diff -urN dev86-0.16.11/libc/bios/Makefile dev86-0.16.11.rob/libc/bios/Makefile
--- dev86-0.16.11/libc/bios/Makefile Sat Aug 3 14:04:40 2002
+++ dev86-0.16.11.rob/libc/bios/Makefile Mon Jul 28 21:27:49 2003
@@ -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_kbhit.o bios_nofiles.o \
bios_read.o bios_write.o bios_lseek.o bios_close.o
BSRC=bios_vid.c
@@ -12,7 +12,7 @@
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 -urN dev86-0.16.11/libc/error/Makefile dev86-0.16.11.rob/libc/error/Makefile
--- dev86-0.16.11/libc/error/Makefile Sat Mar 8 21:11:22 1997
+++ dev86-0.16.11.rob/libc/error/Makefile Mon Jul 28 21:09:46 2003
@@ -6,13 +6,12 @@
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 -urN dev86-0.16.11/libc/error/__assert.c
dev86-0.16.11.rob/libc/error/__assert.c
--- dev86-0.16.11/libc/error/__assert.c Sun Mar 3 22:29:51 1996
+++ dev86-0.16.11.rob/libc/error/__assert.c Mon Jul 28 21:10:59 2003
@@ -24,5 +24,10 @@
errput(" at line ");
errput(itoa(linenumber));
errput(".\n");
+#ifdef __STANDALONE__
+ errput("Program Halted.\n");
+ while(1);
+#else
abort();
+#endif
}
diff -urN dev86-0.16.11/libc/include/assert.h
dev86-0.16.11.rob/libc/include/assert.h
--- dev86-0.16.11/libc/include/assert.h Sat Feb 24 16:21:20 1996
+++ dev86-0.16.11.rob/libc/include/assert.h Mon Jul 28 20:10:15 2003
@@ -1,4 +1,4 @@
-#ifdef __ASSERT_H
+#ifndef __ASSERT_H
#define __ASSERT_H
#include <features.h>
-------------------------- cut here ------------------------------
Get the latest source tarball (version 0.16.11) from
http://www.cix.co.uk/~mayday /, apply this patch,
do a make; make install. That should do it.
Rob
--
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO AG http://www.elinos.com
Robert Kaiser email: rkaiser AT sysgo DOT de
SYSGO AG http://www.elinos.com
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Embedded Linux Distribution?
- — Next thread in » Embedded Linux
-
- » How to check the dependence with kernel and glibc
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Samstag ist Antennentag - 2 parallele Dipole mit Phasenverschiebung der Speisung
- — The site's Newest Thread. Posted in » Electronics (German)
-