
LibExt:
** A Fine Selection of Missing Un*x-style Interfaces for emx/gcc :-) **




			Dedication:
			===========
			The lbxproxy program has various options, 
			all of which are optional.
                                                      -- lbxproxy(1)




Warning: This is not a release version. 

Distribution is prohibited, unless you accept and impose on all users the 
following conditions:

1) This is an experimental alpha stadium library which will cause severe problems 
   or even considerable damage, if I am not experienced enough to handle 
   experimental code.
   I will use the library for testing purposes only, after previous subscription 
   to:
	posix2@borneo.gmd.de

    More info:

	http://posix2.sourceforge.net/

   Requests will be forwarded to the list owner for approval.

2) I am asked to report all outstanding bugs and send fixes to posix2@borneo.gmd.de. This is not an obligation.


For more info please read the text/header files. You can find them in:

	include/* and docs/*.txt, docs/html/*.html

The source file and directory structure closely follows common standard headers;
assuming familiarity with them, this provides for quick orientation. Please consult
the respective Makefiles for manual configuration options.

Note: stdlib.h, sys/stat.h, etc. replace the emx version: Some prototypes of bsd 
functions have changed with the newer version used here; struct stat has been
changed for bsd compatibility.

If source- and headerfiles do not explicitly state a restrictive copyright, 
the code is put into public domain. Commercial usage is encouraged.
Feedback, bug fixes, moral support, success notes (or donations of any form ;-), is
always welcome. Please send us your own improved implementations of Posix or 
X/Open interfaces, so that we can include them into our collection.

	A. Hanses <Arnd.H.Hanses@rz.ruhr-uni-bochum.de>
	A. Mai <st002279@hrzpub.tu-darmstadt.de>

Note: Inlining of some functions is done by default and needs gcc 2.8.x or 
above. To disable, use '-fno-inline' switch. To use with -Zomf or *.lib do not 
forget to 

	SET LINK386=/NOIGNORECASE

To run all tests just run 'gmake run'. You may want to investigate the 
following DEBUG flags (cf. Makefile):

-DTHREAD_EXPERIMENTAL -DDEBUG -D_DEBUG -D_USE_HRTIMER_SYS -DGNUFNS 

Grep the sources to learn what they are doing.

The included math library is Sun's freely distributable libm with additional patches
and fixes by NetBSD/OpenBSD and some more fixes. By default it behaves posixly 
correct, but you can choose at runtime another behaviour, e.g. barebone IEEE:

  _LIB_VERSION = _IEEE_;

Read math.h and libm/Makefile for details.

Limitations: 

 o fstat() is quite restricted, compared to stat(). Fix me!

 o math stuff is partly untested. Test me!

Some exported functions of extensions.a/.lib (for more look into exp):
===============================================
The library revision:
 -- From extensions.a(rev.o) --
  "_libExtensions_vcmp"
  "_libExtensions_rev"
  "_libExtensions_vprt"

  -- From extensions.a(getitimer.o) -- :
The itimer functions (measure time in an Unix-compatible way):
  "_getitimer"
  "_setitimer"
  "_CpItimerVals" (Convenience utility: Copy two itimerval structs.)
  "getitimer"  (Get Remaining Time on Timer 'which')
  "setitimer" (Set the interrupt timer)

  -- From extensions.a(sync.o) -- :
Write data to disk:
  "_sync"
  "sync"
NAME:     sync - fight paranoia, commit cache to disk 

  -- From extensions.a(gnumath.o) -- :
Addititonal math interfaces (Unix-style):
  "hypot"
  "expm1"
  "log1p"
  "log1pl"
  "asinh"
  "asinhl"
  "acosh"
  "acoshl"
  "atanh"
  "atanhl"
  "coshm1"
  "acosh1p"
  "logb"
  "drem"
  "sincos"
  "pow2"

  -- From extensions.a(usleep.o) -- :
Sleep with a granularity of micro-seconds (needs HRTIMER.SYS):
  "_initHrTimer"
  "_termHrTimer"
  "usleep"

  -- From extensions.a(doserrtb.o) -- :
A table to convert OS/2 return codes to ANSI errno:
  "__doserrtb_sysErr2ErrnoTab"

  -- From extensions.a(cpfile.o) -- :
Copy files and fake Posix-style symlink():
  "_cpfile"
  "symlink"
  "_symlink"

  -- From extensions.a(strxtens.o) -- :
Some BSD-interfaces for additional compare functions:
  "_strsep"
  "strsep"
  "strcasecmp"
  "memcasecmp"
  "strncasecmp"

  -- From extensions.a(poll.o) -- :
A SYSV-style interface for file multi-plexing:
  "poll"

SYSV-style better pseudo random-numbers:
  -- From extensions.a(drand48.o) -- :
  "srand48"
  "seed48"
  "nrand48"
  "mrand48"
  "lrand48"
  "lcong48"
  "jrand48"
  "erand48"
  "drand48"

4.4 BSD-style better pseudo random-numbers:
; From extensions.a(random.o)
  "_srandom"
  "_random"
  "_srandomdev"
  "_initstate"
  "_setstate"
  "initstate"
  "random"
  "setstate"
  "srandom"
  "srandomdev"

; From extensions.a(heapsort.o)
  "_heapsort"
  "heapsort"

; From extensions.a(radixsort.o)
  "_radixsort"
  "_sradixsort"
  "radixsort"
  "sradixsort"

  -- From extensions.a(dlfcn.o) -- :
A Solaris-style interface to dynamically resolve symbols:
  "dlopen"
  "dlerror"
  "dlsym"
  "dlclose"

; From extensions.a(statx.o)
  "_lstat"
  "lstat"

; From extensions.a(stubs.o)
  "_chown"
  "chown"

and even many more... See exp.


More Info:
=========

Please refer to any common tutorial dealing with portable Posix/U*ix 
programming. U*ix/BSD or Linux manual pages are often indispensable.

Documentation in docs/*.txt and docs/*.html. Manual pages in docs/man/man*.

The various test programs are not meant as usage examples; nevertheless
you can find some useful hints there and in the top-level Makefile. 
Please feel free to add more tests for other pathological cases.

Link with: 

-Zmt -Zbsd-signals -Lpath_to_library -lapplication_libs -lextensions -lmore_libs

