Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!nosc!cod!broman From: broman@cod.NOSC.MIL (Vincent P. Broman) Newsgroups: comp.os.minix Subject: Cross compiling 1.3 with Turbo-C Message-ID: <1163@cod.NOSC.MIL> Date: 20 Jul 88 16:39:09 GMT Organization: Naval Ocean Systems Center, San Diego Lines: 55 I've been cross-compiling Minix v1.3 using Turbo-C v1.5 and A86 v3.15 with very few problems. (Nice, cheap system!) I list some fixes below, and eventually will post a complete kit, but first a question --- Dos2out needs to know the text-size of the .EXE program it's converting, and it gets the info from the program's relocation table. Can someone explain when and why a small-model compilation produces relocation table entries? The crtso.asm supplied with Minix does something like "mov ax,DGROUP" to magically create one entry which reveals the size of the program text. How?? Minor fixes to allow compilation of /lib --- /include/minix/const.h line 10 is intended as a stumblingblock for the compiler if neither i8088 nor ATARI_ST are #defined. However the line should not be "#Either_i8088_or_ATARI_ST"... but rather "#error Either i8088 or ATARI_ST"... or "Either i8088 or ATARI_ST"... so cpp will not complain of an invalid preprocessor command when the necessary #define has been supplied. /lib/fopen.c line 2 is missing a #include "lib.h" or else a #include extern int errno; /lib/malloc.c line 1 should have its "#define i8088 1" protected by a "#ifndef i8088" so as not to redefine the symbol. /lib/regexp.c line 1002 is missing this declaration inside a function extern char *strchr(); And a mystery appeared in connection with /lib/regexp.c line 377 when the compiler warned "code has no effect in function regbranch" in reference to this fragment --- if (chain == NULL) (void) regnode (NOTHING); and inspection suggests chain is often non NULL and function regnode does do some actions with the argument NOTHING. Have I not analysed it closely enough? Vincent Broman, code 632, Naval Ocean Systems Center, San Diego, CA 92152, USA Phone: +1 619 553 1641 Internet: broman@nosc.mil Uucp: sdcsvax!nosc!broman