cechew@bruce.OZ (Earl Chew) (09/06/89)
This new set of patches tries to patch up some lint problems. The major fixes are to do with atexit() and exit(). The ordering for the library could be generated using lorder and tsort. The line from Makefile.unx specifies how this is done: ar cr $(STDIO) `lorder $(LIBOBJ) | tsort` $(EXIT) where STDIO, LIBOBJ and EXIT are: STDIO= stdio.a LIBOBJ= _allocbu.o _filbuf.o _file.o _flsbuf.o \ _fopen.o _slot.o atexit.o fclose.o \ fdopen.o fflush.o fgetc.o fgets.o \ fopen.o fprintf.o fputc.o fputs.o \ fread.o freopen.o fscanf.o fseek.o \ ftell.o fwrite.o gets.o getw.o \ printf.o puts.o putw.o rewind.o \ scanf.o setbuf.o setvbuf.o sprintf.o \ sscanf.o stdio.o ungetc.o vfprintf.o \ vfscanf.o vprintf.o vscanf.o vsprintf.o \ vsscanf.o EXIT= exit.o _fakfls.o With the full library it would be necessary to combine the rest of the library objects with LIBOBJ. The last two files in the library should be those in EXIT. For those cross compiling under MsDos and using .lib libraries, the only way that I have found that works consistently is to split the library into two parts. libc.lib contains LIBOBJ and the rest of the library. exit.lib contains only EXIT. When linking specify libc.lib first then exit.lib. Have a look in Makefile.dos for some inspiration. Earl