The lib can be compiled five different ways for Linux-8086 standard, Linux-8086 with 'First arg in AX', MS-DOS, BCC-386 or for GNU-386. At the moment the 386 versions are missing some _very_ important bits. This can be done by running. make PLATFORM=i86-FAST clean all make PLATFORM=i86-DOS clean all an so on. SYSTEM CALLS The system call table (syscalls/syscall.dat) is constantly changing, using skewed versions is _very_ likely to give you segfaults and strange behaviour. For this lib you should use the same version of elksemu. The system call table will only be frozen when the linux-86 kernel is running and reasonably stable. THE COMPILER You should use the versions of bcc, unproto, as86, ld86 and elksemu that are in this version of the combined development environment. Some other versions will work but often they'll just appear to work or not work at all. The standard bcc-cc1 won't pickup the right header files, the standard ld86 won't generate COM files and looks in the wrong place for crt0.o and libc.a. Main Subdirectories. bcc Lots of BCC helper functions error The C error functions. grp Routines for /etc/group, from Nat include Some include files, some new others Glib or Glib hacked. kinclude Kernel include files, here for now. malloc1 My malloc routines malloc2 Joel's malloc routines misc Various larger functions msdos This is the equlivent of the syscall directory for msdos. pwd Routines for /etc/passwd, from Nat regexp Standard regular expression parser stdio1 Joel's standard I/O functions - as yet rather incomplete stdio2 My standard I/O string The functions for string.h syscall All the system call functions, and a few tied lib ones. termios Termimal mode control. utmp /etc/utmp updating tests Various C programs used to test the lib. Directory structure: The top Makefile will try to call any "Makefile" it finds in a subdirectory, so to add a new chunk to "libc.a" just drop in the directory a Makefile that understands "make clean" and "make libc.a" (Which must also update ../libc.a) There's now a tiny script (New_subdir) that'll do this. Make config will look in all subdirectories for a file 'Config' any it finds will be displayed and can be used to switch a directory on or off. The exit(rv) function is already defined. It will call the contents of the function pointer (*__cleanup)() before it calls _exit(); This pointer should be used through the 'atexit' or 'on_exit' lib functions. (See standard man pages) If you need to call something before main see the file 'Pre_main'. -Robert -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-