16 Feburary 1994

This is the current source to the libc_s file. I have the following
problems so if you have some answers then please don't hesitate to
let me know.

1. I have uploaded to the development directory on tsx11, the bintools
   package which I use to build the library. In addition, you will need
   a COFF assembler. The standard GNU assembler on prep.ai.mit.edu will
   work very well. Configure the assembler with the line:

   ./configure --target=i386-unknown-coff

   and make the assembler.

   Don't use a 486 mode for building the header/header.o file. The branch
   table must be exactly 5 bytes in size for each entry. If you use the 486
   mode then the assembler will round each branch entry to 8 bytes and the
   result will not work. I simply used the 386 mode for all modules. (That
   is the reason for the i386-unknown-coff rather than i486-unknown-coff.)

   The bintools package will not work as distributed. A patch to the
   bintools is included in the 'tools' directory. The compiled tools are
   on tsx-11 if you don't wish to get the source and make it yourself.

2. The directory "missing" is nothing but stub files for the objects.
   I started this with every procedure mentioned in the missing
   directory. Then as I would write / edit / collect / extract a
   procedure I would put it in a directory. The link script loads the
   missing directory last so that any procedure not defined in the 
   "real" stuff is supplied with an appropriate item from the missing
   list.

   If everything was perfect, then only the "illegal" procedure would
   be used. Yes, there are some holes in the branch table. The purpose
   of the "illegal" procedure is to fill those holes with something
   that will print a message. It is not the best solution, but it is a
   solution.

   Unfortunately, there are some procedures which I can not deduce. It
   may be that I am simply calling them by a different name and already
   have them defined.

   The procedures are:

   _bufsync
   _findbuf
   _findiop
   _flsbuf

   The routine clearerr() does not simply clear the error flags. I haven't
   found what it does at the present time. However, it seems to be called
   with no parameters and it traverses all of the files doing something to
   them. It is called following the fwrite call in perl. This is the latest
   reason for traps in perl.

   _wrtchk
 
   The wrtchk function tests to determine if the file is writable. It also
   does something with buffers. I haven't quite determined what it does at
   the present time.

3. I have compiled the files with the maximum level of warnings. There are
   no warnings generated by the entire library for COFF mode. I haven't
   tried any other mode.

   Recent changes to the library have introduced a new set of warnings. I'll
   fix them when I can get perl to run properly.

4. The original directory structure was very ad-hoc. Eric Youndale cleaned
   up the structure. Thanks, Eric.

5. The include files used by iBCS and Linux are different. When possible
   I used the LINUX files. The include directory should contain all the
   include files used by the library. Please do not reference the main
   set of include files for Linux. If you find that you need an include
   file, then copy it to the include directory or merge the changes into
   the existing include file. Be careful of the structures. The structures
   used in the include file are, for the most part, iBCS format. Noteably
   the stdio's FILE structure is totally different.

6. The stdio package is totally new. It is un-proven at this time. I'll try
   to run the cygnus test suite against the library when I can get it to
   build properly. The rest of the library was lifted from Linux's, BSD's,
   etc.

7. There are many more files included than are needed to make the library.
   Notably the sysdep directory has functions which are not needed in the
   library. I plan to weed out the excess at the suitable time frame.

DO NOT USE THE A.OUT ASSEMBLER TO BUILD A SHARED LIBRARY WITH THIS CODE.

The a.out object file is totally un-suitable for ibcs shared libraries. I
spent about two weeks and came to that sad conclusion when I ended up with
a 5 MB shared library because there is no provision for specifying the
starting data address.

--
Al Longyear                longyear@netcom.com           longyear@sii.com
