The lib can be compiled six different ways for Linux-8086 standard, Linux-8086 with 'First arg in AX', Linx-8086 standalone, MS-DOS, BCC-386 or for GNU-386. At the moment the 386 GNU version will NOT work, the BCC-386 is just barely working. This can be done by running one of. make PLATFORM=i86-FAST clean all make PLATFORM=i86-DOS clean all make PLATFORM=i86-BIOS clean all make PLATFORM=i386-BCC clean all 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 386 version is using a distinct list that matches the Linux-i386 syscall list. 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 or 386-Linux files and looks in the wrong place for crt0.o and libc.a. Main Subdirectories. bcc Lots of BCC helper functions bios Minimal 'system' calls for standalone executables. error The C error functions. grp Routines for /etc/group, from Nat i386fp BCC's floating point routines for 386 code. 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 stdio2 My standard I/O string The functions for string.h syscall All the system call functions, and some tied lib ones. termios Termimal mode control. utmp /etc/utmp updating time Unix time related functions. 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 -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-