
This is the README for libc-8086-0.0.1.tar.gz
Robert de Bath,  13/Dec/95, rdebath@cix.compulink.co.uk

Well, lots of bits'n'pieces, so far only slowly coming together as a lib.

The main subdirectories are:

string		The functions for string.h
bcc		Lots of BCC helper functions
		(many from linuxmt/arch/i86/lib where the *don't* belong!)
syscall		All the system call functions, and a few tied lib ones.
misc		Various larger functions

include		Some include files, some new others Glib or Glib hacked.
		(They are a _real_ mess ATM and very light on the ground)

		 NOTE for cross compiling I've put a patch on BCC (see
		 below) that removes /usr/include from the default path.

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)

      The exit(rv) function is already defined. It will call the contents
      of the function pointer (*__cleanup)() before it calls _exit();
      Beware, atexit() will also need to hook this vector.

There are symlinks in the archive, they assume a layout something like:

  Linux_8086
  Linux_8086/libc	This Libc
  Linux_8086/linuxmt	The Elks Kernel
  Linux_8086/ELKSemu	The Elks Emulator
  Linux_8086/bcc	Compiler src
  Linux_8086/as		Assembler
  Linux_8086/ld		Linker

-=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-

Dec 12 95
Just completed a working debugged malloc set _including_ a 'fake' alloca
function. (The assembler version will not work for BCC) It's a classical
algorthm so may be slow in some cases. I had a look at the GNU malloc ...
erm ... I _think_ I see what they're doing!  :-)

Dec 13 95
Now I understand, ELKS != linuxmt despite the directory names, Ok round
with the header files!!

-=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-

Patch for BCC to remove /usr/include from the default include search path.

--- input.c.org	Wed Dec 13 13:35:14 1995
+++ input.c	Mon Dec 11 15:35:18 1995
@@ -47,7 +47,9 @@
 				/* between first and last */
 PRIVATE struct inclist inclast =
 {
+#ifdef DEFAULT_INCLUDE_DIR
     DEFAULT_INCLUDE_DIR,
+#endif
     NULL,
 };
 PRIVATE fastin_t inclevel;	/* nest level of include files */
--- os.h.org	Wed Dec 13 13:34:53 1995
+++ os.h	Mon Dec 11 15:30:14 1995
@@ -26,7 +26,9 @@
 #define EOLTO 10		/* target newline */
 #define DIRCHAR '/'
 #define DIRSTRING "/"
+#if 0
 #define DEFAULT_INCLUDE_DIR "/usr/include"
+#endif
 #define isabspath(fnameptr, tempcptr) \
 	((*(tempcptr) = *(fnameptr)) == DIRCHAR)
 
-=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-

Getting closer with 'ft' (The file tool) it only needs these now:

bcc -O -Iinclude  -s -0 ft.c   -o ft
include/arch/types.h:48.14 (from include/linuxmt/types.h:4) (from include/sys/types.h:1) (from ft.c:13): warning: redefined macro
undefined symbol: _printf
undefined symbol: _fprintf
undefined symbol: _opendir
undefined symbol: _stderr
undefined symbol: _readdir
undefined symbol: _getgrnam
undefined symbol: _strtol
undefined symbol: _strerror
undefined symbol: _endgrent
undefined symbol: _getgrgid
undefined symbol: _endpwent
undefined symbol: _getpwuid
undefined symbol: _getpwnam
make: *** [ft] Error 1

BTW: The redefined macro is 'NULL' which homes in stdio.h

-=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=- -=*=-


