Sun Jul 15 13:52:59 CEST 2007  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.6.
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 6.

Sun Jul  8 19:14:58 CEST 2007  John-Mark Bell  <jmb202@ecs.soton.ac.uk>
                               John Tytgat  <John.Tytgat@aaug.net>

	* source/pthread/_context.s: enabled pthread Wimp filter code after
	fixing following:
	(start_call_every,stop_call_every) full register + processor flag
	preserve.
	(__pthread_start_ticker, __pthread_stop_ticker) post filter mask was
	inverted.
	(__pthread_start_ticker) recheck if we're not yet a task since last
	check.
	* source/sys/_syslib.s: don't write bogus GBL_TASKHANDLE when
	Wimp_ReadSysInfo fails.
	* source/test/pthread/create-join.c: new pthread test case.

Wed May 23 20:31:26 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unixlib/types.h: Fix typo in typedef.

Sun Apr 29 17:55:43 CEST 2007  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/unix/unix.c(find_redirection_type): don't go beyond start of
	cmdline when it starts with the redirection_type character or one or
	more digits followed by the redirection_type character.

Tue Mar 27 01:48:55 CEST 2007  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/unix.h(__get_cpu_arch): Declare.  Gives rough
	indication which ARM architecture we're running on.
	* source/sys/_getcpuarch.s(__get_cpu_arch): New file.
	* unix/uname.c(uname): changed utsname.sysname from "riscos" into
	"RISC OS" and utsname.machine from "arm-acorn" into "armvxl" with 'x'
	the major ARM architecture digit.

Thu Jan 18 21:59:26 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/errno.h: Change EDEADLK value for TCPIPLibs
	compatibility and add ENOTSUP.

Sun Jan 14 16:38:22 2007  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/errno.h: Change EAGAIN value to the same as
	EWOULDBLOCK, to match TCPIPLibs and Linux.

Thu Jan 11 21:48:46 CET 2007  Martin Wuerthner  <martin@mw-software.com>

	* source/common/riscosify.c (__riscosify_scl): Incorrect program name
	  determination for programs run as "*Run MyLibrary:myprog".

Sun Dec 24 15:01:25 PST 2006  Peter Naulls <peter@chocky.org>

	* source/sys/exec.c: Add to the hack that checks whether we use
	 argv[0] or not - canonicalise RISC OS versions of the filenames before
	 comparing.

Mon Dec 04 01:59:39 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/string/strnicmp.c: Compare lowercased versions of strings
	rather than uppercase. This matches the manpage (and what stricmp
	does).

Tue Nov 21 21:45:22 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/sync.c (fsync): Don't error on files open with 
	  O_RDWR

Sat Oct 21 22:38:13 CEST 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/regex.h: Made it usable for C++ programs.

Wed Oct  4 23:13:35 CEST 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/exec.c (execve): Made code slightly less obfuscated.

Tue Sep 26 23:14:57 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/time/mktime.c: Fix corruption of input structure (bug #152)

Thu Sep 14 01:25:05 CEST 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.5.
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 5.
	* Docs/ReadMe: reformated last change.

Wed Sep 13 22:13:35 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/common/riscosify.c (riscosify_scl): Add support for
	  UnixEnv$foo$sfix.

Sat Sep  9 12:24:32 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (readdir_r): Fix suffix swapping code.
	  Fix the result value (POSIX states it should be the value of
	  entry, or NULL).

Fri Sep  8 16:42:35 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/common/unixify.c: Fix unixify early exits to return pointer to
	  buffer rather than pointer to NULL terminator.
	* source/test/testunixify.c: Add test for "..".

Mon Sep  4 06:43:03 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/Makefile.in, source/common/riscosify.c: Avoid using hard-wired
	  "/home/riscos/env/" path.
	 * source/clib/bits/posix_opt.h: Refine further.

Sat Aug 26 16:59:31 CEST 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/pthread/{*.c,*.s}: Removed CVS keywords and made Copyright
	  statements conforming.
	* source/pthread/_context.s: Fixed comment.
	* source/pthread/_yield.s: Renamed callback_return to
	  __pthread_yield_return and gave it an APCS function name so we see
	  the thread waiting in the backtrace.
	* source/pthread/_ints.s: Use SWP instead off swp_arm2 macro.
	* source/pthread/_exit.s: Small optimisation.
	* source/signal.post.c(__write_backtrace,__write_backtrace_thead):
	  output backtrace per created thread.
	* source/signal/_signal.s: Updated comments.
	  (__h_exit) Setup signal stackhandler as the USR26/USR32 registers
	  can not be trusted (e.g. TaskManager calling OS_Exit when <Alt><Break>
	  gets pressed).
	* source/clib/unixlib/buildoptions.h: Removed __UNIXLIB_SWP_SUPPORTED. No
	  longer supporting or pretending to support ARM2.
	* source/incl-local/internal/aof-macros.s: Removed swp_arm2 macro.
	* source/incl-local/internal/elf-macros.s: Likewise.
	* source/sys/_syslib.s: Likewise.  Tabbified.

Sun Aug 13 11:45:32 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/sys/_syslib.s: Improve XScale check (from John-Mark Bell /
	  Adrian Lees).
	* source/wchar/mbsrtowcs.c: Add alias.

Sat Aug 12 07:15:40 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/unix/sync.c: More robust handling of file handles.

Thu Aug 10 20:48:03 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/bits/posix_opt.h: Revise further
	* Docs/ReadMe: Update with notes about POSIX compatibility

Thu Aug 10 13:53:58 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/sys/_syslib.s: Check for RISC OS 5 when built for XScale.

Sun Aug  6 12:47:09 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/Makefile.in: Mark generated clib/unixlib/buildoptions.s file
	  clearly as a derived file.
	* debug/dvsprintf.c: don't make use of routines which have stack
	  checking enabled.  Write all info via __os_print() and not via stderr.
	* source/clib/unixlib/buildoptions.s: Removed (it will be generated
	  in the build).
	* source/clib/unixlib/asm_dec.s: Added SIGSTAK as alias for SIGEMT.
	* source/clib/bits/signum.h: Made SIGSTAK an alias for SIGEMT instead
	  of allocating an unique signal number (which is already beyound
	  the currently 32 supported signal set).
	* source/signal/signame.c: Reformated.
	* source/clib/unixlib/sigstate.h,source/signal/post.c,
	  source/signal/_demangle.s: respect the __cxa_demangle() API, i.e. all
	  its buffers are heap buffers.
	* sys/stackalloc.c: Include sys/debug.h when #define DEBUG is done.
	  (incr_downards): add check if downwards stack increasing doesn't mean
	  going lower than zero page.

Sat Aug  5 16:33:17 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/bits/posix_opt.h: Be less optimistic about what
	  we support.
	* source/clib/bits/signum.h: Declare SIGSTAK for compatibility
	  with Acorn C.

Wed Aug  2 08:41:59 PDT 2006  Peter Naulls  <peter@chocky.org>

	* source/clib/unistd.h, source/clib/bits/posix_opt.h: Add
	  posix_opt header and set RISC OS features.  In particular,
	  set flags indicating UnixLib supports POSIX threads, required
	  by X libraries.

Sun Jul 30 19:12:17 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/sigstate.h,source/signal/_demangle.s
	  (__unixlib_cxa_demangle): via WEAK symbol, make libstdc++'s
	  __cxa_demangle routine available internally when it's possible.
	* source/signal/post.c(extract_name): make use of
	  __unixlib_cxa_demangle during __write_backtrace.
	* source/signal/post.c(__write_backtrace): don't output registers
	  when __ul_callbackfp is NULL as then they don't make any sense.
	* source/stdlib/_rand48.c: Removed bogus CVS tags.
	* source/signal/_signal.s,source_sys/_syslib.s: Minor comment
	  improvement.
	* Docs/Changelog: char 0xA0 -> 0x20.

Sat Jul 15 21:35:32 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/tty.c,source/clib/unixlib/fd.h: minor src code cleanup.
	* source/clib/unixlib/unix.h,source/common/funcallerr.c: made
	  __UNIXLIB_PARANOID build working again and added extra test on
	  function pointers be lower than __ul_memory.appspace_himem value.

Sun Jul  9 13:52:36 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Remove part of previous change so that
	  names such as foo/bar.c get translated correctly.

Fri Jun 16 12:03:17 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/stdio/scanf.c: Fix handling of width-limited character classes.
	  Previously re-read the last character that matched the format string.
	* source/test/stdio/tsscanf.c: Testcase for the above.

Thu Jun  8 00:17:00 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.4
	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 4.
	* source/signal/post.c (__write_backtrace): show explicitly the
	  processor mode and flags when in 26bit mode; show memory contents of
	  disassembled part as words and ASCII interpretation of its bytes.

Wed Jun  7 22:52:47 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/sys/_syslib.s: Search for SUL in UnixLib:Modules
	  as well as System:Modules.

Sun May 21 20:36:42 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Don't do suffix swapping if the leafname
	  has a / in it.
	* source/test/testriscosify.c: Add extra testcase.

Tue Apr 11 17:40:56 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Allocate some memory to store the head of the
	  linked list so user mode code does not need to access the module
	  private word.
	  Fixed R4 corruption of SWI SharedUnixLibrary_RegisterUpCall.

Fri Mar 10 21:25:47 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Prevent canonicalising program name if it is
	  just a leafname.

Thu Mar  9 19:33:31 2006  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unistd.h: Add lchown().
	* source/unistd/lchown.c: New file.

Sun Feb 26 23:51:25 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/netlib/getaddrinfo.c(gai_strerror): Always wrongly returned
	  "Unknown error".
	* source/resolv/gethnameaddr.c(gethostbyname2): Use hosts file as
	  fallback when resolv query failed.

Tue Feb 14 23:31:18 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/features.h (__ULIBC_MINOR__): Bump minor version to 3.

Mon Feb 14 00:39:17 2006  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Update version to 4.3
	* Docs.ReadMe: Current iconv module version is 0.07.  Also using more
	  stable URL.

Sun Feb 12 17:31:43 2006  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/common/unixify.c: Obey __RISCOSIFY_NO_REVERSE_SUFFIX.

Sun Feb 12 13:29:24 2006  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/stdio.h (__io_mode): Changed struct into union so that
	  all bits can be set to zero in __getmode() in a more clean way.
	* source/stdio/fclose.c (fclose): Following stdio.h(__io_mode) change.
	* source/stdio/fflush.c (fflush): Likewise.
	* source/stdio/filbuf.c (check_stream): Likewise.
	* source/stdio/fopen.c (fopen, fdopen): Likewise.
	* source/stdio/fpos.c (fseek, ftell): Likewise.
	* source/stdio/fread.c (fread): Likewise.
	* source/stdio/freopen.c (freopen): Likewise.
	* source/stdio/fwrite.c (fwrite): Likewise.
	* source/stdio/getc.c (fgetc): Likewise.
	* source/stdio/newstream.c (__stream_init, __getmode): Likewise.
	* source/stdio/popen.c (pclose): Likewise.
	* source/stdio/printf.c (vsnprintf): Likewise.
	* source/stdio/putc.c (fputc): Likewise.
	* source/stdio/scanf.c (vsscanf): Likewise.
	* source/stdio/setbuf.c (setvbuf): Likewise.
	* source/stdio/ungetc.c (ungetc): Likewise.
	* source/stdio/vfprintf.c (__vfprintf): Likewise.
	* source/gcccompat/_galloca.s: Added missing END.
	* source/unix/dirent.c: Reduced compiler warnings.
	* source/unix/open.c: Likewise.
	* source/unix/select.c: Likewise.
	* source/unix/unix.c: Likewise.

Sun Jan 29 00:29:13 2006  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: DRenderer is now part of GCCSDK where further development
	  can take place.

Wed Dec 14 21:07:03 2005  Peter Naulls  <peter@chocky.org>

	* !Help: Update version to 4.2
	* source/sound/dsp.c: Buffer calculation improvements 
	  from Alan Buckley.
	* source/clib/local.h, source/common/unixify.c:
          New __unixify_ext function.

Sun Dec  4 17:11:31 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c: Don't convert absolute filenames that
	  are already in Unix format.

Wed Nov 16 03:38:56 2005  John Tytgat  <John.Tytgat@aaug.net>

	* Removed EMBED_RCSID.
	* Removed 'register' keyword in all non-imported source files.

Sun Nov 13 15:44:22 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Cope with command lines where RISC OS has
	  stripped the temporary FS from the start.

Sat Nov 12 17:43:11 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/sys/exec.c: Strip any spaces before the command.
	* source/unix/dev.c (__pipeselect): Don't block on EOF.
	* source/unix/fcntl.c: Search for next free file descriptor rather
	  than assuming the one given is unused.
	* source/unix/unix.c (__alloc_file_descriptor): Allow starting
	  descriptor to be specified.
	  (check_fd_redirection): Use dup2 rather than fcntl so old
	  descriptor gets closed.
	* source/clib/unixlib/fd.h (__alloc_file_descriptor): Add parameter.
	* source/netlib/accept.c: Likewise.
	* source/netlib/socket.c: Likewise.
	* source/unix/open.c: Likewise.
	* source/unix/pipe.c: Likewise.

Sun Nov  6 14:38:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* gen-makefiles.pl: Attempt to strip out incorrect dependencies added
	  by gcc -M.

Mon Oct 10 14:20:00 2005  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe: Misc corrections and updates.
	* source/sys/_swi.s: Correct _swix() output arguments.
	  Fix from Bob Brand.
	* source/unix/mkdir.c: Spot more directory creation
	  failure variants.

Sat Sep 24 22:24:47 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Add an additional check of the command line
	  when searching for a process struct to use (Bug#142).

Sat Sep 24 20:39:23 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/fcntl.c: Close-on-exec flag should be cleared on
	  duplicated file descriptors (Bug#146).

Fri Aug 26 00:12:33 2005  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* regexp/{COPYRIGHT,regcomp.c,regcustom.h,regc_color.h,regc_cvec.h,
	          regc_lex.h,regc_locale.h,regc_nfa.h,regerror.c,regerrs.h,
	          regexec.c,rege_dfa.h,regfree.c,regguts.h}, clib/regex.h:
	  Import regex implementation from PostgreSQL - this is significantly
	  faster than the existing implementation.
	* regexp/{cclass.h,cname.h,engine.h,regex2.h,utils.h}: Remove redundant
	  files.
	* Docs/Copyright: Add details of regex implementation licencing.

Sun Jul 31 16:17:49 2005  John Tytgat  <John.Tytgat@aaug.net>

	* clib/unixlib/{asm_dec.s,unix.h}, sys/_syslib.s: For some time UnixLib
	  required the FPEmulator so __fpflag is not really needed.  Renamed to
	  __notused1 (and not longer exported) so that we can reuse the space for
	  something else in the future. Renamed GBL_FPFLAG to GBL_NOTUSED1.

Sat Jul 23 13:45:59 2005  Peter Naulls  <peter@chocky.org>

	* common/unixify.c: Fully fix earlier fix.
	* clib/unixlib/os.h, signal/_signal.s: Make __ul_seterr
	  return -1 on error.
	* stdlib/alloc.c: Allow debug version to compile.
	* debug/dvsprintf.c: Use stderr for output once initialised.
	* unix/fcntl.c: Dummy file locking functionality.
	* unix/mkdir.c: Set ENOENT when the RISC OS error is "Not found".

Wed Jul 20 19:27:41 2005  Peter Naulls  <peter@chocky.org>

	* source/common/unixify.c: Correct conversion case when
	  file is in root directory.
	* elf/convert-unixlib.pl: Correct install location for GCC 4.1.

Thu Jul 14 23:29:00 2005  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (__unixinit): Terminating NULL in environment list
	  could sometimes be written outside allocated buffer.

Fri Jul  8 15:34:42 2005  Peter Naulls  <peter@chocky.org>

	* UnixLib 4.2 release.

Fri Jul  8 14:23:04 2005  Peter Naulls  <peter@chocky.org>

	* pthread/keydest.c: Use free_unlocked instead of free to
	  match allocation.
	* sys/brk.c: Fix spelling mistake.
	* unix/unix.c: Convert process filename to Unix format;
	  patch from John Tytgat.

Fri Jun 17 11:05:25 2005  Nick Burrett  <nick@sqrt.co.uk>

	* libm-support/libm.c: New file.

Thu Jun 16 20:44:38 2005  Alex Waugh  <alex@alexwaugh.com>

	* time/utimes.c: Fix time convertion.

Thu Jun 16 14:51:14 2005  Alex Waugh  <alex@alexwaugh.com>

	* pthreads/context.c: Ensure the first thread in the list can
	  be freed when it is idle.

Thu Jun 16 14:24:59 2005  Theo Markettos  <theo@markettos.org.uk>

	* common/riscosify.c: Add support for mapping /home/riscos/env/foo
	  to foo:
	* test/testriscosify.c: Add more tests.

Mon Jun 13 14:55:30 2005  Peter Naulls  <peter@chocky.org>

	* clib/netdb.h: Remove bogus extra AI_PASSIVE.
	* clib/bits/sched.h, clib/pthread.h, clib/sched.h: Arrange
	  things a bit more like glibc (Allows problems with files named
	  sched.h to build).
	* gcccompat/_galloc.s, libm-dbl64/s_isnan.c,
	  incl-local/internal/math.h: Norcroft compatibility.
	* module/sul.s: Increase file handles to 256 as per UnixLib.
	  Bump version to 1.07.
	* source/sys/_syslib.s: Required SharedUnixLibrary 1.07.

Sat May 28 21:52:15 2005  Peter Naulls  <peter@chocky.org>

	* common/unixify.c: Ensure we don't run off the end of the input
	  buffer.
	* clib/errno.h: #define errno as itself, to allow for checks
	  that errno exists to work.
	* clib/sys/ioctl.h: Some TCPIPLibs compatibility (not implemented).

Mon May 16 22:30:29 2005  Peter Naulls  <peter@chocky.org>

	* stdio/fwrite.c (fwrite): Make (v)snprintf with null parameters
	  work properly.  Correct byte count.

Fri May 13 22:17:31 2005  Peter Naulls  <peter@chocky.org>

	* test/pthread/fork.c: Correct spelling.
	* Makefile.in: Stronger warning flags.
	* clib/features.h, libm-dbl64/s_finite.c, libm-flt32/s_finitef.c,
	  search/hsearch.c, search/hsearch_r.c, search/lsearch.c,
	  vfprintf.c: Make code work with new flags
	* stdio/fwrite.c (fwrite): Tidy and correctly return number of
	  items written.
	* stdio/printf (vsnprintf): Correctly terminate buffer.
	* stdio/putc.c (putc_unlocked): Implement new function.

Sat May  7 16:35:02 2005  Nick Burrett  <nick@sqrt.co.uk>

	* features.h (__ULIBC_MINOR__): Bump version to 1.

Sat May  7 16:08:52 2005  Stefan Bellon  <sbellon@sbellon.de>

	* signal/post.c (sigsetup): Casting fixes for Norcroft compatibility
	* sys/exec.c (execve): Likewise.

Sat May  7 10:14:36 2005  Nick Burrett  <nick@sqrt.co.uk>

	Software-floating point support.
	* source/Makefile.in (LIBM_FLAGS): Remove.
	* incl-local/math_private.h (LITTLE_ENDI): Define flags here according
	to value of __FLOAT_WORD_ORDER.
	(HIGH_HALF): Define.
	(LOW_HALF): Define.
	(BIG_ENDI): Define
	* endian.h (__FLOAT_BIT_ORDER): Define.
	(__FLOAT_WORD_ORDER): Define.
	* ieee754.h: Redefine unions according to values of __FLOAT_BIT_ORDER
	and __FLOAT_WORD_ORDER.
	* gdtoa/fpmath.h: Likewise.
	* gdtoa/arith.h: Include endian.h.
	* incl-local/internal/elf-macros.s (__SOFTFP__): Define to zero,
	if not defined.
	* incl-local/internal/math.h: Include endian.h.  Add structures
	to cope with little-endian __FLOAT_WORD_ORDER.
	* libm-dbl64/branred.c: Include <math_private.h> first, drop
	inclusion of endian.h.
	* libm-dbl64/{dosincos.c, e_asin, e_atan2.c, e_exp.c}: Likewise.
	* libm-dbl64/{e_log.c, e_pow.c, e_remainder.c, mpa.c}: Likewise.
	* libm-dbl64/{mpatan.c, mpatan2.c, mpexp.c, mplog.c}: Likewise.
	* libm-dbl64/{mpsqrt.c, mptan.c, s_atan.c, s_sin.c}: Likewise.
	* libm-dbl64/{sincos32.c, slowexp.c, slowpow.c}: Likewise.
	* libm-dbl64/upow.h: Swap ordering of 'static' and 'const'.

	* fenv/fclrexcpt.c: Use __SOFTFP__ rather than __SOFT_FLOAT__.
	* fenv/fedisblxcpt.c: Likewise.
	* fenv/fegetexcept.c: Likewise.
	* fenv/feholdexcpt.c: Likewise.
	* fenv/fesetenv.c: Likewise.
	* fenv/fraiseexcpt.c: Likewise.
	* fenv/fsetexcptflg.c: Likewise.
	* fenv/ftestexcept.c: Likewise.

	* stdlib/alloc.c (malloc): Check for __pthread_system_running
	before enabling/disabling interrupts.
	(free, realloc, memalign, valloc, pvalloc, calloc): Likewise.
	(cfree, malloc_trim): Likewise.

	* bits/signum.h: New file.
	* signal.h: Move all signal number definitions e.g. SIGHUP into
	bits/signum.h.
	(SIG_ERR, SIG_DFL, SIG_IGN, NSIG): Likewise.

Fri May  6 11:54:07 2005  Peter Naulls  <peter@chocky.org>

	* UnixLib 4.1 release.

Fri May  6 10:10:16 2005  Peter Naulls  <peter@chocky.org>

	* clib/sys/select.h: Add NFDBITS constant.
	* sys/_syslib.s: Require SharedUnixLibrary 1.06

Tue May  3 15:56:47 2005  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* clib/sys/queue.h: Update to more recent version including more
	  queue types.
	
Mon May  2 14:51:58 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (sul_fork): For consistency, shrink parent pid to
	30-bits.
	* gcccompat/galloca.c: New file for GCC 4 alloca implementation.
	* gcccompat/_galloca.s: New file for GCC 4 alloca implementation.
	* pthread/_exit.s (__pthread_exit): Call __gcc_alloca_thread_free_all.

Mon May  2 14:24:06 2005  Peter Naulls  <peter@chocky.org>

	* fenv/fclrexcpt.c, fenv/fedisblxcpt.c, fenv/egetexcept.c,
	  fenv/feholdexcpt.c, fenv/fesetenv.c, fenv/fraiseexcpt.c,
	  fenv/setexcptflg.c, fenv/testexcept.c: Do nothing interesting
	  when using soft-float.
	* pthread/_context.s: Don't save FP regs when using soft-float
	* sys/_jmp.s: Similarly.
	* sys/_syslib.s: Leave FP status register alone when using soft-float
	* incl-local/internal/aof-macros.s: Add missing END.

Mon May  2 13:45:54 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (alloc_proc): Shrink the stored pid to 30-bits
	to work around applications that test for fork failure by testing
	(pid < 0).
	(sul_fork): Expand/shrink pid to/from 32-bits where necessary.
	(sul_exec): Likewise.
	(sul_exit): Likewise.

Sun May  1 15:54:36 2005  Nick Burrett  <nick@sqrt.co.uk>

	* module/sul.s (help): Move tab char onto seperate line to aid
	ELF conversion script.

Sun May  1 13:17:47 2005  Nick Burrett  <nick@sqrt.co.uk>

	* string/strtok_r.c (strtok_r): Check for a NULL save_ptr.
	* string/stricmp.c (stricmp): Corner case fix.

Sun May  1 11:22:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/strtol.c: Import from FreeBSD libc, includes bug fixes.
	* stdlib/strtoul.c: Likewise.
	* stdlib/atoi.c: New file, split from strtol.c.
	* stdlib/atol.c: New file, split from strtol.c.
	
Sat Apr 30 16:15:13 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/features.c (__get_program_name): For ELF, dereference weak
	symbol to verify whether it exists.
	* sys/mman.c (mmap): Likewise.

Sat Apr 30 14:55:04 2005  Nick Burrett  <nick@sqrt.co.uk>

	Ease the conversion from AOF to ELF.
	* gcccompat/_divdi3.s: Change local label names to support ELF syntax.
	* gcccompat/_udivdi3.s: Likewise.
	* gcccompat/_moddi3.s: Likewise.
	* gcccompat/_umoddi3.s: Likewise.
	* sys/_jmp.s (__longjmp_fatal_msg): Ease translation to ELF syntax.
	* incl-local/internal/elf-macros.s (macro NAME): Place quotes around
	name.  Move .altmacro directive out of macro.
	* common/_exist.s: Remove quotes from NAME statements.
	* common/_riscosify.s: Likewise.
	* signal/_signal.s: Likewise.
	* sys/_syslib.s: Likewise.
	
Sat Apr 30 13:32:23 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/asm_dec.s: Move MACRO definitions to aid ELF conversion ...
	* incl-local/internal/aof-macros.s: ... here.
	* incl-local/internal/elf-macros.s: New file, providing ELF versions
	of the AOF macros.

Sat Apr 30 12:36:51 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/__stat.c: Renamed from common/stat.c to avoid filename
	clash with unix/stat.c.

Sat Apr 30 11:14:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/exec.c (execve): Fix call usage of malloc_trim_unlocked.

Fri Apr 29 19:23:19 2005  Peter Naulls  <peter@chocky.org>

	* clib/assert.h: Make NDEBUG work under C++.
	* clib/netdb.h, netlib/getaddrinfo.c: getaddrinfo and friends
	  implementation.

Fri Apr 29 13:43:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Remove double-underscore
	prefix from 'unixlib_stack', 'robase', 'rwlomem', 'rwbase',
	'unixlib_stack_limit' and 'old_himem'.
	Change types for those variables from void* to 'unsigned int'
	as they aren't pointers and it reduces the number of explicit
	casts.
	(__stackalloc_incr_wimpslot): Change parameter types.
	* resource/initialise.c (__resource_initialise): Fix accordingly.
	* resource/ulimit.c (ulimit): Likewise.
	* debug/debug.c (__debug): Likewise.
	* common/funcallerr.c (__funcall_error): Likewise.
	* signal/post.c (sigsetup): Likewise.  Change types for 'low' and
	'high' and 'handler_addr' to unsigned int to avoid a lot of
	unnecessary casts.
	* sys/exec.c (execve): Use new variable names.  Call unlocked
	variant of malloc_trim.
	* sys/stackalloc.c (__stackalloc_incr_wimpslot): Change return
	type to 'unsigned int'.
	(incr_upwards): Renamed from '__stackalloc_incr_upwards'.
	(incr_downards): Renamed from '__stackalloc_incr_downwards'.
	(__stackalloc): Use new function names.

	* math.h (struct exception): Add const qualifier to 'name' to clear up
	compile-time warnings.
	* resolv/resolv.h (struct res_sym): Likewise for 'name' and
	'humanname'.
	
	Norcroft fixes from Stefan Bellon.
	* pthread/atfork.c: Include malloc.h.
	* pthread/key.c: Include malloc.h.
	* stdlib/alloc.c (malloc_trim): Cast return type of
	malloc_trim_unlocked.

Fri Apr 29 11:02:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	Remove the dual-purpose use of 'rwlomem' and '__unixlib_break'
	for both read/write application memory and dynamic areas.
	* unixlib/asm_dec.s (MEM_RWBREAK, MWM_DABREAK): New constants,
	split from MEM_UNIXLIB_BREAK.
	* unixlib/unix.h (struct ul_memory): Add 'dalomem'
	Remove the ambiguity of '__unixlib_break' by replacing it with
	'rwbreak' and 'dabreak'. 
	* debug/debug.c (__debug): Add code to show the dynamic area
	memory limits.
	* resource/initialise.c (__resource_initialise): Use new variables.
	* sys/_syslib.s (__main): Use new variables.  When creating a
	dynamic area, set 'dalomem' and 'dabreak', rather than 'rwlomem'
	and 'unixlib_break'
	(__ul_memory): Add new fields.
	* sys/brk.c (__internal_brk): Delete function, moving code into
	two new functions ...
	(brk_da): ... this one for dynamic areas.  Use new 'da' variables.
	(brk_rw): ... this one for read/write data area in application space.
	(brk): Use new worker functions.
	(sbrk): Likewise.

Thu Apr 28 20:49:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s: Add missing spaces.

Thu Apr 28 13:47:20 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Rename '__image_rw_himem' to
	'appspace_himem'.
	* debug/debug.c: Use 'appspace_himem'.
	* sys/brk.c: Likewise.
	* sys/vfork.c (__fork_post): Likewise.
	* sys/stackalloc.c (__stackalloc_init): Likewise.
	(__stackalloc_incr_upwards): Likewise.
	(__stackalloc_incr_wimpslot): Likewise.
	* unixlib/asm_dec.s (MEM_APPSPACE_HIMEM): Renamed from
	MEM_IMAGE_RW_HIMEM.
	* sys/_syslib.s (__main): Use it.
	(__check_stack): Use it.

Thu Apr 28 12:14:15 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.h (struct ul_memory): Rename '__unixlib_real_break'
	to 'dalimit'.
	Rename '__unixlib_real_himem' to 'appspace_limit'.

	* sys/brk.c (__internal_brk): Use 'dalimit'.
	Remove 32K check hack as system resource limits are setup before
	the first call to 'brk'.  Add more explanatory comments.
	* unix/unix.c (__unixinit): Call '__resource_initialise' before
	setting up pthreads.
	* unixlib/asm_dec.s (MEM_DALIMIT): Renamed from MEM_UNIXLIB_REAL_BREAK.
	(MEM_APPSPACE_LIMIT): Renamed from MEM_UNIXLIB_REAL_HIMEM.
	* sys/_syslib.s (__main): Use it.  In the non-dynamic area case
	do not set MEM_DALIMIT as it will remain unused throughout the
	execution of the application.
	* sys/_signal.s (__h_cback): Use 'MEM_APPSPACE_LIMIT'.

	* sys/stackalloc.c (__stackalloc_incr_wimpslot): Use 'appspace_limit'.
	If the request for increasing the wimpslot fails, don't adjust
	value of 'appspace_limit'.
	* sys/vfork.c (__fork_pre): Reference globals through '__ul_global'.
	(__fork_post): Use 'appspace_limit'.

Thu Apr 28 10:25:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/post.c (sigsetup): Perform address validation for the
	user supplied signal handler function and the user supplied
	signal stack.
	(extract_name): New function.
	(sigsetup): In DEBUG mode, use 'extract_name' to provide the
	function name of the signal handler, where possible.  Improve
	general debugging information.
	(post_signal): Likewise.

Wed Apr 27 18:38:51 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/asm_dec.s (MEM_RWLOMEM): Renamed from MEM_UNIXLIB_RWLIMIT.
	(MEM_IMAGE_RW_LOMEM): Deleted.
	* unixlib/unix.h (struct ul_memory): Rename __unixlib_rwlimit
	to __rwlomem.
	Delete __image_rw_lomem.
	Constify __robase, __rwlomem and __rwbase as these values should
	never change during the execution of a program.
	* sys/_syslib.s (__main): Fixup accordingly.
	* debug/debug.c (__debug): Use __rwlomem instead of __image_rw_lomem.
	* resource/initialise.c (__resource_initialise): Likewise.
	* resource/ulimit.c (ulimit): Likewise.
	* sys/brk.c (__internal_brk): Likewise.
	(__unixlib_real_break): Delete extern reference.

	* string/_memcpy.s: AREA should be 'C$$code' as the 'C' defines
	the language type for the run-time environment, not the type
	of language used in the source unit.

Wed Apr 27 17:00:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/unix.c (struct ul_global): Move fields __image_rw_himem,
	__unixlib_stack, __robase, __unixlib_rwlimit,
	__image_rw_lomem, __unixlib_break, __unixlib_stack_limit,
	__rwbase, __unixlib_real_break, __unixlib_real_himem and __old_himem
	into new structure 'ul_memory'.
	Delete 'extern' declarations of those variables and therefore
	make them non-exportable.
	Delete '__image_ro_base' and convert all references to use '__robase'.
	* sys/syslib.s (__ul_global): Delete those fields from here and
	remove EXPORT lines.
	(__ul_memory): Declare.
	* unixlib/asm_dec.s (GBL_*): Adjust accordingly.
	(MEM_*): New definitions for referencing fields of 'ul_memory'.
	* common/funcallerr.c: Fix all occurances to the above variables to
	use 'ul_memory' structure and change references of '__image_ro_base'
	to '__robase'.
	* debug/debug.c: Likewise.
	* resource/initialise.c: Likewise.
	* resource/ulimit.c: Likewise.
	* signal/_signal.s: Likewise.
	* sys/_alloca.s: Likewise.
	* sys/_syslib.s: Likewise.
	* sys/_vfork.s: Likewise.
	* sys/exec.c: Likewise.
	* sys/vfork.c: Likewise.
	* sys/brk.c: Likewise and comes with improved code efficiency.
	* sys/stackalloc.c: Likewise.
	(REMOVE_FROM_FREELIST): Convert from a macro to an inline
	function.
	(ADD_TO_FREELIST): Likewise.

Wed Apr 27 12:14:41 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/alloc.c: Cleanup code, remove WIN32 and non-STDC code.
	Re-write public facing functions to disable pthread context
	switching around internal malloc calls.
	Rename functions to be the correct C function names, rather than via
	some macro mangling.
	Drop strange-case in function names, renaming all to lower-case.
	Internal versions of malloc, free, realloc are renamed to an
	unlocked variant.
	(largebin_index): Delete i386 specific code.
	(malloc_init_state): Declare inline.
	(malloc_unlocked): Don't perform malloc initialisation check.
	(malloc_consolidate): Likewise.
	(iALLOc, iCALLOc, iCOMALLOc): Delete functions.
	(mUSABLe, mALLINFo, mSTATs, mALLOPt): Delete functions.
	(__ul_malloc_init): New function.

	* sys/_syslib.s (__main): Call __ul_malloc_init.
	(__ul_global): Add entries for '__mutex' and 'malloc_state'.
	
	* malloc.h (malloc_unlocked): Add prototype.
	(free_unlocked, realloc_unlocked): Add prototypes.
	(malloc_trim_unlocked): Add prototype.
	(__ul_malloc_init): Add prototype.
	* unixlib/asm_dec.s (GBL_OLD_HIMEM): Add.
	(GBL_MUTEX, GBL_MALLOC_GBL): Add.
	* unixlib/unix.h (struct ul_global): Add definition.
	(__ul_global): Declare.

	* pthread/atfork.c (pthread_atfork): Use __ul_global structure
	and use unlocked variants of malloc rather than SUL malloc.
	* pthread/context.c (__pthread_cleanup_idle): Likewise.
	* pthread/create.c (pthread_create): Likewise.
	* pthread/detach.c (pthread_detach): Likewise.
	* pthread/exit.c (pthread_exit): Likewise.
	* pthread/join.c (pthread_join): Likewise.
	* pthread/newnode.c (__pthread_new_node): Likewise.
	* pthread/pthinit.c (__pthread_prog_init: Likewise.

	* pthread/key.c (pthread_key_create): Use unlocked variants of
	malloc and ensure they are called with interrupts disabled.
	(pthread_key_delete): Likewise.
	(pthread_setspecific): Likewise.

	* debug/dvsprintf.c: Compile without stack-checking.
	* source/Makefile.in (debug/dvsprintf.o): New target.

	* unix/open.c (__open_fh): Type fixes for Norcroft [from Stefan
	Bellon].

Tue Apr 26 23:32:44 2005  John Tytgat  <John.Tytgat@aaug.net>

	* unixlib/dev.h (__getdevtype): Added explicit riscosify control
	parameter (not necessarily equal to the __get_riscosify_control()
	value).
	* unix/dev.c (__getdevtype): Likewise.
	* unix/stat.c: Likewise.
	(__fsclose): Don't close RISC OS filehandle when dflag
	FILE_HANDLE_FROM_OS bit is set.
	* unixlib/fd.h: Added comment.
	* unixlib/local.h (__open_fn): Renamed from __open().
	(__open_fh): Similar call to __open_fn() but instead of a filename,
	this gets a RISC OS file handle (from OS).
	* unix/open.c: Likewise.
	* unix/reopen.c: Likewise.
	* stdio/stdio.c: Capitalised first char of __unixlib_fatal() strings.
	* unix/unix.c: Likewise.
	(initialise_unix_io): Directly use the RISC OS filehandles in case of
	CLI redirection.  This results in a significant speed improvement.

Tue Apr 26 15:20:03 2005  Nick Burrett  <nick@sqrt.co.uk>

	Provide new internal debugging function.
	* sys/debug.h (debug_printf): Add prototype.
	* debug/dvsprintf.c: New file.
	* debug/debug.c: Moved here from sys/debug.c.  Re-written
	to use new 'debug_printf' function.
	* unix/unix.c: Use new debug_printf function.
	* sys/stackalloc.c: Likewise.

Mon Apr 25 19:28:15 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/_mem.s: Delete file.

Mon Apr 25 13:32:29 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* math.h (isinf, isnan): Provide Norcroft specific definitions.
	* sys/cdefs.h (strong_alias): Fix typo in definition.
	* libm-complex/cabs.c: When __UNIXLIB_NO_COMPLEX is defined,
	do not compile functions that use complex types.
	* libm-complex/{cabsf.c, cabsl.c, carg.c, cargf.c}: Likewise.
	* libm-complex/{cargl.c, cimag.c, cimagf.c, cimagl.c}: Likewise.
	* libm-complex/{conj.c, conjf.c, conjl.c, creal.c}: Likewise.
	* libm-complex/{crealf.c, creall.c}: Likewise.
	* libm-generic/{s_cacos.c, s_cacosf.c, s_cacosh.c}: Likewise.
	* libm-generic/{s_cacoshf.c, s_casin.c, s_casinf.c}: Likewise.
	* libm-generic/{s_casinh.c, s_casinhf.c, s_catan.c}: Likewise.
	* libm-generic/{s_catanf.c, s_catanh.c, s_catanhf.c}: Likewise.
	* libm-generic/{s_ccos.c, s_ccosf.c, s_ccosh.c, s_ccoshf.c}: Likewise.
	* libm-generic/{s_cexp.c, s_cexpf.c, s_clog.c, s_clog10.c}: Likewise.
	* libm-generic/{s_clog10f.c, s_clogf.c, s_cpow.c, s_cpowf.c}: Likewise.
	* libm-generic/{s_cproj.c, s_cprojf.c, s_csin.c, s_csinf.c}: Likewise.
	* libm-generic/{s_csinh.c, s_csinhf.c, s_csqrt.c}: Likewise.
	* libm-generic/{s_csqrtf.c, c_ctan.c, s_ctanf.c, s_ctanh.c}: Likewise.
	* libm-generic/{s_ctanhf.c}: Likewise.

	* libm-generic/s_nextafter.c (nexttoward): Disable aliasing hack
	for Norcroft.
	* libm-generic/w_dremf.c (__dremf): ANSIify function definition.

	* libm-dbl64/s_isinf.c: For Norcroft, #undef __isinf.
	* libm-dbl64/s_isnan.c: For Norcroft, #undef __isnan.

	* string/memrchr.c: For Norcroft and LCC, define the double-underscore
	variant of the function name to the variant without.
	* string/strchrnul.c: Likewise.
	* string/strndup.c: Likewise.
	* string/strnlen.c: Likewise.
	
Sun Apr 24 22:11:02 2005  Alex Waugh  <alex@alexwaugh.com>

	* unix/unix.c (convert_command_line): Prevent >> type redirections
	  getting added to argv.

Sun Apr 24 21:24:36 2005  John Tytgat  <John.Tytgat@aaug.net>

	* sys/resource.h (getpriority): Use id_t instead of int.
	(setpriority): Likewise.
	* resource/getprior.c (getpriority): Likewise.
	* resource/setprior.c (setpriority): Likewise.
	* unixlib/dev.h (__getdevtype): const non-ptr return value doesn't
	make much sense therefore removed const.
	* unix/dev.c: Likewise.
	* unixlib/os.h: Relaxed several prototypes concerning __nonnull.
	* unixlib/sigstate.h (__backtrace_getfp): Return type is now void*
	instead of int*.
	(__ul_callbackfp): Changed type from int* to unsigned int*.
	* unix.h (struct __sul_process): Changed types of maxfd, fdsize,
	fdhandlesize and environ_size from int to unsigned int.
	Removed __OS_ARTHUR & __OS_RISCOS_* defines.
	(__decstrtoui): Changed constify end parameter.
	(__intenv): Decorated prototype with __nonnull and/or __wur.
	(__runtime_features): Likewise.
	(__atomic_modify): Likewise.
	(__unixlib_signal_initialise): Likewise.
	(__resource_initialise): Likewise.
	(__stackalloc): Likewise.
	(__free_stack_chain): Likewise.
	(__stackalloc_incr_wimpslot): Likewise.
	(__free_process): Likewise.
	(__get_program_name): Likewise & also renamed from get_program_name.
	* unix/unix.c (__decstrtoui): Changed constify end parameter.
	* netlib/htons.s (htons): Removed.
	* netlib/htonl.s (ntonl): Removed.
	* netlib/_bswap_16.s: Exported __bswap_16 as htons and ntohs.
	* netlib/_bswap_32.s: Exported __bswap_32 as htonl and ntohl.
	* netlib/getnameinfo.c: Compiler warning fixing.
	* signal/post.c: Likewise.
	* sys/debug.c: Likewise.
	* time/strftime.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/select.c: Likewise.
	* unix/sync.c: Likewise.
	* unix/syslog.c: Likewise.
	* unix/tty.c: Likewise.
	* unix/unlink.c: Likewise.
	* signal/_coredump.s (__backtrace_fp): Add functionname in object code.
	* signal/_signal.s: "Unixlib" -> "UnixLib".
	* sys/_syslib.s: Likewise.
	* unix/custom.c: Likewise.
	* stdio/rename.c (rename): Failure to delete destination file is no
	longer ignored.
	* sys/_os.s: CMP -> TEQ for consistency reasons.
	* sys/mman.c: Rename get_program_name to __get_program_name.
	* unix/features.c: Likewise.
	* unix/getenv.c: 0 -> NULL.
	* unix/nice.c (nice): Added unistd.h include to get nice() prototype.

Sun Apr 24 21:04:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* common/unixify.c: Fix buffer overflow.

Sun Apr 24 12:34:09 2005  Peter Naulls  <peter@chocky.org>

	* clib/dirent.h, clib/grp.h: Make types used visible by including
	  sys/types.h instead.

Sun Apr 24 11:08:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/atoll.c: New file.

Sun Apr 24 10:54:22 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdlib/strtoll.c: Import from FreeBSD, includes bug fixes.
	* stdlib/strtoull.c: Likewise.
	* limits.h: Add namespace visibility for _POSIX and _POSIX2 limits.
	(LLONG_MIN, LLONG_MAX, ULLONG_MAX): New ISO C99 limits.
	(WORD_BIT, LONG_BIT): New limits, defined for XOPEN.

Sat Apr 23 13:14:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* libm-generic/w_lgammal_r.c: Delete file.
	* libm-generic/e_lgammal_r.c: Delete file.
	* complex.h: No implementation for Norcroft or LCC compilers.
	* sys/cdefs.h (__UNIXLIB_NO_COMPLEX): Define for Norcroft and LCC
	compilers.

Sat Apr 23 11:51:31 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* time/setitmr.c (__inline): Renamed from __inline__.
	(__inline__): Delete macro as it is provided in sys/cdefs.h.
	* stdlib/alloc.c (mUSABLe): Compile out prototype.
	(mSTATs, mALLOPt, mALLINFo): Likewise.
	* search/lsearch.c (lfind): Casting fixes.
	(lsearch): Casting fixes.

	* libm-dbl64/s_nexttoward.c: Delete empty file.
	* libm-dbl64/{k_cos.c, k_sin.c, s_cos.c, e_acos.c}: Likewise.

Sat Apr 23 11:42:48 2005  Nick Burrett  <nick@sqrt.co.uk>

	Initial work on accessing internal UnixLib variables through
	one structure -- __ul_global.  Apply small optimisations
	based on a common symbol address.
	* unixlib/asm_dec.s (GBL_*): New definitions.
	* pthread/_context.s (__pthread_start_ticker): Use new __ul_global
	structure.
	(pthread_call_every): Likewise; improve code density.
	(__pthread_callback): Likewise.
	(__pthread_callback_semaphore): Delete.
	(__pthread_system_running): Delete.
	(__pthread_callback_missed): Delete.
	* pthread/_ints.s (__pthread_return_address): Delete.
	(__pthread_worksemaphore): Delete.
	* pthread/_yield.s (pthread_yield): Use __ul_global structure.
	* signal/_signal.s (raise): Use __ul_global structure.
	(__h_cback): Likewise.
	(__h_cback_common): Likewise.
	(__setup_signalhandler_stack): Likewise.
	(__executing_signalhandler): Delete.
	(__signalhandler_sl): Delete.
	(__signalhandler_sp): Delete.
	* pthread/context.c (__pthread_num_running_threads): Delete.
	* sys/_syslib.s (__main): Use 'GBL_' definitions for referencing
	__ul_global.
	(signalhandler_overflow): Likewise.
	(__unixlib_fatal): Likewise.
	(_kernel_fpavailable): Likewise.
	(__upcall_handler_addr): Move into __ul_global structure.
	(__upcall_handler_r12): Likewise.
	(__ul_global): Defined.  Renamed from 'struct_base'.
	(__upcall_handler_addr, __upcall_handler_r12): Define.
	(__pthread_return_address, __pthread_worksemaphore): Define.
	(__pthread_callback_semaphore, __pthread_system_running): Define.
	(__pthread_callback_missed): Define.
	(__pthread_num_running_threads): Define.
	(__executing_signalhandler): Define.
	(__signalhandler_sl, __signalhandler_sp): Define.

	* pthread/atfork.c (pthread_atfork): If called, set
	__pthread_system_running.

Fri Apr 22 15:33:14 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* unixlib/asm_dec.s (__get_errno): Change PTHREADS check to
	__UNIXLIB_ERRNO_THREADED.  Import 'errno' symbol only
	when ERRNO_THREADED is 0.
	(__set_errno): Likewise.
	* sys/_syslib.s (errno): Delete definition as it breaks Norcroft
	assembler.
	* stdlib/errno.c: New file.

	* sys/cdefs.h: Provide Norcroft and LCC specific macro definitions.
	(__SYS_CDEFS_H): Renamed from _SYS_CDEFS_H.
	* features.h: Use __SYS_CDEFS_H.

	* signal/_signal.s (__seterr): Check __pthread_running_thread
	is valid and exit fatally if not.

	* signal/post.c (__valid_address): Delete function.  To preserve
	stack space during signal handling, re-write in assembler.
	* sys/_syslib.s (__valid_address): New function.

	Fix pthread race conditions and improve commentary.
	* pthread/_context.s (__pthread_callback): Check that we are
	actually going to perform a context switch before setting up
	an otherwise unnecessary signal handler stack.  Turn IRQs off
	earlier, therefore setting more internal state without the chance
	of interruption.
	(skip_contextswitch): Fall through rather than using common code
	of the old callback_return.
	* pthread/newnode.c (__pthread_new_node): Use SUL memory functions
	for allocating space for pthread structure to prevent a race
	condition between 'free' and __pthread_cleanup_idle.
	* pthread/contex.c (__pthread_cleanup_idle): Use the SUL memory
	functions.
	* pthread/create.c (pthread_create): Don't call __pthread_init.
	Set __pthread_system_running directly.  Use SUL memory functions.
	* pthread/detach.c (pthread_detach): Use SUL memory functions.
	* pthread/exit.c (pthread_exit): Enable interrupts around call
	to __pthread_exit to prevent possible assertion failure when
	freeing 'alloca' chains.
	* pthread/join.c (pthread_join): Use SUL memory functions.
	* pthread/pthinit.c (__pthread_prog_init): Allocate 'saved_context'
	memory here.
	(__pthread_init): Delete function and move useful functionality
	into __pthread_prog_init.
	* pthread.h (__pthread_init): Delete prototype.
	
	Compilation fixes.
	* common/fdname.c (__fd_to_name): Add explicit cast for malloc.
	* common/riscosify.c (__sfixinit): Likewise.
	* common/unixify.c (__unixify): Likewise.
	* crypt/crypt-entry.c: Convert function definitions to ISO-C form.
	* crypt/crypt_util.c: Likewise.
	(_ufc_clearmem, _ufc_copymem): Ensure we use 'memset' and 'memcpy'
	rather than slow internal versions.
	* crypt/md5-crypt.c: Convert function definitions to ISO-C form.
	(b64t): Fix array size.
	* crypt/md5.c: Convert function definitions to ISO-C form.
	* gdtoa/dmisc.c (nrv_alloc): Constify 's'.
	* gdtoa/gdtoaimp.h (nrv_alloc): Fix prototype accordingly.

Fri Apr 22 09:32:50 2005  Nick Burrett  <nick@sqrt.co.uk>

	* dirent.h (alphasort): Change to BSD and MISC visibility.

Thu Apr 21 16:53:32 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* libm-dbl64/tbl_asincos.h: Renamed from asincos.tbl.
	* libm-dbl64/tbl_powtwo.h: Renamed from powtwo.tbl
	* libm-dbl64/tbl_root.h: Renamed from root.tbl
	* libm-dbl64/tbl_sincos.h: Renamed from sincos.tbl
	* libm-dbl64/tbl_uatan.h: Renamed from uatan.tbl
	* libm-dbl64/tbl_uexp.h: Renamed from uexp.tbl
	* libm-dbl64/tbl_ulog.h: Renamed from ulog.tbl
	* libm-dbl64/tbl_upow.h: Renamed from upow.tbl
	* libm-dbl64/tbl_utan.h: Renamed from utan.tbl
	* libm-dbl64/dosincos.c: Use new filenames.
	* libm-dbl64/{e_asin.c, e_atan2.c, e_exp.c, e_log.c}: Likewise.
	* libm-dbl64/{e_pow.c, e_sqrt.c, s_atan.c, s_sin.c}: Likewise.
	* libm-dbl64/s_tan.c: Likewise.

	* unixlib/buildoptions.s: Commit auto-generated file.

Thu Apr 21 16:02:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* pthread/sem.c (sem_check_validity): New function.
	(sem_alloc): Delete function; incorporate into sem_init.
	(sem_init): 'sem' is already allocated memory; use it rather than
	making our own internal allocation with malloc.
	(sem_free): No need to free sem structure here.  Make inline.
	(sem_destroy): Always check for errors using sem_check_validity.
	(sem_trywait): Likewise.
	(sem_post): Likewise.
	(sem_getvalue): Likewise.
	(sem_wait): Likewise.  Cope with an empty usem_waiters queue.
	Add PTHREAD_SAFE_CANCELLATION.

Wed Apr 20 18:10:04 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stpcpy.c: Move into string subdirectory.
	* stpncpy.c, strcat.c, strchr.c, strcmp.c, strcspn.c: Likewise.
	* strdup.c, strichr.c, stricmp.c, strncat.c: Likewise.
	* strncmp.c, strncpy.c, strnicmp.c, strpbrk.c: Likewise.
	* strrchr.c, strrichr.c, strsep.c, strsignal.c: Likewise.
	* strspn.c, strstr.c, strtok.c, strtok_r.c: Likewise.
	* strtol.c, strtoll.c, index.c, memccpy.c: Likewise.
	* memchr.c, memcmp.c: Likewise.

	* strtoumax.c: Move into inttypes subdirectory.
	* strtoimax.c: Likewise.

	* strtol.c: Move into stdlib subdirectory.
	* strtoll.c, strtoul.c, strtoull.c: Likewise.
	* abort.c, atexit.c, bsearch.c, div.c, qsort.c: Likewise.
	* alloc.c, system.c: Likewise.

	* assert.c: Move into assert subdirectory.

	* ctype.c: Move into ctype subdirectory.
	* ctypeproc.c: Likewise.

	* opensock.c: Move into resolv subdirectory.

	* psignal.c: Move into signal subdirectory.

	* termcap.c: Move into termios subdirectory. 

Wed Apr 20 17:54:40 2005  Nick Burrett  <nick@sqrt.co.uk>

	* stdio/vfprintf.c (__vfprintf): Output of printf("%#.0o", 0)
	should print 0.
	* stdio/fwrite.c (fwrite): When handling fd of -1, return early
	if we have no space in the output buffer.
	* signal/post.c (__write_backtrace): Account for 26-bit mode
	when disassembling.

Wed Apr 20 14:15:44 2005  Nick Burrett  <nick@sqrt.co.uk>

	Norcroft compatibility.
	* stdio.h (__vfprintf): Add prototype.
	* stdio/vfprintf.c (__find_arguments [TP_SIZET]): Use 'size_t'
	[from Stefan Bellon].
	* stdio/printf.c (vsnprintf): Remove '__' from function name.
	(vsprintf, snprintf, sprintf): Likewise.
	(vprintf, fprintf, printf): Likewise.
	* internal/math.h: Add macros to remove the double-underscores
	from function.
	* libm-generic/s_fma.c: Include math_private.h to pick up this change.
	* libm-generic/s_fmaf.c: Likewise.
	* libm-generic/s_fdim.c: Likewise.
	* libm-generic/s_fdimf.c: Likewise.
	* libm-generic/s_fmax.c: Likewise.
	* libm-generic/s_fmaxf.c: Likewise.
	* libm-generic/s_fmin.c: Likewise.
	* libm-generic/s_fminf.c: Likewise.
	* libm-generic/s_cacos.c: Likewise.
	* libm-generic/s_cacosf.c: Likewise.
	* libm-generic/s_casin.c: Likewise.
	* libm-generic/s_casinf.c: Likewise.
	* libm-generic/s_casinh.c: Likewise.
	* libm-generic/s_casinhf.c: Likewise.
	* libm-generic/s_ccos.c: Likewise.
	* libm-generic/s_ccosf.c: Likewise.
	* libm-generic/s_cpow.c: Likewise.
	* libm-generic/s_cpowf.c: Likewise.
	* libm-generic/s_cproj.c: Likewise.
	* libm-generic/s_cprojf.c: Likewise.
	* libm-generic/s_nan.c: Likewise.
	* libm-generic/s_nanf.c: Likewise.
	* libm-generic/w_drem.c: Likewise.

	* sys/types.h (ino_t): Define.
	* dirent.h (ino_t): Only define if __USE_XOPEN.

	* unixlib/buildoptions.h: Add comment to remind us why defining
	__UNIXLIB_ERRNO_THREADED is a bad idea.
	
Tue Apr 19 19:52:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* iconv.h (EILSEQ): Kill definition.
	
Tue Apr 19 19:28:59 2005  Nick Burrett  <nick@sqrt.co.uk>

	Make threaded 'errno' a compile time option.
	* unixlib/buildoptions.h (__UNIXLIB_ERRNO_THREADED): Define as zero.
	* pthread/context.c (__pthread_context_switch): When above
	macro is zero, save the global errno between context switches.
	* errno.h (errno): Only use the threaded version if
	__UNIXLIB_FEATURE_PTHREADS and __UNIXLIB_ERRNO_THREADED are
	non-zero.
	* sys/_syslib.s (errno): Define if __UNIXLIB_ERRNO_THEADED is
	non-zero.

Tue Apr 19 09:48:33 2005  Stefan Bellon  <sbellon@sbellon.de>

	Norcroft compatibility.
	* unixlib/asm_dec.s (__set_errno): IMPORT __pthread_running_thread.
	(__get_errno): Likewise.
	* signal.h (sigpause): Fix comment termination typo.
	* common/riscosify.c (sfix_hash): Use __inline for Norcroft
	compatibility.
	* locale/iconv.c: Change ordering of includes.
	(iconv_open): Add explicit cast to return value.
	* stdio/asprintf.c: Include stdio.h
	(asprintf): Renamed from __asprintf.
	* stdio/vasprintf.c (vasprintf): Renamed from __vasprintf.
	* sys/_syslib.s (errno): Fix __UNIXLIB_FEATURE_PTHREADS check.
	* stdlib/atof.c: New file.

Mon Apr 18 22:25:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/stdcmac.h: Delete file.
	* unixlib/stdsmac.s: Delete file.
	* unixlib/buildoptions.h: Reformat and remove 'COMMENT' and 'END'.
	* source/Makefile.in (clib/unixlib/buildoptions.s): New target.
	* unixlib/asm_dec.s: Use it rather than buildoptions.h
	* gen-makefiles.pl: For assembler files, depend on buildoptions.s.

	* pthread/context.c (__pthread_context_switch): Don't save/restore
	global errno between contexts.

Mon Apr 18 20:40:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* errno.h: Use correct path to features.h.
	* features.h: Move the inclusion of unixlib/stdcmac.h and
	unixlib/buildoptions.h outside of __UNIXLIB_INTERNALS.

Mon Apr 18 20:27:21 2005  Nick Burrett  <nick@sqrt.co.uk>

	* errno.h: Change #ifdef to #if for __UNIXLIB_FEATURE_PTHREADS.

Mon Apr 18 18:03:56 2005  Nick Burrett  <nick@sqrt.co.uk>

	Make 'errno' thread local.
	Add option to __seterr to prevent the setting of 'errno',
	rename to __ul_seterr and update all callers.
	* signal/_signal.s (__ul_seterr): Renamed from '__seterr'.
	If 'a2' is non-zero, then do not set errno.
	Perform NULL-check on __pthread_running_thread.
	* unixlib/os.h (__ul_seterr): Add seterrno parameter to prototype.
	* unixlib/asm_dec.s (__set_errno): For thread support, use the
	local thread errno rather than the global errno.
	(__get_errno): Likewise.
	* errno.h (__set_errno): Likewise.
	* errno.c: Delete file.
	* sys/_syslib.s (errno): Define when not compiling with thread
	support.
	
	* pthread/pthinit.c (__pthread_prog_init): Die if __pthread_new_node
	fails.

	* gdtoa/gdtoaimp.h (ACQUIRE_DTOA_LOCK): Check __pthread_system_running
	rather than __pthread_running_thread.
	(FREE_DTOA_LOCK): Likewise.
	
	* common/fdname.c (__fd_to_name): Don't set errno.
	* common/objattr.c (__object_get_attrs): Likewise.
	(__object_set_attrs): Likewise.
	* locale/iconv.c (iconv_error): Likewise.
	* netlib/_net_error.s (__net_error): Likewise.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsfsstat): Likewise.
	* unix/dirent.c (readdir_r): Likewise.
	* unix/fchmod.c (fchmod): Likewise.
	* unix/rmdir.c (rmdir): Likewise.

	* locale/iconv.c (iconv_open): Set errno.
	* sound/dsp.c (__dspopen): Likewise.
	(__dspwrite): Likewise.
	* sys/mman.c (munmap): Likewise.
	(mremap): Likewise.
	* time/clk_gettime.c (clock_gettime): Likewise.
	* time/gettod.c (gettimeofday): Likewise.
	* time/time.c (time): Likewise.
	* unix/chdir.c (chdir): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	(__fsclose, __fsread, __fswrite, __fslseek): Likewise.
	(__randomopen, __randomread): Likewise.
	* unix/dirent.c (newstream): Likewise.
	* unix/getcwd.c (getcwd): Likewise.
	* unix/getenv.c (__getenv_from_os): Likewise.
	* unix/gethostnam.c (fakehostname): Likewise.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/setenv.c (__addenv_to_os): Likewise.
	* unix/sync.c (fsync): Likewise.
	* unix/truncate.c (ftruncate): Likewise.
	(truncate): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* scl/_kswi.s: Likewise.
	* scl/_ksetenv.s: Likewise.
	* scl/_kosrdch.s: Likewise.
	* scl/_kosgbpb.s: Likewise.
	* scl/_kosfind.s: Likewise.
	* scl/_kosfile.s: Likewise.
	* scl/_koscli.s: Likewise.
	* scl/_kosbyte.s: Likewise.
	* scl/_kosargs.s: Likewise.
	* scl/_kgetenv.s: Likewise.
	* scl/_kernel.s: Likewise.
	
	* unix/unix.c (__unixinit): Drop call to '__seterr'.
	* scl/_kosbput.s: Likewise.
	* scl/_kosbyte.s: Likewise.

	* unix/rename.c (rename): Set 'errno'.  Don't need to preserve 'errno'
	across function.

	* sys/mman.c (__munmap_all): Remove PTHREAD_UNSAFE as the thread
	system should not be running at this time.

	* scl/_koswrch.s: Delete file.
	* scl/_kosword.s: Delete file.
	* sys/_os.s (__os_vdu): Define _kernel_oswrch to the same function.
	Set return value to zero on success.
	(__os_word): Simarly for _kernel_osword.
	
Mon Apr 18 14:44:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/getpagesiz.s: Delete file.
	* unistd/getpagesiz.c: New file.
	* sys/_syslib.s (__main): Call XOS_ReadMemMapInfo and store the
	system page size.
	(__ul_pagesize): Define.
	* unixlib/unix.h (__ul_pagesize): Declare.
	* sys/mman.c (page_size): Delete.
	(page_align): Define in terms of __ul_pagesize.
	(mmap): Don't call 'getpagesize', use the internal variable directly.
	* unix/sysconf.c (sysconf): Likewise.
	* alloc.c (malloc_getpagesize): Use __ul_pagesize.

	Make the malloc functions thread safe.
	* alloc.c (USE_MALLOC_LOCK): Define.
	(MALLOC_PREACTION): Check pthread system is running first.
	(MALLOC_POSTACTION): Likewise.
	(mALLOc): Delete PTHREAD_UNSAFE.
	(fREe): Likewise.
	(rEALLOc): Likewise.
	(mEMALIGn): Likewise.
	(cALLOc): Likewise.
	(iALLOc): Likewise.
	(vALLOc): Likewise.
	(pVALLOc): Likewise.
	(mTRIm): Likewise.

Mon Apr 18 12:26:48 2005  Peter Naulls  <peter@chocky.org>

	* source/unix/rmdir.c, clib/unixlib/unix.h: Improve language.
	* clib/unixlib/dev.h, source/unix/custom.c: Add a function to
	  hide some internal structures from programs trying to override
	  file descriptor handling. 

Thu Apr 14 23:59:26 2005  John-Mark Bell <jmb202@ecs.soton.ac.uk>

	* endian.h: Update missed file

Thu Apr 14 17:01:30 2005  Nick Burrett  <nick@sqrt.co.uk>

	* search.h: New file.
	* search/insremque.c: New file.
	* search/lsearch.c: New file.
	* search/hsearch.c: New file.
	* search/hsearch_r.c: New file.
	* search/tsearch.c: New file.

	* signal.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* time.h: Likewise.
	* pthread/pthsignal.c (sigwait): Mark as a safe cancellation point.

Thu Apr 14 16:15:32 2005  Nick Burrett  <nick@sqrt.co.uk>

	* clib/unixlib/swiparams.h: Move file ...
	* incl-local/internal/swiparams.h: ... here.

	* clib/unixlib/tty.h: Move file ...
	* incl-local/internal/tty.h: ... here.

	* common/objattr.c: Use new swiparams.h location.
	* common/riscosify.c: Likewise.
	* common/unixify.c: Likewise.
	* sound/dsp.c: Likewise.
	* stdio/rename.c: Likewise.
	* unix/chmod.c: Likewise.
	* unix/custom.c: Likewise.
	* unix/dev.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/fchmod.c: Likewise.
	* unix/fstat.c: Likewise.
	* unix/mkdir.c: Likewise.
	* unix/rmdir.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/unix.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Likewise.

	* unixlib/unix.h: Use new tty.h location.
	* unix/tty.c: Likewise.

Thu Apr 14 15:26:01 2005  Nick Burrett  <nick@sqrt.co.uk>

	Import an accurate IEEE math library
	* bits/fenv.h: New file.
	* bits/huge_valf.h: New file.
	* bits/huge_vall.h: New file.
	* bits/huge_val.h: Split into its constituent parts.
	* bits/inf.h: New file.
	* bits/nan.h: Use builtin for GCC 3.3 and later.
	* bits/cmathcalls.h: Bring in line with new math library.
	* bits/mathcalls.h: Likewise.
	* bits/mathdef.h: Likewise.
	* bits/mathinline.h: Likewise.
	* fenv.h: Likewise.
	* math.h: Likewise.
	* complex.h: Likewise.
	* fpu_control.h: New file.
	* ieee754.h: Moved here from machine/ieee754.h.
	* endian.h: Moved here from machine/endian.h.

	* complex: Delete directory.
	* math: Delete directory.
	* math-asm: Delete directory.

	* fenv: New directory.
	* libm-complex: New directory.
	* libm-dbl64: New directory.
	* libm-flt32: New directory.
	* libm-generic: New directory.
	* libm-support: New directory.

	* fpu_control.h (__unixlib_get_fpstatus): Moved here from
	unixlib/unix.h.
	(__unixlib_set_fpstatus): Likewise.
	* unixlib/unix.h: Delete above prototypes.

	* incl-local: New directory.  Container for all UnixLib build
	specific header files.
	* incl-local/README: New file.
	* incl-local/math_private.h: New file, for source code compatibility
	with main libm library.
	* incl-local/internal/math.h: Renamed from unixlib/math.h
	and updated for new IEEE math library.

	* Makefile.in (INCLUDES): Use 'incl-local'.
	(LIBM_FLAGS): Define.
	(CROSS_CFLAGS): Include LIBM_FLAGS.
	(WARNINGS): Drop -Wno-long-long.
	* gen-makefiles.pl (find_headers): Support multiple include dirs.
	Search 'incl-local' for headers.

	* clib/stdio_ext.h: Delete file.
	* incl-local/stdio_ext.h: New blank file.
	* clib/stdio-common/stdio_ext.h: Delete file.

	* unixlib/os.h (__os_swi): Remove __wur.
	(__os_byte): Remove __nonnull and __wur.

Thu Apr 14 13:12:07 2005  Nick Burrett  <nick@sqrt.co.uk>

	* grp.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* kernel.h: Likewise.
	* locale.h: Likewise.
	* nl_types.h: Likewise.
	* pwd.h: Likewise.
	* unixlib/os.h: Likewise.
	* semaphore.h: Likewise.

	* locale/iconv.c (iconv_open): Add PTHREAD_SAFE_CANCELLATION.
	Use __os_swi rather than _swix.  Specify a minimum module version
	of 0.04.
	(iconv): Likewise.
	(iconv_close): Likewise.

	* grp/fgetgrent.c (fgetgrent): Add PTHREAD_UNSAFE_CANCELLATION.
	* grp/getgrgid.c (getgrgid): Likewise.
	* grp/getgrnam.c (getgrnam): Likewise.
	* grp/fgetgrentr.c (fgetgrentr): Add PTHREAD_SAFE_CANCELLATION.
	* grp/getgrgid_r.c (getgrgid_r): Likewise.
	* grp/getgrnam_r.c (getgrnam_r): Likewise.
	* grp/getgrent.c (getgrent): Add PTHREAD_UNSAFE_CANCELLATION.
	(setgrent): Likewise.
	(endgrent): Likewise.
	(getgrent_r): Mark as a safe cancellation point.
	* grp/getgroups.c (initgroups): Change to PTHREAD_UNSAFE_CANCELLATION.
	(getgroups): Likewise.
	* pwd/fgetpwent.c (fgetpwent): Mark as an unsafe cancellation point.
	* pwd/getlogin.c (getlogin): Likewise.
	* pwd/fgetpwentr.c (fgetpwentr): Mark as a safe cancellation point.
	* pwd/getpwnam_r.c (getpwnam_r): Likewise.
	* pwd/getpwuid_r.c (getpwuid_r): Likewise.
	* pwd/getpwent.c (getpwent_r): Likewise.
	(getpwent): Make as an unsafe cancellation point.
	(endpwent): Likewise.
	(setpwent): Likewise.
	* pwd/getpwnam.c (getpwnam): Likewise.
	* pwd/getpwuid.c (getpwuid): Likewise.
	* pwd/putpwent.c (putpwent): Likewise.

	* stdio.h (struct __iobuf): Add 'lock' as a placeholder for
	multithreaded I/O support.
	(fgets): Fix definition.
	* stdio/fgets.c (fgets): Fix function definition.

	* pthread.h (struct __pthread_thread): Rename 'param' to '__param'.
	Add '__policy'.
	(pthread_getschedparam): Fix prototype.
	* pthread/schedparam.c (pthread_getschedparam): Fix function
	definition and get thread policy.
	(pthread_setschedparam): Set thread policy.

	* ulimit.h (ulimit): Correct prototype.
	* resource/ulimit.c (ulimit): Function takes a variable number
	of args.  Adjust accordingly.

	* unistd.h (sync): Function never returns a result
	* unix/sync.c (sync): Don't bother with any errors returned
	by __os_args call.
	(fsync): Mark that this is a cancellation point.

	* dirent.h (ino_t): Define here.
	* sys/types.h (ino_t): Remove definition from here.

	* abs.c: Delete file.
	* stdlib/abs.c: New file.
	* stdlib/labs.c: New file.
	* stdlib/llabs.c: New file.

	* pthinit.c: Renamed from init.c for ELF compatibility.
	* pthsignal.c: Renamed from signal.c for ELF compatibility.
	
Wed Apr 13 20:17:24 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/cdefs.h (__NTH): Declare for non-GCC compilers.
	(__attribute_warn_unused_result__): Declare.
	(__wur): Declare (shorthand for above).

	* string.h: Improve namespace and type conformance.
	Add GCC's 'nonnull' attribute to prototypes.
	Remove __THROW for any functions that are cancellation points.
	* sys/stat.h: Likewise.
	* sys/select.h: Likewise.
	* sys/resource.h: Likewise.
	* netdb.h: Likewise.
	* crypt.h: Likewise.
	* dirent.h: Likewise.
	* fcntl.h: Likewise.
	* setjmp.h: Likewise.
	* stdio.h: Likewise.
	* stdlib.h: Likewise.
	* unistd.h: Likewise.

	* sys/resource.h (ulimit): Remove declaration.
	(nice): Likewise.
	* ulimit.h: New file.
	* unistd.h (nice): Add prototype.
	* resource/ulimit.c: Include ulimit.h.
	
	* alloca.h (alloca): Remove __THROW.  Add GCC variant.
	* assert.h (assert): Add noreturn attribute.
	(__ASSERT_CAST): Define with better C++ support.
	(assert): Use it.

	* ctype.h (isascii): Set visibility for SVID, MISC and XOPEN only.

	* iconv.h: Don't include errno.h.
	(iconv): Add 'restrict' to certain parameters.
	* locale/iconv.c: Include errno.h.

	* sys/select.h (__NFDBITS): Rename from NFDBITS.  Define sizeof
	in terms of variable name, rather than type.
	(__FDELT): Rename from FDELT.
	(__FDMASK): Rename from FDMASK.
	(__fd_set): Fix according to new macro names.
	(FD_SET): Likewise.
	(FD_CLR): Likewise.
	(FD_ISSET): Likewise.
	(fd_mask): Only define if __USE_MISC.
	(select): Add C99's 'restrict' qualifier.
	(pselect): Likewise.

	* sys/stat.h (struct stat): Change the types of 'st_blksize'
	and 'st_blocks'.

	* sys/time.h (timeradd): Define.
	(timersub): Define.

	* unix/dirent.c (opendir): Mark as an unsafe cancellation point.
	(readdir_r): Likewise.
	(readdir): Likewise.
	(closedir): Likewise.
	(scandir): Likewise.

	* features.h (BSD): Undefine.
	(__builtin_expect): Only undefine for non-GCC compilers.
	(__GLIBC_PREREQ): Delete macro.
	(__ULIBC_PREREQ): Define macro.
	* resolv/gethnamaddr.c (BSD): Define.

	* pthread.h: Make compatible with C++.
	(pthread_setschedparam): Add prototype.
	(pthread_getschedparam): Add prototype.
	(struct __pthread_thread): Add 'param'.
	* schedparam.c: New file.

	* time/time.c (time): Fix shadow parameter warning.
	* time/setitmr.c (add_ticker): Likewise.
	(check_ticker): Likewise.
	* resource/getrusage.c (getrusage): Likewise.
	* time/strftime.c (strftime): Likewise.
	(territory_convert): Adjust prototype to reduce warnings.
	(territory_standard): Likewise.
	* signal/post.c (__write_backtrack): Fix printf warnings.
	* crypt/crypt.c (_ufc_doit_r): Use ANSI-style declarations.
	* common/unixify.c (__unixify): Add parenthesis to resolve an
	ambiguity.
	* bsearch.c (bsearch): Fix warnings.

Fri Apr  8 23:31:14 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unixlib/unix.h (__escape_disabled): Define variable.
	* source/unix/unix.c: Record if the escape key is disabled on
	  program initialisation.
	* source/sys/vfork.c: Disable escape on return to parent if necessary.
	* source/unix/tty.c (__tty_console_gterm, __tty_console_sterm): Don't
	  alter escape status if it was disabled.
	  (__tty_console_swinsz): Don't set the text window size when running
	  in a taskwindow.

Fri Apr  8 20:20:41 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/attrib.c (__set_protection): When translating,
	take into account group ownerships.
	(__get_protection): Likewise.

Fri Apr  8 20:12:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* string/_ffs.s (ffs): Be a 'ffs' rather than a 'clz' algorithm.

Fri Apr  8 18:02:00 2005  Nick Burrett  <nick@sqrt.co.uk>

	Improve accuracy of converting IEEE numbers to ASCII, fix
	many formatting errors in printf and add C99 conformance.

	* gdtoa/{arith.h, fpmath.h, gdtoa.h, gdtoaimp.h}: New files.
	* gdtoa/{dmisc.c, dtoa.c, g_ddfmt.c, g_dfmt.c}: New files.
	* gdtoa/{gdtoa.c, gethex.c, g_ffmt.c, g__fmt.c}: New files.
	* gdtoa/{glue.c, gmisc.c, g_Qfmt.c, g_xfmt.c}: New files.
	* gdtoa/{g_xLfmt.c, hd_init.c, _hdtoa.c, hexnan.c}: New files.
	* gdtoa/{_ldtoa.c, misc.c, smisc.c, strtod.c}: New files.
	* gdtoa/{strtodg.c, strtodI.c, strtof.c, strtoId.c}: New files.
	* gdtoa/{strtoIdd.c, strtoIf.c, strtoIg.c, strtoIQ.c}: New files.
	* gdtoa/{strtoIx.c, strtoIxL.c, strtopd.c, strtopdd.c}: New files.
	* gdtoa/{strtopf.c, strtopQ.c, strtopx.c, strtopxL.c}: New files.
	* gdtoa/{strtord.c, strtordd.c, strtorf.c, strtorQ.c}: New files.
	* gdtoa/{strtorx.c, strtorxL.c, sum.c, ulp.c}: New files.
	* gdtoa/README: New file.

	* strtod.c: Remove file.  Replaced by the gdtoa library.
	* stdlib/strtof.c: Likewise.

	* stdio/vfprintf.c: New file, taken from FreeBSD libc.
	* stdio/printf.c (vfprintf): Delete function.
	* stdio/floatio.h: New file.

	* stdio/fwrite.c (fwrite): Special handling of a file descriptor
	of -1, for new vfprintf function.

	* stdio/asprintf.c: New file.
	* stdio/vasprintf.c: New file.
	* stdio.h (vasprintf): Add prototype.
	(asprintf): Add prototype.

	* bits/nan.h (NAN): For GCC 3.3 and later, use the builtin.
	* bits/byteswap.h: Re-enable __bswap_64.
	* string/byteswap.h (__BYTESWAP_H): Renamed from _BYTESWAP_H for
	consistency with other header files.

	* stdio.h (vfprintf): Remove __THROW on functions that are
	cancellation points.
	(vfprintf): Likewise.
	(fprintf): Likewise.
	(printf): Likewise.
	(fscanf): Likewise.
	(vscanf): Likewise.
	(vfscanf): Likewise.
	* unistd.h (sleep): Likewise.
	(usleep): Likewise.

Thu Apr  7 19:44:29 2005  Nick Burrett  <nick@sqrt.co.uk>

	* features.h (__STDC_ISO_10646__): Don't use C99 comments.
	(___program_name): Don't define if compiling for ELF.
	(___dynamic_da_name): Likewise.
	(__program_name): If compiling for ELF, then add WEAK attribute.
	(__dynamic_no_da): Likewise.
	(__dynamic_da_name): Likewise.
	(__dynamic_da_max_size): Likewise.

	* unixlib/buildoptions.h (__UNIXLIB_ELF): Define, temporarily.

	* sys/_syslib.s (no_dynamic_area): Don't reserve 128 bytes of
	stack for Objective-C.
	(___program_name): If compiling for ELF, then don't export.
	(___dynamic_da_name): Likewise.
	(___dynamic_da_max_size): Likewise.
	(___dynamic_no_da): Likewise.
	(__check_chunk_l2): Use MOV rather than old 'return' MACRO.
	(__unixlib_fatal_got_msg): Use SWI calls direct.
	(__robase): Provide ELF alternative.
	(__unixlib_rwlimit): Likewise.
	(__rwbase): Likewise.

	* sys/mman.c (__munmap_all): Provide ELF alternative for accessing
	__dynamic_da_name.
	* unix/features.c (get_program_name): Similarily for __program_name.

Thu Apr  7 19:37:19 2005  Nick Burrett  <nick@sqrt.co.uk>

	* common/riscosify.c (__sdirinit): Use __os_swi rather than
	_kernel_swi.

Thu Apr  7 19:36:09 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/_os.s (__os_prhex): Build buffer directly.
	(__os_setfiletype): New function.

	* sys/os.h (__os_setfiletype): Add prototype.

Thu Apr  7 19:33:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/unix.c (convert_command_line): Cope with arguments that
	are effectively empty strings.

Thu Apr  7 19:31:46 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sys/cdefs.h (__nonnull): Define.
	(__THROW): Update for later GCC releases.
	(__NTH): Likewise.
	(strong_alias): Define.
	(weak_alias): Define.
	(hidden_def): Define.
	(libm_hidden_def): Define.
	(INTDEF): Define.
	* stdlib.h (atof): Remove __THROW from inline version.
	(atoi): Likewise.
	(atol): Likewise.
	(atoll): Likewise.
	* math/llrintf.c: Fix weak_alias decl.
	* math/lrintf.c: Likewise.
	* resolv/inet_addr.c: Likewise.
	* netlib/getpeernam.c (getpeername): Remove __THROW from decl.
	* sys/mount.c (mount): Likewise.
	(umount): Likewise.
	(umount2): Likewise.

Wed Apr  6 21:10:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (opendir): Remove check on whether
	  __riscosify returned a filetype.

Tue Apr  5 22:30:34 2005 Peter Naulls  <peter@chocky.org>

	* source/string/_memset.s: Fixed version of Adrian's memset.
	* source/clib/unixlib/dev.h, source/unix/custom.c,
	  source/unix/dev/c: Custom device handling.

Tue Apr  5 22:09:32 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/termios/tcdrain.c (tcdrain): Remove ioctls that have
	  no effect.
	* source/termios/tcgetattr.c (tcgetattr): Use a single ioctl to get
	  the attrs directly and avoid loss in converting between formats.
	* source/termios/tcsetattr.c (tcsetattr): Likewise.

Mon Apr  4 19:37:26 2005 Peter Naulls  <peter@chocky.org>

	* source/string/_memset.s: Revert; Adrian's version seems to have
	  problems.

Mon Apr  4 12:57:46 2005 Peter Naulls  <peter@chocky.org>

	* source/memcpy.c, source/memset.c: Removed - bzero, bcopy
	  included in assembler.
	* source/string/_strcpy.s, source/string/_strlen.s: Adrian
	  says cache alignment may improve performance.
	* source/sys/_memset.s: Removed
	* source/string/_memset.s, source/string/_memcpy.s: Faster
	  implementations from Adrian Lees.
	* source/signal/post.c: Experiment with provding disassembly
	  in backtrace.

Sat Apr  2 22:03:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dirent.c (readdir_r): Take account of
	  __feature_imagefs_is_file.

Sat Apr  2 09:28:42 2005  Stefan Bellon <sbellon@sbellon.de>

	* source/sys/debug.c: Fix compile error.
	* objs/.cvsignore: Add more filenames to ignore.

Fri Apr  1 17:05:51 2005  Peter Naulls  <peter@chocky.org>

	* source/strcpy.c, source/strlen.c: Removed
	* source/string/_strcpy.s, source/string/_strlen.s: New
	  faster versions from Adrian Lees.
	* source/unix/dev.c: Remove old free call.

Thu Mar 31 13:55:25 2005  Nick Burrett  <nick@sqrt.co.uk>

	* sched.h (sched_yield): Add prototype.
	* sched/syield.c: New file.

	* Makefile.in (CROSS_CFLAGS): Set compiler to the C99 standard.

Thu Mar 31 13:50:43 2005  Nick Burrett  <nick@sqrt.co.uk>

	* setlocale.c (setlocale): Only build ctype tables when they
	are actually being changed.

Thu Mar 31 12:38:23 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/sleep.c (nanosleep): New function.
	* time.h (nanosleep): Add prototype.

Thu Mar 31 12:26:20 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unix/dev.c (__fsopen): Reduce OS_FSControl canonicalisation
	calls by using a fixed buffer from the stack.

Thu Mar 31 10:52:14 2005  Nick Burrett  <nick@sqrt.co.uk>

	* signal/post.c (__unixlib_raise_signal): Remove PROCMAGIC
	check.

Thu Mar 31 10:44:49 2005  Nick Burrett  <nick@sqrt.co.uk>

	* locale/localeconv.c (xfree): New function.
	(struct lonv lc): Initialise correctly.
	(localeconv): Use 'xfree' instead of 'free'.
	(read_byte_list): Remove DEBUG code because it is incompatible
	and can cause recursion with 'printf'.

Thu Mar 31 10:37:49 2005  Nick Burrett  <nick@sqrt.co.uk>

	* clk_getres.c: New file.
	* clk_gettime.c: New file.
	* clk_settime.c: New file.
	* time.h (clock_getres): Add prototype.
	(clock_gettime): Add prototype.
	(clock_settime): Add prototype.
	* unistd.h (_POSIX_MONOTONIC_CLOCK): Define.

Thu Mar 31 10:25:40 2005  Nick Burrett  <nick@sqrt.co.uk>

	* unixlib/sigstate.h (__valid_address): Prepend '__' as this is
	a globally defined function.  Set args to 'void *' to reduce
	explicit-casting in source.
	(__write_backtrace): Add prototype.
	* signal/post.c (__valid_address): Adjust accordingly.
	(__write_backtrace): Make global.
	(__unixlib_raise_signal): Stablise signal handling in unpredictable
	situations, or die when we find parts of the environment are
	in a bad state.

Wed Mar 30 22:37:44 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/tty.c (__ttyicanon): Restore the previous escape
	  state, rather than just assuming it was set.

Tue Mar 29 23:44:37 2005  Peter Naulls  <peter@chocky.org>

	* source/unix/getenv.c, source/unix/select.c: Avoid
	  NULL pointer reading.

Mon Mar 28 15:56:14 2005  John Tytgat  <John.Tytgat@aaug.net>

	* kernel.h: Better describe its intention; Added prototypes
	  __rt_allocauto() and __rt_freeauto().
	* signal/post.c: Added ptr to int cast avoiding Norcroft compiler
	  error.
	* sys/_alloca.s: Exported __rt_allocauto() and __rt_freeauto()
	  as aliases for alloca() and nop.  For Norcroft users.

Sat Mar 26 23:32:09 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/signal/post.c (post_signal): Open a command window if the
	  backtrace would otherwise get lost.

Mon Mar 21 12:03:23 2005  Peter Naulls  <peter@chocky.org>

	* source/clib/pthread.h, source/pthread/lock.c: Tidy comments.
	* source/pthread/context.c: Fix spelling.
	* clib/unixlib/unix.h, source/unix/unix.c, source/sys/_syslib.s:
	  Avoid creating FP exceptions on overflows and other FP operations
	  more like Unix behaviour.

Sun Mar 20 15:44:23 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/riscosify.c, source/common/unixify.c,
	  source/unix/dirent.c: Use __os_swi instead of _kernel_swi to avoid
	  modifying errno (Bug#140).

Sat Mar 19 19:26:16 2005  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/sys/_swi.s, source/test/test1-swi.c: Fix handling of return
	  registers > r3. Update testcase appropriately.

Sat Mar 19 11:54:53 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/dev.c (__fsread): Fix potential buffer overflow.
	  (__fslseek): Cope with being called for a directory.
	  (__fsfstat): Fix double free when called for a directory.

Tue Mar 15 22:07:05 2005  Alex Waugh  <alex@alexwaugh.com>

	* Docs/ReadMe: Document new behaviour of environment variables.
	  Update fork/wimpslot section.
	* source/clib/stdlib.h (unsetenv, putenv): Fix prototypes.
	* source/clib/unixlib/unix.h: Add/remove prototypes.
	* source/common/prefix.c, source/unix/features.c: Add extra
	  parameter to __getenv_from_os calls.
	* source/unix/{getenv.c, putenv.c, setenv.c}: Change environment
	  variable behaviour to use global RISC OS environment for anything
	  with a $ in the name, and the process' private environment otherwise.
	* source/unix/unix.c: Populate environ on program initialisation.

Sun Mar 13 19:37:45 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Fix logic for out of memory error handling.

Sun Mar 13 17:34:18 2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/module/sul.s: error_active address doesn't need module_start
	  compensation in ADR usage.

Sun Mar 13 10:05:00 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/locale/localeconv.c (localconv): Ensure everything we free
	  was malloced in the first place.

Sat Mar 12 13:32:27 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: stdin/stdout should only be opened if we
	  haven't inherited them from a parent.

Sat Mar 12 10:29:12 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/setjmp.h, source/sys/_jmp.s: Remove unused entry from
	  jmp_buf.

Sun Mar 6 21:48:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Fix unpredictable MUL instruction.

Sat Mar 5 15:45:00  2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/common/unixify.c (__unixify): __RISCOSIFY_FILETYPE_EXT
	  support got broken.

Fri Mar 4 21:55:54  2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unistd.h, source/clib/unixlib/{asm_dec.s,
	  buildoptions.h, dev.h, fd.h, local.h, tty.h, unix.h},
	  source/common/{_atomic.s, sockvalid.c},  source/module/sul.s,
	  source/netlib/{accept.c, bind.c, connect.c, getpeernam.c,
	  getsocknam.c, getsockopt.c, listen.c, recv.c, recvfrom.c, recvmsg.c,
	  send.c, sendmsg.c, sendto.c, setsockopt.c, shutdown.c, socket.c},
	  source/pthread/_context.s, source/resource/{getegid.c, geteuid.c,
	  getgid.c, getpgrp.c, getpid.c, getppid.c, getprior.c, getuid.c,
	  seteuid.c, setgid.c, setpgrp.c, setprior.c, setuid.c},
	  source/signal/{kill.c, post.c}, source/sound/dsp.c,
	  source/stdio/{fopen.c, stdio.c, tmpfile.c}, source/sys/{_exec.s,
	  _syslib.s, _vfork.s, debug.c, exec.c, stackalloc.c, vfork.c},
	  source/termios/{tcgetattr.c, tcsetattr.c}, source/unistd/{fchdir.c,
	  fchown.c}, source/unix/{close.c, dev.c, dup2.c, fchmod.c, fcntl.c,
	  features.c, fstat.c, ioctl.c, isatty.c, ispipe.c, lseek.c, open.c,
	  pathconf.c, pipe.c, proc.c, read.c, readv.c, reopen.c, select.c,
	  stat.c, sync.c, truncate.c, tty.c, umask.c, unix.c, wait4.c, write.c,
	  writev.c}:
	  Rewrite large parts of vfork() and exec(), and add better support
	  for fork(). Make SUL aware of processes, and improve file descriptor
	  handling.

Wed Mar 2 22:54:07 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Fix parsing for commandline redirection when
	  the command line contains quotes.

Sat Feb 12 13:44:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s: Disable context switching in
	  taskwindows, as it doesn't work reliably.

Wed Feb 9 23:13:58 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/select.c (__return_fd_set): Only clear fds that are
	  sockets.

Wed Feb 9 21:09:05 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/pthread.h, source/clib/signal.h,
	  source/pthread/newnode.c, source/pthread/signal.c: Add partial
	  implementation of sigwait().

Mon Feb 7 14:52:18 2005  John-Mark Bell  <jmb202@ecs.soton.ac.uk>

	* source/regexp/{cclass.h, cname.h, engine.h, regcomp.c,
	  regexec.c, regerror.c, regfree.c, utils.h, COPYRIGHT}:
	  Use regex implementation from NetBSD CVS. The previous
	  version appeared to be non-POSIX compliant.
	* source/regexp/{regexp.c, regmagic.h, regsub.c}: Remove unused files

Sun Feb 6 19:48:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/module/sul.s: Change upcall handler to refuse all new
	  applications from starting. This avoids bugs in the current
	  upcall handler.

Sun Jan 30 16:04:32 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/pipe.c, source/unix/dev.c, source/clib/unixlib/unix.h:
	  Remove linked list of all open pipes, as the same functionality can
	  be achived simply by setting the O_UNLINKED flag on the pipe.

Sat Jan 29 17:23:04 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/context.c (__pthread_context_switch): Remove thread
	  from condition variable list if it times out waiting for the
	  condition variable.

Mon Jan 24 16:44:19 2005  Peter Naulls  <peter@chocky.org>

	* source/regexp/regex2.h, source/regexp/regfree.c,
	  source/regexp/utils.h: Added: regfree() support.
	* source/pthread/key.c: Reuse key structure if it's already
	  allocated for a given ID.
	* source/pthread/keydest.c: Fix spelling.
	* source/pthread/lock.c: Return EBUSY when trying for a lock.

Sun Jan 23 21:27:23 2005  John Tytgat  <John.Tytgat@aaug.net>

	* features.h: More constify __program_name, ___program_name,
	  __dynamic_da_name and prototyped ___dynamic_da_name.
	* source/sys/_syslib.s: Defined ___dynamic_da_name.
	* source/sys/mman.c (mmap): DA name is __dynamic_da_name when defined,
	  otherwise <program name> + " MMap". Suggestion of Alex in bug #138.

Sun Jan 23 20:27:33 2005  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added more info on what <program name> really is.
	Changed iconv URL into a version independent link.
	* source/clib/features.h: Added prototypes for ___program_name (internal)
	  and __program_name (WEAK public symbol).
	* source/clib/fenv.h: Updated comment for FE_TONEAREST.
	* source/clib/unixlib/unix.h: Made get_program_name() available.
	* source/sys/_longlong.s: Updated comments.
	* source/sys/_syslib.s: Support for __program_name (up to 32 chars).
	* source/sys/mman.c: DA name is <program name> + " MMap". This addresses
	  bug #138.
	* source/unix/features.c (get_program_name): Support for __program_name.

Sat Jan 22 00:06:21 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/unixlib/unix.h (_PROCMAGIC): Change magic number as a
	  temporary workaround for bug#137

Sun Jan 16 18:25:33 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c (find_redirection_type): Don't treat <
	  and > inside quoted arguments as redirection characters.

Sun Jan  9 23:26:02 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/locale/nl_langinfo.c (nl_langinfo): Change CODESET value to
	  a format that iconv recognises.

Wed Jan  6 23:42:25  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/Copyright: consistent spelling of UnixLib.
	* source/test/{test1-swi.c, test2-seg.c, test3-fpe.c}: Likewise.

Wed Jan  6 23:13:25  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/_syslib.s: Removed export of non-existing __os_version
	  symbol.

Wed Jan  6 23:07:25  John Tytgat  <John.Tytgat@aaug.net>

	* gen-makefiles.pl: Generated stubs.h file contains a gen-makefiles.pl
	  reference; clean target removes all obj subdirectories instead of
	  the objects in the o sub-directories.
	* obj/Makefile.in: Likewise.
	* source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s}:
	  0/0 didn't raise despite previous fix; modulo result wasn't correct
	  when numerator was zero.  Bugs reported by Stefan Bellon.
	* source/regexp/{regexp.c, regsub.c}: Norcroft compilation fixes.
	* source/resolv/inet_net_pton.c: Likewise.
	* source/sys/{_smod.s, _umod.s}: Added "IMPORT raise" for objasm
	  compatibility.

Wed Jan  5 11:33:20 2005  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe36c1, Docs/ReadMe36c2, Docs/ReadMe36d, Docs/ReadMe36e,
	  Docs/ReadMe37a, Docs/ReadMe37b, Docs/ReadMe38: Remove - out
	  of date information.
	* Docs/Copyright: Draft of new UnixLib copyright statement.
	* source/clib/regex.h: Matching header file for source.

Tue Jan  4 22:50:42 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/common/unixify.c (add_directory_name): Slashes should be
	  converted to dots.

Tue Jan  4 00:30:47 2005  Peter Naulls  <peter@chocky.org>

	* source/regex.c: Removed.
	* source/regexp/COPYRIGHT, source/regexp/regerror.c,
	  source/regexp/regexp.c, source/regexp/regmagic.h,
	  source/regexp/regsub.s: Added: Alterntate regex implementation.

Mon Jan  3 23:33:47 2005  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/sys/types.h: Define int64_t and u_int64_t for Norcroft
	  users.
	* source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s}:
	  Raise SIGFPE when there is an integer division by zero.
	* source/sys/{_sdiv.s, _smod.s, _udiv.s, _umod.s}: Likewise.
	* source/string/rawmemchr.c: Workaround for Norcroft users.
	* source/sys/_divtest.s (__rt_divtest, x$divtest): No longer console
	  writing of a division by zero and a SIGFPE raise instead of a
	  SIGABRT raise.
	* source/sys/_longlong.s: License statement didn't cover complete
	  source; Implementation of _ll_urdv and _ll_srdv got argument order
	  wrong.

Mon Jan  3 16:28:34 2005  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s (__pthread_stop_ticker): Stack register
	  that gets corrupted.
	* source/pthread/exit.c (pthread_exit): Fix potential race condition.

Mon Dec 27 19:38:27 2004  John-Mark Bell <jmb202@ecs.soton.ac.uk>

	* source/sys/_swi.s: Simplify _BLOCK and _RETURN handling. 
	  Modify return of PC to work on <ARMv3.
	* source/test/test1-swi.c: Improve test case.
	  
Sun Dec 26 18:09:45 2004  John-Mark Bell <jmb202@ecs.soton.ac.uk>

	* source/sys/_swi.s: Clean implementation of this file.

Wed Dec 22 23:32:12 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/strsignal.c (strsignal): Add the RISC OS error string to the
	  return value in case of SIGOSERROR.
	* source/sys/exec.c (execve): Extended the hack to recognize
	  "/bin/sh -c" execs.  This solves bug 86.

Sat Dec 25 10:23:30 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/libgen.h, source/misc/dirname.c,
	  source/stdlib/xpg_basename.c, source/string/memrchr.c,
	  source/string/rawmemchr.c, source/clib/string.h:
	  Add libgen.h functionality (dirname, basename) and related
	  changes in support of these functions.
	* source/stdio/printf.c: libscl compatibility - this is a temporary
	  workaround for libscl varargs.

Thu Dec 23 20:51:31 2004  Peter Naulls  <peter@chocky.org>

	* source/sound/dsp.c, source/clib/swis.h, source/clib/unixlib/dev.h,
	  source/unix/dev.c, source/unix/write.c: Complete rewrite of
	  DSP support to use streaming interface in DigitalRenderer
	  and therefore suffer less lag.  Also will yield during write
	  to prevent blocking, and better support for some ioctls.
	* source/signal/signal.c, source/sys/_syslib.s: Fix typos.
	* source/unix/unix.c: Ensure DigitalRenderer deregister on
	  an abort.  

Mon Dec 20 16:18:55 2004  Peter Naulls  <peter@chocky.org>

	* source/math-asm/_fabsf.s: Added fabsf function.
	* source/sys/_mem.s, source/sys/_memset.s:  Replaced
	  our memset with hopefully faster (and simpler) one
	  from glibc.
	* source/clib/sys/queue.h: Add sys/queue.h functionality.

Sat Dec 18 18:37:52 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/sys/debug.c: Removed __debugnl(); Added debug print of
	  struct proc::cli and struct proc::dde_prefix.
	* source/sys/exec.c (execve): First shift contents of struct proc::envp
	  array and then the array ptr (and not visa versa).  Bug reported by
	  Steve Ellacott.

Thu Dec 16 17:09:18 2004  Peter Naulls  <peter@chocky.org>

	* source/common/riscosify.c: Handle use of ~ in filenames
	  by substituting our HOME value.

Thu Dec 16 11:32:48 2004  Peter Naulls  <peter@chocky.org>

	* source/termios/tcsetattr.c: Compare the correct flags before
	  setting CBREAK/RAW.
	* source/unix/tty.c: Do ICRNL only when INLCR is not set.
	  Don't clear all the flags when CBREAK is set (corrects
	  returning CR instead of LF in non-canonical mode).   

Wed Dec 15 17:54:07 2004  Peter Naulls  <peter@chocky.org>

	* source/common/unixify.c: Pull in functionality from rname.c,
	  so unixify works much better.

Tue Dec 14 23:10:26 2004  Peter Naulls  <peter@chocky.org>

	* source/common/riscosify.c: Make riscosify really work for
	  libscl.
	* source/unix/fchmod.c: Allow to build when cross compiling.

Sat Dec 11 15:02:57 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/swiparams.h: Added OSFILE_WRITECATINFO_ALL,
	  OSFILE_DELETENAMEDOBJECT, OSFILE_CREATEDIRECTORY,
	  OSFILE_CREATEEMPTYFILE_FILETYPE; Consult the __UNIXLIB_USEFILEPATH
	  value instead of checking on its existence (which is now always the
	  case).
	* source/stdio/rename.c: Using new OSFILE_* constants.
	* source/unix/chmod.c: Likewise.
	* source/unix/{dev.c, fchmod.c, mkdir.c, unlink.c, utime.c}: Likewise.
	* source/pthread/{context.c, create.c, error.c, exit.c):
	  __os_print("\r\n") -> __os_nl()
	* source/signal/post.c: Likewise.
	* source/stdio/{flsbuf.c, fopen.c, fpos.c, fwrite.c, newstream.c,
	  unix.c}: Likewise.
	* source/sys/{brk.c, debug.c, exec.c, execvp.c, statckalloc.c, vfork,c}:
	  Likewise.
	* source/unix/{dev.c, dirent.c, getenv.c, open.c, stat.c, unix.c}:
	  Likewise.
	* souce/sys/_syslib.s (__unixlib_fatal): Added useful reminder as
	  comment.
	* source/unix/unix.c: Fill RISC OS error buffer before calling
	  __unixlib_fatal(); When __UNIXLIB_SET_DDEPREFIX is defined, always set
	  DDEPrefix to its value at startup; Added malloc()/realloc() return
	  value check.

Wed Dec  8 16:11:55 2004  Peter Naulls  <peter@chocky.org>

	* source/unix/dev.c (__fsopen): Only close the file if
	  attribute setting whilst the file is open fails.

Tue Dec  7 22:54:45 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/stdio/fflush.c (fflush): Don't return an error if a read
	  only stream is flushed.

Sat Dec  4 23:07:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/select.c: Norcroft compatibility; unsigned modulo
	  instead of signed for better code.

Sat Dec  4 15:10:37 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/pwd/pwdread.c (__pwddefault): Prevent potential NULL
	  dereference, and ensure pw_dir is not returned as NULL.

Fri Dec  3 11:34:41 2004  Peter Naulls  <peter@chocky.org>

	 * source/clib/unixlib/dev.h. source/netlib/accept.c,
	   source/netlib/socket.c, source/unix/close.c,
	   soure/unix/select.c:  More select() speed improvements.
           These make a noticeable difference.

Thu Dec  2 14:42:35 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/termios.h: Add arbitrary value for XCASE.
	* source/sound/dsp.c: Modify buffer sizes for slightly better
	  behaviour.
	* source/unix/dev.c: Make fopen "w+" work over ShareFS.
	* source/unix/select.c: Attempt some speed improvements.
	* source/unix/unix.c: Make command line arguments with apostrophes work.

Sun Nov 28 22:01:02 2004  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: mention APCS-32 explicitly.
	* Docs/ReadMe: UnixLib$pcnt is another internally used environment
	  variable.
	* source/psignal.c (psignal): Get rid of 'register'.
	* source/clib/errno.h: Remove __set_errno multiple define protection
	  as this shouldn't be needed.
	* source/clib/stdio.h (getc): Always use the getc() function instead
	  of using the macro equivalent (bug 122).
	* source/clib/unixlib/asm_dec.s (NetSWI*): Let all the macros import
	  __net_error themselves; Updated their comments; Simplified the
	  NetSWIsimple(0) even further.
	* source/clib/unixlib/buildoptions.h (__UNIXLIB_SET_DDEPREFIX): Added.
	* source/clib/unixlib/sigstate.h: __write_unrecoverable, __backtrace,
	  __core: Removed as it was nowhere used; __backtrace_getfp,
	  __ul_callbackfp: Added.
	* source/clib/netlib/{_accept.s, _bind.s, _connect.s, _getpeers.s,
	  _getpeerna.s, _getsockna.s, _getsockop.s, _gettsize.s, _listen.s,
	  _readv.s, _recv.s, _recvfrom.s, _recvmsg.s, _sclose.s, _select.s,
	  _send.s, _sendmsg.s, _sendto.s, _sendtosm.s, _setsockop.s,
	  _shutdown.s, _sioctl.s, _socket.s, _sockstat.s, _sread.s, _swrite.s,
	  _writev.s}: Removed IMPORT __net_error_simple_entry.
	* source/clib/netlib/_net_error.s: Updated comments; Removed
	  __net_error_simple_entry as direct calling __net_error from
	  NetSWIsimple(0) macros is possible; Removed preserve of ip.
	* source/scl/{_kernel.s, _kswi_c.s}: _kernel_NONX feature wasn't
	  working at all.
	* source/signal/_signal.s: Removed needless IMPORT of
	  __write_unrecoverable; Updated a couple comments; Take a snapshot
	  of CPSR during each hardware exception handler; Renamed __ul_errfp
	  to __ul_callbackfp as this should only be the fp and valid during
	  CallBack handler code (shared by the hardware exception handlers too),
	  during error handler this is NULL; Instead of reseting the exception
	  FP flags, we temporary disable FP traps (cfr bug 119); Pull
	  __ul_callbackfp in C$$data area.
	* source/signal/post.c: Removed needless __write_unrecoverable; Updated
	  write_backtrace so it becomes more useful and foolproof.
	* source/stdio/flsbuf.c: Replaced -1 by EOF.
	* source/stdio/fwrite.c: Likewise.
	* source/sys/_syslib.s: Updated some comments.
	* source/unix/unix.c: Make use of new __UNIXLIB_SET_DDEPREFIX build
	  option.
	* source/unix/write.c: Test on existence of SIGPIPE is no longer
	  needed when we're already checking for __UNIXLIB_FEATURE_PIPEDEV.
	* source/unix/writev.c: Added test on __UNIXLIB_FEATURE_PIPEDEV.

Sun Oct 10 17:37:38 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/unix.c: Change default back to not setting
	  DDEUtils_Prefix

Sat Oct 23 19:00:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/dev.c: RMEnsure CryptRandom 0.12; Removed
	  __UNIXLIB_NO_COMMON_DEV support;
	* source/clib/unixlib/dev.h: Constify __dev; Removed
	  __UNIXLIB_NO_COMMON_DEV support.
	* source/unix/tty.c: Removed __UNIXLIB_NO_COMMON_DEV support.
	* Docs/ReadMe: Documented the usage of CryptRandom module and its home
	  URL.
	* source/clib/stdio.h: Removed personal comment.
	* source/clib/unixlib/buildoptions.h: Fixed spelling mistake.
	* source/clib/unixlib/os.h (__seterr): Added more info on its behaviour.
	* source/locale/iconv.c (iconv): RMEnsure at least Iconv 0.02 and use
	  ModuleTooOld error number instead of 0.
	* source/sound/dsp.c (__dspopen): Use ModuleTooOld error number instead
	  of 0.
	* source/pthread/{_ints.s, _yield.s}: Talk about APCS-32 instead of
	  APCS.
	* source/signal/sigexec.s: Likewise.
	* source/sys/_syslib.s: Likewise.
	* source/signal/_signal.s: Likewise. Temporary workaround for
	  _kernel_last_oserror() in __seterr() which changes error number 0
	  into 1.
	* source/sys/errlist.c: Removed register usage.
	* source/unix/fnmatch.c: Reverted back to 1.2 version because making
	  1.3 to work involves pulling in too many other GLIBC based code.

Sun Oct 17 18:19:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added 'Building' section.
	* objs/Makefile.in: target 'clean' removes UnixLib:o.UnixLib too.
	* source/clib/{fnmatch.h, langinfo.h, nl_types.h, bits/locale.h}: Added
	  CVS/RCS keyword header.
	* source/clib/string.h: Remove #define ffsl. Declared ffsll too for
	  Norcroft users.
	* source/clib/unixlib/asm_dec.s, source/common/_exist.s,
	  source/gcccompat/{_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s},
	  source/netlib/{_getsockop.s, _recvfrom.s, _select.s, _sendto.s,
	  _setsockop.s}, source/pthread/{_context.s, _ints.s},
	  source/scl/{_kernel_swi.s, _kgetenv.s, _kosargs.s, _kosbget.s,
	  _kosbput.s, _kosbyte.s, _koscli.s, _kosfind.s, _kosgbpb.s, _kosrdch.s,
	  _kosword.s, _koswrch.s, _ksetenv.s}, source/sys/{_alloca.s,
	  _longlong.s, _mem.s, _mman.s, _modsi3, _os.s, _syslib.s, _vfork.s}:
	  Removed stackreturn macro.
	* source/clib.unixlib/asm_dec.s, source/unix/getpagsiz.s,
	  source/time/_clock.s, source/sys/{_umod.s, _udiv10.s, _udiv.s,
	  _syslib.s, _smod.s, _sdiv10.s, _sdiv.s, _profile.s, _os.s, _mem.s,
	  _longlong.s, _jmp.s, _divtest.s, _alloca.s, _ffsll.s, _ffs.s,
	  _signal.s, _memchk.s, _kswi_c.s, _kcurskch.s},
	  source/pthread/{_ints.s, _exit.s, _context.s},
	  source/netlib/{htons.s, htonl.s, _net_error.s, _bswap32.s},
	  source/math-asm/{_tanhf.s, _tanh.s, _tanf.s, _tan.s, _sqrt.s,
	  _sinhf.s, _sinh.s, _sinf.s, _sincos.s, _sin.s, _signbit.s, _powf.s,
	  _pow.s, _modf1f.s, _modf1.s, _logf.s, _log10f.s, _log10.s, _log.s,
	  _ldexpf.s, _ldexp.s, _isnan.s, _isinf.s, _hypot.s, _ftstexcpt.s,
	  _fsetexcpt.s, _fraiseexc.s, _floorf.s, _floor.s, _finite.s,
	  _fesetroun.s, _fesetenv.s, _feholdexc.s, _fegetrnd.s, _fegetenv.s,
	  _fclrexcpt.s, _fabs.s, _expf.s, _exp.s, _coshf.s, _cosh.s, _cosf.s,
	  _cos.s, _copysign.s, _ceilf.s, _ceil.s, _atanf.s, _atan2f.s,
	  _atan2.s, _atan.s, _asinf.s, _asin.s, _acosf.s, _acos.s},
	  source/gcccompat/{_umodi3.s, _udivdi3.s, _moddi3.s, _divdi3,s},
	  source/common/{_riscosify.s, _exist.s}: Removed return macro.
	* source/string/{_ffs.s, _ffsll.s}: Added.  Short & fast asm versions
	  instead of ffs.c and ffsll.c.
	* source/string/{ffs.c, ffsll.c}: Removed.  Replaced by _ffs.s and
	  _ffsll.s.
	* source/clib/unixlib/{buildoptions.h, stdcmac.h, stdsmac.h}:
	  Added.  buildoptions.h is now the only file containing build related
	  options.  stdcmac.h and stdsmac.h are support files allowing
	  buildoptions.h be used in C and ASM files.
	* source/clib/unixlib/features.h: Removed.
	* source/clib/unixlib/asm_dec.s: Moved build options to buildoptions.h.
	* source/math-asm/{_acosf.s, _asinf.s, _atan2f.s, _atanf.s, _ceilf.s,
	  _cosf.s, _coshf.s, _expf.s, _floorf.s, _ldexpf.s, _log10f.s, _logf.s,
	  _modf1f.s, _powf.s, _sinf.s, _sinhf.s, _tanf.s, _tanhf.s}:
	  Uses build option __UNIXLIB_NORCROFT_BUILD to determine which float
	  ABI is used (GCC vs Norcroft).
	* source/unix/fnmatch.c: Disabled calling versioned_symbol(),
	  strong_alias(), compat_symbol() and libc_hidden_ver().
	* source/clib/arpa/{inet.h, nameser.h}, source/clib/bits/huge_val.h,
	  source/clib/{alloca.h, complex.h, crypt.h, ctype.h, dirent.h,
	  fcntl.h, fenv.h, glob.h, grp.h, iconv.h, inttypes.h, kernel.h,
	  locale.h, math.h, nl_types.h, pthread.h, pwd.h, setjmp.h, sgtty.h,
	  stdint.h, string.h, swis.h, termcap.h, termios.h, time.h, unistd.h,
	  utime.h, wchar.h}, source/clib/machine/ieee754.h, source/clib/net/if.h,
	  source/clib/netinet/{in.h, in_systm.h, ip_icmp.h, ip_var.h, tcp.h,
	  udp.h}, source/clib/resolv/resolv.h, source/clib/rpc/netdb.h,
	  source/clib/sys/{byteorder.h, cdefs.h, debug.h, file.h, ioctl.h,
	  mman.h, netdb.h, poll.h, resource.h, select.h, socket.h, stat.h,
	  statfs.h, syslog.h, time.h, timeb.h, times.h, uio.h, utsname.h,
	  wait.h}, source/clib/unixlib/{dev.h, fd.h, local.h, os.h, sigstate.h,
	  tty.h}, source/crypt/crypt-private.h: Changed unixlib/features.h into
	  features.h.
	* source/common/stat.c, source/stdlib/random.c, source/sys/{alarm.c,
	  exec.c, stackalloc.c, vfork.c}, source/unix/{dev.c, pipe.c, tty.c,
	  write.c}: Removed unixlib/features.h.
	* source/crypt/crypt_util.c: No need to define __GNU_LIBRARY__
	  explicitly because this is now done in features.h.

Tue Oct 12 09:11:22 2004  Peter Naulls  <peter@chocky.org>

	* source/regex.c, source/realpath.c, source/time/mktime.c,
	  source/unistd/getpass.c: Work better with Norcroft.
	* source/clib/assert.h, source/clib/getopt.h, source/clib/netdb.h,
	  source/clib/stdio.h, source/clib/strings.h, source/clib/types.h,
	  source/clib/unixlib/types.h, source/unixlib/unix.h:
          Reference moved features.h
	* source/clib/unixlib/features.h: Warning if we use the old
	  features.h file path.
	* source/module/sul.s: Fix inadvertant change to SWI base.

Sun Oct 10 17:37:38 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/unix/uname.c: Cope with OS_ReadSysInfo returning 0

Fri Oct  8 12:56:32 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/signal.h, source/signal/signal.c: Stub siginterrupt
	* source/clib/time.h, source/time/mktime.c, source/time/dysize.c,
	  source/time/timegm.c: Add support for mktime, timelocal, dysize.
	* source/clib/features.h, source/clib/unixlib/features.h:
	  Move features.h to same location as glibc. Make unixlib/features.h
	  include former for time being.
	* source/clib/sys/mount.h, source/sys/mount.c: Stub mount.h
	  functionality.
	* source/common/riscosify.c: Modify to work with libscl too.
	* source/unix/fnmatch.c: Update functionality.
	* source/locale/iconv.c, source/clib/iconv.h: Work with Norcroft
	  properly.

Tue Oct  5 16:24:01 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/swis.h, source/locale/iconv.c: Update to sync with
	  John-Mark Bell's changes.
	* source/clib/netdb.h: Further improve visibility of macros
	  for unsupported functions.
	* source/unix/unix.c: Improve comment.
	* Docs/ReadMe: Update iconv URL.

Fri Sep 24 00:09:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Predefined _GNU_SOURCE as quick fix for Norcroft
	  users after the 12 Sept 2004 change in post.c.  Better fix would
	  probably be to make sure that UnixLib is compilable with and without
	  _GNU_SOURCE defined.
	* source/clib/sys/debug.h (__debug): Added comment what __debug is
	  doing.
	* source/clib/unixlib/sigstate.h (valid_address): constify its
	  parameters
	* source/signal/post.c (valid_address): Likewise.
	* source/clib/unixlib/unix.h: Minor comment updating.
	* source/scl/_koscli.s: Likewise.
	* source/pthread/_ints.s: Reverted the signed/unsigned compare change
	  from 7 Sep 2004 on request from Alex.
	* source/sound/dsp.c: Test result of first __os_cli("RMEnsure...
	  call too.
	* source/locale/iconv.c: Likewise; Added CVS/RCS keyword header.
	* source/signal/_signal.s (return_quickly/__h_cback_common): Removed
	  unnessary teq pc,pc test (partly revert from 7 Sep 2004 change).
	  Feedback from Alex.
	* source/sys/_longlong.s (_ll_ufrom_d, _ll_sfrom_d, _ll_ufrom_f,
	  _ll_sfrom_f): Added, based on a patch from Jeffrey Lee for
	  gccsdk/gcc/libgcc/lib1aof.s.
	* source/sys/debug.c (__debug): Avoid crash when __u is bogus; Print
	  the has_process value too.
	* source/sys/exec.c (execve): execve() after fork() still means that
	  there is a parent so has_parent may not be reset.  Also necessary
	  to correctly identify when dde_prefix needs to be set & used in
	  unix.c (__unixinit, _exit).
	* source/unix/unix.c (__unixinit, _exit): dde_prefix may only be updated
	  and used to reset process' CSD when the process isn't a child; Added
	  assert that has_parent is always set in a process struct found via
	  UnixLib$env; (_exit) Removed test based on has_parent/___vret because
	  we want both parent & child to exit via __exit() and not directly
	  via __vret (resumely legacy code).

Fri Sep 17 19:20:35 2004  Peter Naulls  <peter@chocky.org>

	* Docs/ReadMe: Updated documentation.
	* source/clib/fnmatch.h: Updated fmatch.h from glibc.  Needs matching
	  C support still.
	* source/clib/langinfo.h, source/clib/nl_types.h,
	  source/clib/bits/locale.h, source/clib/locale/nl_langinfo.c:
	  Very basic langinfo support.
	* source/clib/netdb.h: Hide getaddrinfo declaration.
	* source/clib/stat.h, source/unix/stat.c: Make stat/stat64
	  more like glibc to avoid problems with forward declarations.
	* source/signal/signal.c: Remove warning.  

Fri Sep 17 19:20:35 2004  John-Mark Bell <jmb202@ecs.soton.ac.uk>

	* source/clib/semaphore.h, source/pthread/sem.c,
	  source/clib/pthread.h: Semaphore support.
	* source/clib/netdb.h, source/netlib/getnameinfo.c: getnameinfo
	  support.
	* source/clib/resource.h: define values that are implemented.  

Sun Sep 12 09:20:31 2004  Peter Naulls  <peter@chocky.org>

	* source/signal/post.c: Remove warnings
	* source/sound/dsp.c: Be more careful about opening and closing
	  the DRender: filesystem.
	* source/clib/swis.h, source/clib/iconv.h, source/clib/iconv.c:
	  Interface to John-Mark Bell's iconv support module, instead
	  of requiring the large external iconv library.

Thu Sep  9 13:54:55 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/dev.h, source/unix/dev.c: Add __dsplseek
	* source/sound/dsp.c: Implement __dsplseek, rearrange for
	  NULL parameter checking.  Close and reopen device if playback
	  values are changed.
	* source/termios/tcgetattr.c: Fix getting of VMIN/VTIME
	* source/termios/tcsetattr.c: Fix setting of VMIN/VTIME
	* source/unix/ioctl.c: NULL arguments to ioctl are ok.
	* source/unix/tty.c: Implement usage of VTIME, correct setting/usage
	  of VMIN. 

Wed Sep  8 18:04:02 2004  John Tytgat  <John.Tytgat@aaug.net>

	* objs/.cvsignore: Added sound directory.
	* source/sys/_mem.s: Go back to v1.4 (i.e. before the Sep 7 2004 changes)
	  as there were, yet unidentified, problems with it.
	* source/sound/dsp.c (__dspopen): Enforce DigitalRenderer version 0.51.
	* source/sys/vfork.c: Include sys/debug.h instead of stdio.h when DEBUG
	  is defined.

Wed Sep  8 10:13:16 2004  Peter Naulls  <peter@chocky.org>

	* source/sys/_mem.s: Revert memcpy breakage (shows up on RISC OS 5)
	* source/sound/dsp.c: Improve stereo support, and add additional
	  ioctls.

Tue Sep  7 18:47:59 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/swis.h, source/clib/sys/soundcard.h,
	  source/clib/unixlib/dev.h, source/sound/dsp.h,
	  source/unix/dev.c: Experimental /dev/dsp support.

Tue Sep  7 16:03:14 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Documented UnixLib$env as private UnixLib environment
	  variable.
	* source/clib/setjmp.h: Aesthetic change.
	* source/clib/stdlib.h: Likewise.
	* source/clib/unixlib/asm_dec.s: Likewise.
	* source/clib/unixlib/local.h: Likewise.
	* source/stdio/fopen.c: Likewise.
	* source/sys/exec.c: Likewise.
	* source/clib/unistd.h: Added lseek64() prototype.
	* source/clib/sys/stat.h: Added lstat64(), fstat64() prototype.
	* source/clib/sys/un.h: Added RCS/CVS keywords.
	* source/clib/unixlib/asm_dec.s: Moved chunk and error definitions from
	  source/module/sul.s to here as SharedUnixLibrary_SWIChunk and
	  SharedUnixLibrary_ErrorChunk; Formally defined the
	  SharedUnixLib_Error_* errors; Incorrect SWI error exit code was
	  generated with objasm; TABified.
	* source/clib/unixlib/sigstate.h: Aesthetic change; declared
	  valid_address().
	* source/clib/unixlib/unix.h: Removed __env_read() declaration.
	  Adjusted comment on UnixEnv environment prefix.
	* source/common/unixify.c (__unixify): Suffix swapping could access
	  memory before start of path.
	* source/module/sul.s: Moved chunk and error definitions to
	  source/clib/unixlib/asm_dec.s.
	* source/pthread/_ints.s: Signed -> unsigned compares.
	* source/sys/_mem.s: Likewise; Space injections.
	* source/signal/_signal.s: Added comments; (__h_sigill, __h_sigsegv0,
	  __h_sigsegv1, __h_sigsys) removed useless instruction; (__h_event)
	  simplified; (__h_cback) exit sequences were not 26 bit system
	  compatible; Removed abortpc; CMP -> TEQ if only (non)equivalence test
	  is needed.
	* source/signal/post.c (valid_address): Exported.
	* source/sys/_exec.s: Space injections.
	* source/sys/_syslib.s: Introduced startup errors instead of VDU
	  writing; Ensuring SUL v1.02 instead of v1.00; Rename __cli ->
	  __uixlib_cli, __himem -> __image_rw_himem; a1 (on entry) of OS_Exit
	  must point to a filled in RISC OS error block; Define stack_corrupt_msg
	  and stack_corrupt conditionally; Calling __unixlib_fatal a 2nd time
	  results in panic calling OS_Exit; (stack_overflow_common) executing
	  signalhandler stack check *before* validity stack check otherwise you
	  get the wrong fatal error message.
	* source/sys/_vfork.s: Added comments.
	* source/sys/mman.c (__munmap_all): Updated comments.
	* source/sys/vfork.c: Minor cleanup.
	* source/unix/unix.c: Removed __unixlib_cli declaration; Be more
	  paranoid on the validity of __u as it might be an UnixLib$env value
	  picked up by another TaskWindow UnixLib based process doing fork()s.
	* source/unix/tty.c (__ttyioctl): Removed excessive break usage. 
	
Mon Sep  6 09:35:03 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/pthread.h: Fix spelling mistakes. Add comment about
	  Wimp_Poll.
	* source/unix/open.c, source/unix/stat.c: Add some optional debug.
	* source/unix/select.c: Prevent blocking by judicious use of pthread
	  control.
	* source/unix/unix.c: Prevent atexit handlers being called more
	  than once.

Mon Aug 16 22:31:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/gcccompat/_divdi3.s: Return useful remainder in a3 & a4.
	* source/gcccompat/_udivdi3.s: Likewise.
	* source/gcccompat/_moddi3.s: Updated comment.
	* source/gcccompat/_umoddi3.s: Likewise.
	* source/sys/_longlong.s: Defined _ll_udiv, _ll_urdv, _ll_sdiv and
	  _ll_srdv.

Mon Aug 16 21:10:06 2004  John Tytgat  <John.Tytgat@aaug.net>

	* gen-makefies.pl: Create source.clib.o directory for Norcroft case.
	* objs/Makefile.in: Remove useless quotes for the .c.o and .c.s rules.
	* source/clib/errno.h: TABing.
	* source/clib/signal.h: Likewise.
	* source/clib/limits.h: Defined RE_DUP_MAX as 0x7fff instead of
	  _POSIX2_RE_DUP_MAX (same definition as in regex.h).
	* source/clib/math.h: Norcroft compatibility; Added __sincos()
	  declaration.
	* source/clib/wchar.h: Definition of WCHAR_MIN/WCHAR_MAX was not
	  the same as in stdint.h.
	* source/clib/sys/param.h: Conditional define of MAXHOSTNAMELEN.
	* source/clib/sys/time.h: "#define __timeval_defined" -> "#define
	  __timeval_defined 1".
	* souce/clib/unixlib/asm_dec.s: Added advise concerning signal list
	  definition.

Sun Aug  8 12:57:59 2004  Graham Shaw  <gdshaw@sagitta.demon.co.uk>

	* source/unix/features.c: Make environment variables work
	  as advertised.

Sun Aug  8 12:28:48 2004  Peter Naulls  <peter@chocky.org>
	* source/clib/features.h: Stop pretending we have full unicode
	  support.
	* source/clib/netinet/in.h: Include sys/param.h for type visibility
	  as per glibc.
	* source/clib/stdio.h: define putc_unlocked.
	* source/common/riscosify.c: Add a case for filenames that
	  GCC 3.4 sometimes constructs.

Fri Jun 18 22:56:14 2004  Alex Waugh  <alex@alexwaugh.com>

	* unix/lseek.c, unix/fstat.c: Add trailing newline.

Fri Jun 18 19:21:03 2004  Nick Burrett  <nick@dsvr.net>

	* errno.h: Drop requirement on unixlib/features.h as there is
	nothing in this header that is C++ incompatible.

Sat Jun 12 11:56:18 2004  Peter Naulls  <peter@chocky.org>

	* source/Makefile.in: Some files require _GNU_SOURCE to be defined.

Sat Jun 12 09:36:14 2004  Peter Naulls  <peter@chocky.org>

	* source/regex.c: Fix type usage
	* source/clib/math.h, source/clib/clib/bits/mathcalls.h,
	  source/clib/bits/mathdef.h, source/clib/mathinline.h,
	  source/clib/bits/nan.h: Add glibc math headers.
	* source/clib/machine/huge_val.h, source/clib/machine/nano.h:
          Remove old math headers.
	* source/clib/netdb.h: Add missing EAI_* defines.
	* source/clib/regex.h: Updated header from glibc
	* source/clib/stdlib.h: Extra include for sys/types.h as per
	  glibc to make correct types visible.
	* source/clib/bits.in.h: Avoid upsetting C++.
	* source/clib/unixlib/features.h: Include definitions from glibc,
	  fix wording.
	* source/math/j1.c, source/math/fmod: Prevent warnings
	* source/netlib/getpeernam.c: Update function header to match
	  declaration
	* source/unix/fstat.c, source/unix/lseek.c, source/unix/lstat.c:
	  Add 64-bit variants.
	* source/clib/unixlib/unix.h, source/common/funcallerr.c,
	  source/resource/initialise.c, source/resource/setprior.c,
	  source/resource/ulimit.c, source/signal/_signal.s,
	  source/sys/_alloca.s, source/sys/_exec.s, source/sys/_syslib.s,
	  source/sys/_vfork.s, source/sys/brk.c, source/sys/debug.c,
	  source/sys/exec.c, source/sys/stackalloc.c, source/unix/unix.c:
	  Rename __base, __lomem, __himem, and other unixlib internal
	  values delcared in unix.h as per discussion GCCSDK mailing list. 

Sun Jun  6 13:22:36 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/uname.c: support for extracting RISC OS part number.

Sat Jun  5 21:49:35 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/netlib/inet_ntoa.c (inet_ntoa): sprintf() used incorrect
	  conversion specification.

Sat Jun  5 15:58:28 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/math-asm/_sincos.s (__sincos): Results got written to
	incorrect pointers.

Tue Jun  1 19:42:03 2004  Nick Burrett  <nick@dsvr.net>

	* kernel.h: Fix __THROW attribute positioning.

Mon May 31 14:40:09 2004  Alex Waugh  <alex@alexwaugh.com>

	Based on a patch from John-Mark Bell <jmb202@ecs.soton.ac.uk>
	* source/sys/_syslib.s: Limit max size of heap dynamic area according
	  to __dynamic_da_max_size or progname$HeapMax variables.
	* source/clib/unixlib/features.h (__dynamic_da_max_size): Add
	  declaration.
	* Docs/ReadMe: Document max size settings.

Tue May 18 22:43:00 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/signal/post.c: moved __ul_errbuf and __ul_fp_registers
	  declaration to errno.h; added #include errno.h; beautify output
	  of write_backtrace().
	* source/clib/errno.h: updated __ul_errbuf declaration; added
	  __ul_fp_registers declaration;  __ul_errbuf and __ul_fp_registers
	  are ony declared when __UNIXLIB_INTERNALS is defined.

Sun May 16 19:47:14 2004  Alex Waugh  <alex@alexwaugh.com>

	* signal/sigsuspend.c: Suspend only the current thread not the
	  entire process.
	* signal/sleep.c: Likewise.
	* sys/_syslib.s: Add missing IMPORTs.

Sun May 16 13:45:07 2004  James Bursa  <bursa@users.sourceforge.net>

	* signal/_signal.s: Store fp registers on a fp exception.
	* signal/post.c (post_signal): Print error buffer and fp registers.

Wed May 12 23:01:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* signal/_signal.s (__setup_signalhandler_stack): Support calling from
	  USR mode.
	* sys/_syslib.s: Call __setup_signalhandler_stack before raising a
	  signal on a stack overflow.

Mon May 10 13:52:40 2004  Peter Naulls  <peter@chocky.org>

	* clib/setjmp.h: Reinstate setjmp macro so it doesn't cause problems.
	* clib/stdlib.h: Allow strtoll/ull to be seen.  This is a work around;
	  probably the whole of the stdlib.h functionality needs to be
	  rearranged to bring it into line with glibc.

Mon May 10 11:59:58 2004  Peter Naulls  <peter@chocky.org>

	* clib/netdb.h: Disable unimplemented functions.
	* clib/setjmp.h: Remove setjmp macro - it causes problems with C++.
	* clib/stdlib.h: Remove ato* macros which cause problems with C++,
	and replace with inline fucntions from glibc headers.  Also change
	other declarations as per glibc.
	* clib/strings.h: Fix ordering of #endif at the end.
	* unistd/lockf.c: Add lockf() function.

Mon May  3 18:32:45 2004  James Bursa  <james@semichrome.net>

	* unix/dev.c: Fix for fopen() then subsequent fread() on a directory
	  returning nonsense.

Sat May 01 23:33:35 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/errno.h: Added EILSEQ.
	* source/sys/errlist.c: Likewise.

Wed Apr 21 20:42:11 2004  Alex Waugh  <alex@alexwaugh.com>

	* clib/fcntl.h: Don't define O_BINARY or O_TEXT if _POSIX_SOURCE.
	* netlib/accept.c: Remove unecessary use of O_BINARY.
	* netlib/socket.c: Likewise.

Tue Apr 20 21:57:51 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/assert.c (__assert_fail): Renamed to __assert2 & paremeter
	  order shuffling to match Norcroft SCL implementation.
	* source/clib/assert.h: Likewise.  Also using __func__ to print
	  function name.
	* source/wchar/wctype.c: Added RCS header.

Sat Apr 17 11:50:11 2004  Nick Burrett  <nick@dsvr.net>

	* sys/byteorder.h: Add __THROW attribute.
	* sys/file.h, sys/ioctl.h, sys/mman.h, sys/netdb.h: Likewise.
	* sys/poll.h, sys/resource.h, sys/select.h: Likewise.
	* sys/stat.h, sys/statfs.h, sys/syslog.h, sys/time.h: Likewise.
	* sys/timeb.h, sys/times.h, sys/uio.h: Likewise.
	* sys/utsname.h, sys/wait.h: Likewise.

Thu Apr 15 23:09:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* assert.h: __THROW should appear before any __attribute__.
	* math.h, setjmp.h, stdio.h, stdlib.h, string.h: Likewise.
	* time.h, unistd.h: Likewise.

Mon Apr 12 14:02:24 2004  Nick Burrett  <nick@dsvr.net>

	* alloca.h: Add GCC-specific small optimiser hints to function
	definitions.
	* assert.h, complex.h, ctype.h, dirent.h, fcntl.h: Likewise.
	* fenv.h, getopt.h, glob.h, grp.h, inttypes.h: Likewise.
	* kernel.h, locale.h, math.h, setjmp.h, signal.h: Likewise.
	* stdio.h, stdlib.h, string.h, time.h: Likewise.
	* pwd.h, unistd.h: Likewise.

Mon Apr 12 10:37:35 2004  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (_exit): Set DDEUtils Prefix when parent process
	exits.  Add an assertion failure if __u is NULL.
	(__unixinit): Add more explanatory comments.

Sat Apr 10 11:23:16 2004  Nick Burrett  <nick@dsvr.net>

	* stdint.h (uintptr_t): Move declaration to be not influenced
	by __intptr_t_defined.

Sat Mar 27 12:58:06 2004  Peter Naulls  <peter@chocky.org>

	* ar.h: Add Unix 'ar' format support header.

Wed Mar 24 22:22:01 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/pthread/_context.s (pthread_call_every): Check that our
	  environment handlers are in place before setting a callback.
	* source/signal/_signal.s (__h_cback): Check that the return PC is
	  within the wimpslot.
	* source/sys/_syslib.s (__upcall_handler_addr): New variable.

Wed Mar 17 20:00:14 2004  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Consisting spelling & notation.
	* Docs.ReadMe: Added "Name registration" section.
	* source/clib/sys/cdefs.h: Avoid annoying Norcroft compiler warning
	  on undefined #define symbol to be evaluated as 0.
	* source/clib/unixlib/unix.h: Changed comment on dde_prefix.
	* source/signal/sigvec.c: Static variables wrapped_handlers and
	  wrapped_masks can be (temporary ?) disabled too.
	* source/stdlib/realpath.c: Minor cleanup.
	* source/sys/exec.c: Beautify comments.
	* source/sys/vfork.c (free_process): Free process' dde_prefix.
	* source/unix/unix.c (_exit): Free process' dde_prefix. Restore
	  DDEUtils' Prefix to what it was at startup (instead of resetting
	  it what the documentation is saying).  Also don't set DDEUtils'
	  Prefix at startup with "@" because this triggers bugs in its path
	  handling on some versions of DDEUtils module.
	
Tue Mar 16 19:03:59 2004  Nick Burrett  <nick@dsvr.net>

	* unixlib/unix.h (__exec_cli): Add prototype.

Sat Mar 06 13:05:58 2004  Graham Shaw  <gdshaw@sagitta.demon.co.uk>

	* source/sys/exec.c (execve): Restore wimpslot and himem to
	  previous values before executing the command. Prevents a program
	  exec()ed from a vfork()/exec()ed child process from overwriting
	  the original parent.
	* source/sys/_exec.s (__exec_cli): New function.
	* source/sys/_syslib.s (__env_wimpslot): Separate out from
	  __env_riscos_and_wimpslot.

Sun Feb 29 16:36:30 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/clib/pthread.h: Make __pthread_start/stop_ticker
	  visible to user programs.
	* source/clib/unixlib/local.h: Clarify description for
	  __RISCOSIFY_FILETYPE_NOT_SET.

Mon Feb 23 16:04:06 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/sigstate.h, source/unix/close.c,
	  source/signal/_coredump.s, source/signal/_signal.s,
	  source/signal/post.c: Enable writing of backtraces etc to
	  stderr.  This code isn't new, but wasn't previously enabled.
	  It is also somewhat imperfect, and doesn't handle all cases
	  on RISC OS 4 and 5, esp. register dumps.  You are encouraged to
	  improve it.

Sat Feb 21 20:58:10 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/strings.h: Remove extra #ifdef

Sun Feb 15 18:45:16 2004  Peter Naulls  <peter@chocky.org>

	* source/clib/unixlib/types.h, source/clib/math.h,
	  source/clib/stdlib.h: Use __extension__ for long long types
	  to avoid warnings.
	* source/clib/strings.h, source/clib/string.h: Handle
	  includes as GLIBC does.

Mon Feb 09 21:09:02 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/stdlib/realpath.c (realpath): Preserve any ,xyz extension.

Sun Feb 08 00:19:58 2004  Alex Waugh  <alex@alexwaugh.com>

	* Docs/ReadMe: Added sections on stack/heap changes and pthreads.

Sat Feb 07 18:07:37 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/common/riscosify.c (__sfixfind): Add length parameter to ease
	  calling from rname.c
	* source/clib/unixlib/local.h: Likewise.
	* source/common/unixify.c: Likewise.
	* source/unix/dirent.c: Likewise.
	* source/unix/unlink.c: Likewise.

Sun Jan 18 16:08:06 2004  Alex Waugh  <alex@alexwaugh.com>

	* source/netlib/socketpair.c: Fix syntax error.

Thu Jan 15 00:18:59 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Setup,feb: Removed.
	* gen-makefiles.pl: UnixHdr$Dir -> Unix:
	* objs/Makefile.in: Likewise.
	* source/clib/swis.h: Added DDEUtils_ReadPrefix.
	* source/clib/netinet/tcp.h: Bitfields can only be taken from int so
	  slightly different struct tcphdr & tcp_info definition (patch from
	  Theo Markettos <theo@markettos.org.uk>).
	* source/clib/sys/socket.h: Added SOMAXCONN #define (patch from Theo
	  Markettos <theo@markettos.org.uk>).
	* source/clib/unixlib/local.h: Added __get_dde_prefix().
	* source/clib/unixlib/unix.h: Added dde_prefix to "struct proc" and
	  increased _PROCMAGIC to 0xfedcfa63.
	* source/common/funcallerr.c (__funcall_error): sizeof() usage.
	* source/common/prefix.c (__get_dde_prefix): New file.
	* source/netlib/socketpair.c: Reident.
	* source/sys/vfork.c: save DDEUtils_Prefix value during __vfork() and
	  restore it at __vexit().
	* source/unix/chdir.c (chdir): make use of __get_dde_prefix() instead of
	  __getenv_from_os("Prefix$Dir").
	* source/unix/getcwd.c (getcwd): Likewise.
	* source/unix/unix.c (__unixinit): Small src cleanup; Call only
	  DDEUtils_Prefix("@") when there isn't a DDEUtils_Prefix defined.

Wed Jan 07 20:58:37 2004  Nick Burrett  <nick@dsvr.net>

	* getopt.h: Prevent inclusion of ctype.h.

Mon Jan 05 23:50:26 2004  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added section on "UnixFS$/xxx" environment variables.
	* source/regex.c (re_comp, re_exec): Enabled for old BSD4.2 based
	  sources (like CVS).
	* source/strtoll.c(strtoll): Enabled for Norcroft compiler.
	* source/strtoull.c(strtoull): Likewise.
	* source/clib/limits.h(LONG_LONG_MIN, LONG_LONG_MAX, QUAD_MAX): Likewise.
	* source/clib/sys/syslog.h: Removed _PATH_LOG definition as it doesn't
	  get used (we log everything via the Syslog module if present).
	* source/clib/unixlib/unix.h(__getenv): Removed.
	* source/unix/getenv.c(__getenv): Likewise.  Its CACHE parameter was
	  always set to 1 so we could clean up this source a bit.
	* source/scl/_koscli.s: v6 doesn't need to be preserved.
	* source/unix/unix.c(_exit): Only resetting DDEUtils_Prefix when current
	  process doesn't have a parent.

Sat Jan 03 00:11:39 2004  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/termios.h: Redefined the B* baud values so that they fit
	  into a char (= variable type of sg_ispeed and sg_ospeed in struct
	  sgttyb).  Renamed __ispeed and __ospeed into c_ispeed and c_ospeed.
	* source/clib/unixlib/unix.h: Removed useless __bsd_speeds.
	* source/termios/cfgetispee.c(cfgetispeed): Added argument checking
	  and renamed __ispeed and __ospeed into c_ispeed and c_ospeed.
	* source/termios/cfgetospee.c(cfgetospeed): Likewise.
	* source/termios/cfsetispee.c(cfsetispeed): Likewise.
	* source/termios/cfsetospee.c(cfsetospeed): Likewise.
	* source/termios/tcgetattr.c(tcgetattr): __bsd_speeds is no longer
	  needed.
	* source/termios/tcsetattr.c(tcsetattr): Likewise.
	* source/unix/tty.c: Removed convert_baud_rate().  Renamed __ispeed and
	  __ospeed into c_ispeed and c_ospeed.  sg_ospeed gets now updated
	  in __ttyioctl(TIOCGETP) which makes password typing in getpass()
	  invisible.
	* source/unix/unix.c(__unixinit): Got rid of compiler warnings.

Tue Dec 30 12:02:35 2003  Peter Naulls  <peter@chocky.org>

	* source/wchar/wcstoul.c: Removed file containing duplicate
	  function.

Mon Dec 29 18:59:40 2003  Peter Naulls  <peter@chocky.org>

	* source/alloc.c, source/memchr.c, source/qsort.c, source/clib/math.h,
	  source/common/objattr.c, source/common/serial.c, source/common/stat.c,
	  source/locale/setlocale.c, source/math/j0.c, source/math/jn.c,
	  source/netlib/inet_ntoa.c, source/netlib/shutdown.c,
	  source/netlib/socketpair.c: Remove warnings

Mon Dec 29 17:51:43 2003  Peter Naulls  <peter@chocky.org>

	* source/math/modf.c, source/math/modff.c, source/netlib/ntop.c,
	  source/netlib/pton.c, source/wchar/wcstoq.c, source/wchar/wcstouq.c:
	  Remove files containing duplicate functions.

Mon Dec 29 16:34:25 2003  Peter Naulls  <peter@chocky.org>

	* source/sys/_vfork.s: Alias fork to vfork as a symbol
	* source/clib/sys/dirent.h: sys/dirent.h doesn't exist in glibc; only
	  dirent.h.
	* source/clib/dirent.h: Define MAXNAMLEN
	* source/clib/sys/un.h: Add, even though it isn't supported, it is
	  required to keep some programs happy.
	* source/pwd/pwdread.c: Improve behaviour of setting of pwd structure,
	  including determining username under Select.

Mon Dec 22 21:29:50 2003  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Documented the new uid feature.
	* source/clib/unixlib/unix.h (__unixlib_fatal): Documented the NULL
	  parameter behaviour.
	* source/sys/_syslib.s (__unixlib_fatal): Calling with NULL parameter
	  works again.
	* source/unix/features.c (features): Added uid feature (was formally
	  known as Unix$uid).
	* source/unix/unix.c (__unixinit): More informative __unixlib_fatal()
	  error messages; moved Unix$uid support to features.c; removed Unix$tty
	  support (use command line redirection).

Sun Dec 21 12:21:56 2003  Stefan Bellon  <sbellon@sbellon.de>

	* crypt/crypt_util.c (setkey_r): Add cast to fix Norcroft compilation.

Mon Dec 15 16:52:40 2003  Peter Naulls  <peter@chocky.org>

	* common/riscosify.c: leaf_len becomes negative in some odd
	  cases generated by 'make'.  Don't Try to copy leaf then.

Thu Dec 4 22:25:16 2003  David Marston  <david@illudium.org.uk>

	* sys/_jmp.s: Add comment.
	* sys/_vfork.s: Correct pid offset in jmp_buf.
	* sys/vfork.c: Likewise.

Sun Nov 23 22:05:07 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/asm_dec.s: Added
	  XFilter_(De)Register{Pre|Post}Filter SWI numbers.
	* source/clib/unixlib/unix.h: Renamed __wimpprogram to __taskhandle.
	* source/pthread/_context.s: Used NAME macro; pthread routines now
	  work for Wimp/TaskWindow applications too.
	* source/pthread/_exit.s: Used NAME macro.
	* source/pthread/_ints.s: Likewise.
	* source/pthread/_yield.s: Likewise.
	* source/pthread/cond.c: Added #include <stdio.h> when PTHREAD_DEBUG
	  is #define'd.
	* source/sys/_syslib.s: Instead of setting __wimpprogram to 1 when
	  we're multitasking, we fill the non zero taskhandle value in
	  __taskhandle.
	* source/signal/sleep.c: Renamed __wimpprogram to __taskhandle.
	* source/time/getitmr.c: Likewise.
	* source/time/setitmr.c: Likewise.
	* source/unix/tty.c: Likewise.
	* source/unix/unix.c: Likewise.
	* source/unix/fcntl.c: Fixed typo : "!=" -> "|=" !

Sat Nov 22 00:47:33 2003  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: SharedULib has to come into !System.310.Modules, not
	  !System.Modules.  Advised to use the !System merger instead of
	  manually copying.

Fri Nov 21 21:25:47 2003  Peter Naulls  <peter@chocky.org>

	* clib/wctype.h, wchar/wctype.h: Added wctype functions.

Fri Nov 21 14:26:31 2003  Peter Naulls  <peter@chocky.org>

	* clib/time.h: Rename parameters inline with glibc, and to
	  avoid warnings
	* clib/sys/cdefs.h: Additional declarations inline with glibc
	* clib/unixlib/features.h: Remove declarations repeated in
	  cdefs.h
	* clib/unistd.h: Bring somewhat inline with glibc, and avoid
	  warnings with brk/sbrk declarations.
	* sys/brk.c: Change sbrk defintion to match above

Wed Nov 19 00:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/net/if.h: Commented out declaration of the if_*()
	  routines (we don't have them implemented).
	* Boot,fe1: Removed last new-line character.
	* Run,fe1: Likewise.
	* Setup,fe1: Likewise.
	* !Help: Cleaned up "Installation" section a bit; Provided the
	  "Distributing of UnixLib based programs" section.
	* CallASWI.CallASWI,ffa: Removed (see !Help for info on obtaining the
	  latest version).
	* CallASWI.ReadMe: Likewise.

Sat Nov 01 21:40:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/unix.c (_exit): Previous fix didn't properly unset
	  DDEUtils_Prefix.

Thu Oct 30 22:58:57 2003  Alex Waugh  <alex@alexwaugh.com>

	* unix/getcwd.c (getcwd): Canonicalise result before unixifying it.
	  Remove obscure methods for finding the cwd.

Sun Oct 26 14:15:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Added rule to build SharedULib.  Also default
	  "All" rule will copy UnixLib into <UnixHdr$Dir>.UnixLib.
	* objs/.cvsignore: Added SharedULib,ffa.
	* source/clib/bits/netdb.h: Changed type of 'request' param fo ioctl
	  call from 'int' to 'unsigned long'.
	* source/clib/sys/netdb.h: Likewise.
	* source/clib/unixlib/dev.h: Likewise.
	* source/unix/dev.c: Likewise.
	* source/unix/ioctl.c: Likewise.
	* source/unix/tty.c: Likewise.  Avoided Norcroft compiler warning
	  too.
	* source/clib/sys/ioctl.h: Sync'ed with information in RISCOS Ltd.'s
	  StubsG ioctl.h file.  Added further compatibility with
	  COMPAT_INET4.
	* source/unix/unix.c: Setup DDEUtils_Prefix with "@" so that chdir()
	  calls don't change RISC OS' CSD.  When DDEUtils module is not
	  loaded, RISC OS' CSD will change.  Suggestion by Stefan Bellon.

Tue Oct 21 20:26:20 2003  David Marston  <david@illudium.org.uk>

	* module/sul.s: Fix 32-bit behaviour

Sun Oct 12 22:16:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/dev.c (__getdevtype): Introduced rofs2dev mapping table
	  which maps RISC OS FS to Unix devices where it makes sense.  Solves
	  null: as stdin redirection problem reported by Stefan Bellon.

Mon Oct 06 20:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* Docs/ReadMe: Added some more info on UnixEnv$<program name>$sfix.
	* unixlib/local.h: Allocated __RISCOSIFY_STRICT_UNIX_SPECS
	  __riscosify_control bit to disable the RISC OS filename check in
	  __riscosify[_std]().
	* source/common/objattr.c (__object_get_attrs): incorrect dealing with
	  filetype derived from Unix filename.
	* source/common/riscosify.c (guess_or_null): Support for
	  __RISCOSIFY_STRICT_UNIX_SPECS.
	* source/unix/chdir.c (chdir): Disable suffix swapping for directories.
	* source/unix/dev.c (__fsstat): Likewise.
	* source/unix/dirent.c (opendir): Likewise.
	* source/unix/mkdir.c (mkdir): Likewise.
	* source/unix/rmdir.c (rmdir): Likewise.

Tue Sep 30 18:38:25 2003  Alex Waugh <alex@alexwaugh.com>

	* alloc.c: Use __riscos rather than __riscos__ to keep Norcroft happy.

Tue Sep 18 23:40:00 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile.in: Added comment on Norcroft's "shrinkwrap bug".

Tue Aug 19 00:34:27 2003  John Tytgat  <John.Tytgat@aaug.net>

	* .cvsignore: MKDir,feb removed.  We don't generate this anymore.
	* gen-makefiles.pl: No longer generating MKDir,feb but include a .INIT
	  section in the objs\Makefile,fe1 file; Also adding a "This file is
	  automatically generated by gen-makefiles.pl" comment line.
	* Docs/ReadMe: Added info on RISCOS Ltd.'s UnixLib, sfix feature,
	  __dynamic_no_da & __dynamic_da_name WEAK symbols.
	* objs/Makefile.in: Added .INIT section.  The rest will be added by
	  gen-makefiles.pl.
	* clib/unixlib/features.h: Added definition for __dynamic_no_da and
	  __dynamic_da_name WEAK symbols.
	* common/_exist.s (__set_feature_imagefs_is_file): This commented out
	  routine contained a copy/paste error.
	* common/stat.c: Removed compiler warning.
	* common/unixify.c: Take only MimeMap into account when
	  __RISCOSIFY_FILETYPE_NOT_SET is not set.
	* unix/dirent.c: Don't generate ,xyz filetype extention when MimeMap
	  has to be taken into account (i.e. when __RISCOSIFY_FILETYPE_NOT_SET
	  is not set).
	* unix/features.c: Made __sfix_default non writable; get_program_name()
	  no longer corrupts fname_buf for very long program names.
	* common/riscosifyc.c: Removed.  It shouldn't be necessary.
	
Fri Aug 15 16:13:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* clib/unixlib/features.h: _feature_imagefs_is_file is now a WEAK
	symbol. Added routines __get_feature_imagefs_is_file() and
	__set_feature_imagefs_is_file() for internal purposes. Default value
	is 0. Patch from Stefan Bellon.
	* common/_exist.s: Likewise.
	* unix/dev.c: Likewise.
	* unix/features.c: Likewise.
	* unix/unlink.c: Likewise.
	* Docs/ReadMe: Added info on the WEAK'ly defined symbols.

Sun Aug 03 18:14:27 2003  John Tytgat  <John.Tytgat@aaug.net>

  	* common/unixify.c (__unixify): filetype extension code will first look
  	if the filetype can't be derived from the filename extension
	& MimeMap.  If so, then there won't be a filetype extension added to
	the filename.  Also, __unixify wrongly returned the end of the buffer
	(instead of the start) when the filetype extension code got activated.
  	* unix/unix.c: Disabled debug
  	* wchar/btowc.c: ANSI prototyping.
  	* wchar/mbrlen.c: Likewise.
  	* wchar/mbsinit.c: Likewise.
  	* wchar/wcsdup.c: Likewise.
  	* wchar/wctob.c: Likewise.
  	* wchar/wmemcpy.c: Likewise.
  	* wchar/wmemmove.c: Likewise.

Thu Jul 31 20:55:32 2003  Alex Waugh <alex@alexwaugh.com>

	* common/_riscosify.s: Fix typo.

Wed Jul 30 00:03:42 2003  Nick Burrett  <nick@dsvr.net>

	* stdarg.h: Force GCC to use its own internal header.
	(__gnuc_va_list): Define for all other target types.

	* varargs.h: Header is now obsolete.  Add #error lines; remove
	all other code.

	* stdio.h (fopen, freopen, fputs): Add __restrict pointer qualifier.
	(vsprintf, vfprintf, vprintf): Likewise.  Use __gnuc_va_list.
	(sprintf, fprintf, printf, sscanf, fscanf, scanf): Likewise.
	(vsnprintf): Likewise.  Add GCC __format__ attributes.
	(snprintf, vscanf, vfscanf, vsscanf): Likewise.

	* sys/syslog.h (syslog): Add GCC __format__ attribute.
	(vsyslog): Likewise.  Use __gnuc_va_list.

	* assert.c (__assert_fail): Fix compiler warning.

	* alloca.h: Get only the definition of size_t.
	* complex.h (_Complex_I): Add __extension__.

	* dirent.h: Add __restrict pointer qualifier to functions.
	* glob.h: Likewise.
	* grp.h: Likewise.
	* inttypes.h: Likewise.
	* pthread.h: Likewise.
	* pwd.h: Likewise.
	* regex.h: Likewise.
	* signal.h: Likewise.
	* stdio.h: Likewise.
	* stdlib.h: Likewise.
	* string.h: Likewise.
	* time.h: Likewise.
	* unistd.h: Likewise.

Mon Jun 23 21:10:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* MKDir,fe1: Removed objs.clib & objs.clib.o directory creation.
	* objs/Makefile.in: APCS-R builds are no longer supported.
	* source/clib/getopt.h: Full prototyping for getopt(), we don't have
	  other definitions in other libraries.
	* source/clib/setjmp.h: Added __executing_signalhandler and
	  __pthread_worksemaphore to jmp_buf; Added
	  saved_currently_handling to sigjmp_buf.
	* source/clib/unixlib/asm_dec.s: APCS-R builds are no longer supported;
	  __get_errno macros doesn't need an assert on its registers.
	* source/clib/unixlib/unix.h: Removed comment on __fpflag usage in
	  setjmp() and longjmp() (as we're minimally need FPE 4.00 now).
	* source/pthread/_context.s: APCS-R builds are no longer supported.
	* source/pthread/_yield.s: Likewise.
	* source/signal/_coredump.s: Likewise.
	* source/signal/sigexec.s: Likewise.
	* source/signal/_signal.s: Removed unnecessary IMPORT |_exit|.
	* source/sys/_jmp.s: Added __executing_signalhandler and
	  __pthread_worksemaphore to jmp_buf struct.
	* source/sys/_syslib.s: APCS-R builds are no longer supported; Moved
	  __unixlib_fatal from unix.c to here and use __signalhandler_xx
	  as stack parameters as you might not have a valid one.
	* source/sys/sigsetjmp.c: Support for saved_currently_handling in
	  sigjmp_buf.
	* source/unix/unix.c(__unixlib_fatal): Moved to _syslib.s and added
	  explicit stack setup.

Mon Jun 23 10:31:08 2003  Peter Naulls  <peter@chocky.org>

	* source/unix/fcntl.c: Patches missed from 2.95 trunk.
	  Fix use of O_EXECCL flag, and add F_SETOWN stub.

Fri Jun 20 00:50:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/errno.h (__ul_errbuf): Not a char* but a struct
	  definition.
	* source/signal/_signal.s (_kernel_last_oserror): Small optimisation.
	* source/signal/post.c: Removed the non used extern definitions.
	* source/sys/_jmp.s: Added some comments.
	* source/sys/_os.s (__os_prdec): Stack ptr needs to be decreased
	  during the complete routine call.
	* source/sys/errlist.c: Using struct __ul_errbuf member.

Tue Jun 17 20:45:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/local.h: Removed obsolete __RISCOSIFY_DROP_VOWEL.

Tue Jun 17 00:09:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/unixlib/local.h: Removed obsolete uname().  Use
	  riscosify[_std]() instead.  Removed obsolete *_TRUNCATE bits in
	  __riscosify_control.  Changed __RISCOSIFY_FILETYPE_SET into
	  __RISCOSIFY_FILETYPE_NOT_SET so that the current default value
	  __riscosify_control becomes 0 again.  Hide __get_riscosify_control()
	  behind __UNIXLIB_INTERNALS.  Defined __set_riscosify_control().
	* source/common/_riscosify.s: Defined __set_riscosify_control().
	* source/common/objattr.c: Changed __RISCOSIFY_FILETYPE_SET into
	  __RISCOSIFY_FILETYPE_NOT_SET.
	* source/common/riscosify.c: Likewise.
	* source/common/uname.c: Removed.
	* source/common/riscosifyc.c: Added comment that __riscosify_control
	  is a weak symbol.
	* source/common/serial.c: Changed comment about obsoleted __uname().
	* source/stdio/rename.c: Likewise.
	* source/unix/features.c: Removed initialisation of __riscosify_control
	  as the default value is again 0 in which is initialised in
	  source/common/riscosifyc.c.  Make use of __set_riscosify_control()
	  when the "nonametrans" feature is defined.

Mon Jun 16 22:00:01 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/signal.h: Changed SISERR into SISOSERROR in order to
	  be compatible with SharedCLibrary.
	* source/clib/unixlib/asm_dec.s: Likewise.
	* source/signal/_signal.s: Likewise.
	* source/signal/signame.c: Likewise.
	* source/sys/exec.c: Likewise.

Sat Jun  7 09:31:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_alloca.s: Fix non 32bit code.

Sat Jun  7 04:20:04 2003  John Tytgat  <John.Tytgat@aaug.net>

	* .cvsignore: Added MKDir,feb
	* gen-makefiles.pl: Removed cdir of objs.clib.o
	* objs/.cvsignore: Added Makefile,fe1
	* source/clib/string.h: Renamed __strnlen() into strnlen()
	* source/clib/time.h: Renamed localtime_p() into localtime_r()
	* source/clib/sys/cdef.h: Added #undef __ptr_t
	* source/clib/sys/features.h: Likewise.
	* source/common/objattr.c: Removed unused variables.
	* source/common/riscosify.c: Likewise.
	* source/signal/post.c: Likewise.
	* source/unix/chmod.c: Likewise.
	* source/unix/fstat.c: Likewise.
	* source/signal/sigvec.c: wrapper_handle() and convert_mask() are not
	  used.
	* source/sys/errlist.c: Cast away return param __set_errno().

Sun Jun  1 21:46:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/unistd.h (fchdir): Add decl.
	* unistd/fchdir.c: New file.
	* unix/fchown.c: Remove file, it duplicates unistd/fchown.c

Sun Jun  1 18:20:15 2003  Alex Waugh  <alex@alexwaugh.com>

	* module/sul.s: Fix non 32bit SWI returns.

Mon May 26 19:47:04 2003  Peter Naulls  <peter@chocky.org>
	* clib/wchar.h: __mbrtowc and __mbrlen don't exist - avoid
	  inline mbrlen.

Mon May 26 18:26:03 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread/create.c (__pthread_create): Initialise the saved SPSR.
	* pthread/init.c (mainthread): Fix linkage.
	* pthread/testcancel.c (pthread_testcancel): Don't cancel if
	  context switching is disabled.

Sun May 25 22:44:12 2003  Alex Waugh  <alex@alexwaugh.com>

	* MKDir,feb: Remove file, now autogenerated.
	* Makefile: Remove file, now autogenerated.
	* Makefile.in: Template for Makefile.
	* gen-makefiles.pl: Script to generate Makefiles.
	* Docs/ReadMe: Add section on stub functions.
	* Docs/stub: Remove file.
	* objs/Makefile,fe1: Remove file, now autogenerated.
	* objs/Makefile.in: Template for Makefile.
	* source/Makefile: Remove file, now autogenerated.
	* source/Makefile.in: Template for Makefile.
	* source/netlib/socketpair.c: Add #includes and casts for Norcroft.
	* source/regex.c: Likewise.
	* source/signal/sigvec.c: Comment out bits that don't compile.
	* source/unix/link.c: Remove file. Duplicates functions in unistd/*link.c
	* source/wchar/wcstod.c: Add dummy function so it compiles.
	* source/wchar/wcstof.c: Likewise.
	* source/wchar/wcstol.c: Likewise.
	* source/wchar/wcstold.c: Likewise.

Sun May 18 18:04:16 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add lrintf.c and llrintf.c
	* source/Makefile: Likewise.
	* source/clib/math.h: Add decls.
	* source/math/llrintf.c: New file from glibc 2.3.1
	* source/math/lrintf.c: Likewise.

Wed May 14 00:01:05 2003  John Tytgat  <John.Tytgat@aaug.net>

	* netlib/_accept.s, netlib/_getpeerna.s, netlib/_getsockna.s,
	  netlib/_recvfrom.s, netlib/_recvmsg.s, netlib/_sendmsg.s:
	  Readded COMPAT_INET4 macros undoing Peter's change at 21 Apr 2003.
	* netlib/_net_error.s: typo spoiled the error numbers returned from the
	  Internet SWI calls.
	* unix/dev.c: Remove unused variables.  Added #include <ctype.h>.
	* unix/mkdir.c: Remove unused variable.
	* unix/rmdir.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Wrote corrupted RISC OS filetype.
	* !Help: Updated.
	* Docs/ReadMe: Added "Compile-time features" section.

Tue May 13 22:46:38 2003  Alex Waugh  <alex@alexwaugh.com>

	* math-asm/_acosf.s: Keep sp valid at all times.
	* math-asm/_asinf.s: Likewise.
	* math-asm/_atanf.s: Likewise.
	* math-asm/_ceilf.s: Likewise.
	* math-asm/_cosf.s: Likewise.
	* math-asm/_coshf.s: Likewise.
	* math-asm/_expf.s: Likewise.
	* math-asm/_floorf.s: Likewise.
	* math-asm/_ldexpf.s: Likewise.
	* math-asm/_log10f.s: Likewise.
	* math-asm/_logf.s: Likewise.
	* math-asm/_modf1f.s: Likewise.
	* math-asm/_sinf.s: Likewise.
	* math-asm/_sinhf.s: Likewise.
	* math-asm/_tanf.s: Likewise.
	* math-asm/_tanhf.s: Likewise.

Tue May 13 21:51:36 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add getopt1.c
	* source/Makefile: Likewise.
	* source/clib/unixlib/features.h: Define __GNU_LIBRARY__
	* source/clib/getopt.h: Replace with file from glibc 2.3.1
	* source/unix/getopt.c: Likewise.
	* source/unix/getopt1.c: New file from glibc 2.3.1

Sun May 11 22:01:15 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_os.s (__os_file, __os_fread, __os_fwrite, __os_args): Store a1
	  before clearing it.

Sun May 11 19:13:12 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Specifying minimum Norcroft C version 5.53.
	* clib/unixlib/features.h: Avoid double #define's when project header
	  files #define things like __attribute__ & friends themselves.
	* source/signal/_signal.s: Removed "IMPORT __pthread_callback_pending"
	  (didn't exist).
	* source/sys/_syslib.s: Removed "IMPORT __h_upcall" (didn't exist).

Sun May 11 13:28:12 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/chdir.c (chdir): chdir(".") did not work when Prefix$Dir
	  was defined.
	* objs/.cvsignore: Added.  Lets CVS ignore all derived objects when
	  using the Norcroft compiler.
	* source/clib/.cvsignore: Added.  Lets CVS ignore the created UnixLib
	  library object file.

Wed May  7 23:07:05 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/pthread.h (__pthread_key): Add a union for value, to avoid
	  const issues.
	* pthread/key.c: Use union to prevent const warning.
	* pthread/keydest.c: Likewise.
	* pthread/_ints.s: Preserve PSR bits of PC based on processor mode,
	  not APCS variant.
	* sys/_alloca.s: Likewise.
	* sys/_syslib.s: Likewise.

Tue May  6 23:29:21 2003  Alex Waugh  <alex@alexwaugh.com>

	* riscos-dist/Makefile: Remove !MKDir from binary !unixlib,
	  add !Setup to source !unixlib.
	* unixlib/objs/Makefile,fe1: Add missing files.
	* unixlib/source/Makefile: Add ffs files.
	* clib/string.h: Enable ffs decls.
	* clib/strings.h: Likewise.
	* string/ffs.c: New file implementing ffs().
	* string/ffsll.c: New file implementing ffsll().

Sat May  3 12:20:14 2003  Alex Waugh  <alex@alexwaugh.com>

	* signal/_signal.s: Move IMPORTs earlier in file for objasm.
	* resolv/res_hconf.c: Remove unneeded ;

Tue Apr 29 22:14:12 2003  Alex Waugh  <alex@alexwaugh.com>

	* unixlib/features.h: Don't pollute the userland namespace
	  with internal_function or weak_function.
	* sys/cdefs.h: Likewise.

Tue Apr 29 20:37:46 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s: Require FPEmulator 4.00 or higher
	* sys/_jmp.s: Remove STFE/LDFE code as SFM/LFM is available for
	  FPE >= 4.00
	* pthread/_context.s: Likewise.

Mon Apr 28 23:42:26 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_os.s: Don't rely on flags being preserved across SWI calls.
	* sys/_syslib.s: Likewise.

Mon Apr 28 22:03:02 2003  Alex Waugh  <alex@alexwaugh.com>

	* Makefile: Remove fcrypt.c
	* fcrypt.c: Remove file, it has been replaced by crypt/*
	* opensock.c: Enable locking code for thread safety.
	* regex.c: Add standard UnixLib header.
	* system.c: Add cancellation point.
	* clib/bits/libc-lock.h: New file to map __libc_lock calls onto
	  pthread mutexes.
	* crypt/crypt_util.c: Enable locking code for thread safety.
	* netlib/accept.c: Thread safety patches.
	* netlib/bind.c: Likewise.
	* netlib/connect.c: Likewise.
	* netlib/getpeernam.c: Likewise.
	* netlib/getsocknam.c: Likewise.
	* netlib/getsockopt.c: Likewise.
	* netlib/listen.c: Likewise.
	* netlib/net.c: Likewise.
	* netlib/proto.c: Likewise.
	* netlib/recv.c: Likewise.
	* netlib/recvfrom.c: Likewise.
	* netlib/recvmsg.c: Likewise.
	* netlib/send.c: Likewise.
	* netlib/sendmsg.c: Likewise.
	* netlib/sendto.c: Likewise.
	* netlib/serv.c: Likewise.
	* netlib/setsockopt.c: Likewise.
	* netlib/shutdown.c: Likewise.
	* netlib/socket.c: Likewise.
	* netlib/socketpair.c: Add standard UnixLib header.
	* resolv/res_hconf.c: Enable locking code for thread safety.
	* signal/_signal.s: Thread safety patches.
	* signal/kill.c: Likewise.
	* signal/pause.c: Likewise.
	* signal/post.c: Likewise.
	* signal/sigaction.c: Likewise.
	* signal/sigaltstk.c: Likewise.
	* signal/sigpause.c: Likewise.
	* signal/sigpending.c: Likewise.
	* signal/sigprocmsk.c: Likewise.
	* signal/sigstack.c: Likewise.
	* signal/sigsuspend.c: Likewise.
	* signal/sigvec.c: Likewise.
	* signal/sleep.c: Likewise.
	* sys/brk.c: Likewise.
	* sys/debug.c: Likewise.
	* sys/execvp.c: Likewise.
	* sys/mman.c: Likewise.
	* sys/sigsetjmp.c: Likewise.
	* unix/waitpid.c: Likewise.

Mon Apr 28 13:05:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/pthread.h (__pthread_context_stack_sp,
	  __pthread_context_stack_sl): Remove.
	* clib/unixlib/asm_dec.s: Add CHGMODE macro to simplify changing
	  processor modes.
	* pthread/_ints.s (__pthread_unprotect_unsafe): Preserve a2, don't
	  yield if we are in the middle of a context switch.
	* pthread/_yield.s (pthread_yield): Improve reliability by calling
	  the context switcher directly rather than setting a callback.
	* pthread/cond.c: Formatting.
	* pthread/init.c (__pthread_init): Don't setup a stack for context
	  switcher (now uses signal handler stack).
	* pthread/lock.c: Fix typos.
	* pthread/once.c: Fix typo.
	* pthread/testcancel.c: Fix line endings in debug code.
	* signal/_signal.s, pthread/_context.s: Use a dedicated stack
	  for all signal handlers and pthread context switcher.
	  Make pthreads more tolerant of extra or missing callbacks.
	  Restore CPSR on exit from a callback.
	* sys/_syslib.s: Initialise signal handler stack.

Sun Apr 27 13:31:44 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/unix/chdir.c: Code failed when chdir() was done for a
	  subdirectory in the CSD.

Sat Apr 26 11:36:00 2003  Peter Naulls  <peter@chocky.org>
	* source/signal/signal.c, source/signal/post.c:
	  Add _GNU_SOURCE define, to allow use of sighandler_t.
	* source/strtod.c: Add an explicit atof function (as well
	  as the existing #define)

Fri Apr 25 15:14:29 2003  Peter Naulls  <peter@chocky.org>
	* clib/sys/cdefs.h: Added, from a patch by John T.  Didn't create
	  the needless misc directory in use with that, however.
	* clib/stddef.h: Add _WCHAR_T and _WINT_T defines as per glibc.
	* clib/signal.h: Add __USE_GNU wrapper to sighandler_t typedef.

Fri Apr 25 00:32:18 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Forgot to specify APCS 3/32bit for assembler.
	* source/netlib/timeofday.c: Removed (duplicate of
	  source/time/gettod.c)
	* source/Makefile: Added fcrypt.c, strtoimax.c, strtoumax.c to OBJS.
	* source/time/gettod.c: Increased time results from sec to centi secs.
	* source/clib/stdlib.h (strtoll, strtoull): enable it for Norcroft
	  builds.
	* source/resolv/gethnamaddr.c(gethostbyname2): timeout in the resolver
	  requests will result in hosts file lookup.

Tue Apr 22 11:57:14 2003  Peter Naulls  <peter@chocky.org>
	* clib/stddef.h: Remove ptr_t.  Not defined in glibc, and
	  sometimes clashes in programs.
	* clib/unixlib/local.h: Fix typo.  Move stddef.h include -
	  size_t required by non UnixLib internal functions.

Mon Apr 21 16:48:12 2003  Peter Naulls  <peter@chocky.org>
	* source/Makefile: Added _longlong.s to SYS_ASM.
	* objs/Makefile,fe1: Add missing setsid, and _longlong.
	* source/sys/_longlong.s: Added (long long Norcroft helper routines,
	  from John Tytgat's addition)
	* source/unistd/getpass.c: define _GNU_SOURCE for getline().

Mon Apr 21 14:18:04 2003  Peter Naulls  <peter@chocky.org>
	* clib/unistd.h, resource/setsid.c: Dummy setsid implementation.
	* Makefile: prevent library being created 3 times.

Mon Apr 21 08:40:33 2003  Peter Naulls  <peter@chocky.org>
	* objs/Makefile,fe1: Change APCS flags to 32-bit
	* clib/unixlib/asm_dec.s: Extra definitions for 32-bit,
	  make networking macros 32-bit.
	* netlib/_accept.s, netlib/_getpeerna.s, netlib/_getsockna.s,
	  netlib/_recvfrom.s, netlib/_recvmsg.s, netlib/_sendmsg.s:
          Remove unused macro silliness
	* netlib/_net_error.s: 32-bit
	* netlib/serv.c: Fix typo
	* signal/_coredump.s, signal/_signal.s, signal/post.c:
	  32-bit, move much of the handling into C for ease of maintainence.
	* sys/_swi.s, sys/_syslib: 32-bit

Sat Apr 13 17:20:43 2003  Alex Waugh  <alex@alexwaugh.com>

	* clib/stdio.h: Thread safety patches.
	* stdio/clearerr.c: Likewise.
	* stdio/fclose.c: Likewise.
	* stdio/feof.c: Likewise.
	* stdio/ferror.c: Likewise.
	* stdio/fflush.c: Likewise.
	* stdio/fgets.c: Likewise.
	* stdio/filbuf.c: Likewise.
	* stdio/fileno.c: Likewise.
	* stdio/flsbuf.c: Likewise.
	* stdio/fopen.c: Likewise.
	* stdio/fpos.c: Likewise.
	* stdio/fputs.c: Likewise.
	* stdio/fread.c: Likewise.
	* stdio/freopen.c: Likewise.
	* stdio/fwrite.c: Likewise.
	* stdio/getc.c: Likewise.
	* stdio/getdelim.c: Likewise.
	* stdio/gets.c: Likewise.
	* stdio/getw.c: Likewise.
	* stdio/newstream.c: Likewise.
	* stdio/popen.c: Likewise.
	* stdio/printf.c: Likewise.
	* stdio/putc.c: Likewise.
	* stdio/puts.c: Likewise.
	* stdio/putw.c: Likewise.
	* stdio/rename.c: Likewise.
	* stdio/scanf.c: Likewise.
	* stdio/setbuf.c: Likewise.
	* stdio/tmpfile.c: Likewise.
	* stdio/ungetc.c: Likewise.
	* unistd/fchown.c: Likewise.

Sat Apr 12 12:32:53 2003  Alex Waugh  <alex@alexwaugh.com>

	* objs/Makefile,fe1: Add new file
	* Makefile: Likewise.
	* clib/sys/stat.h (__stat): Alter decl.
	* clib/unixlib/local.h (__object_get_attrs, __object_set_attrs):
	  Add decl.
	* clib/unixlib/swiparams.h: Add more OS_File parameters.
	* common/stat.c (__stat): Take named arguments rather than a
	  register list.
	* unix/chdir.c (chdir): Remove common code.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsstat): Likewise.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/rmdir.c (rmdir): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* common/objattr.c: New file containing common code for the above
	  files. Fix bug that could cause stat to return ENOENT for a file
	  where the filetype didn't match the extension mimetype lookup.

Mon Apr  7 21:09:46 2003  Alex Waugh  <alex@alexwaugh.com>

	* Makefile: Add -pedantic to assembly rule.
	* common/_riscosify.s: Add missing END directive.

Sun Apr  6 22:48:08 2003  John Tytgat  <John.Tytgat@aaug.net>

	* unix/dirent.c: Norcroft C breaks on an int64 switch argument
	  since __off_t has been changed to 64 bits.  Void'ing or using
	  the return parameter of __set_errno() to reduce warnings.
	* !MKDir: Removed, an up-to-date copy is MKDir.

Sun Apr  6 15:03:26 2003  Peter Naulls  <peter@chocky.org>

	* source/netlib/socketpair.c: socketpair() implementation
	* source/clib/regex.h, source/regex.c: regex implementation
	* source/Makefile: Add new files
	* source/clib/stdio.h: Add fseeko/ftello, wrap GNU only
	  functions up as per glibc.
	* source/stdio/fpos.c: fseeko/ftello implementation
	* source/clib/unixlib/unix.h: Add __32bit variable
	  reference (not implemented yet)
	* source/common/riscosify.c: Add hard/soft space mapping
	* source/module/sul.s: SharedUnixLibrary 1.02 update
	* source/unix/dev.c: Add ttyS0, add FIOASYNC (from 2.95.4 branch)
	* source/unix/tty.c: Check for ttyS0, and alias to rs423
	* source/clib/unixlib/types.h: Remove rouge +

Sun Apr  6 13:22:00 2003  Peter Naulls  <peter@chocky.org>

	* clib/swis.h: Include kernel.h, add new CDFS SWI.
	* clib/unixlib/types.h: LCC support, change __off_t to
	  64 bits for consistency with other types in UnixLib.
	  Minor tidying to UnixLibify.

Sun Apr  6 12:48:17 2003  Peter Naulls  <peter@chocky.org>

	* Help: Remove extra help file, and just use !Help

Sat Apr  6 11:54:16 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread.h (__pthread_running_threads): Renamed to
	  __pthread_num_running_threads.
	* pthread/context.c: Likewise.
	* pthread/create.c: Likewise.
	* pthread/exit.c: Likewise.
	* pthread/init.c: Likewise.
	* pthread/_context.s: Likewise, add missing IMPORT.

Sun Apr  6 01:00:57 2003  John Tytgat  <John.Tytgat@aaug.net>

	* source/clib/bits/netdb.h: Removed _gethostbyname() and
	  _gethostbyaddr() definition
	* source/netlib/_hostbyadd.s: Removed.
	* source/netlib/_hostbynam.s: Removed.
	* source/netlib/host.c: Removed.
	* source/Makefile: Removed _hostbyadd.o & _hostbynam.o from
	  NETLIB_ASM list.  Removed host.o from NETLIB list.
	* objs/Makefile: Likewise.
	* source/sys/_udiv10.s (_kernel_udiv10, __rt_udiv10): Made routine
	  2 instructions shorter.
	* source/sys/_sdiv10.s (_kernel_sdiv10, __rt_sdiv10): Likewise.

Sat Apr  5 13:41:35 2003  Alex Waugh  <alex@alexwaugh.com>

	* pthread.h (PTHREAD_INIT): Remove.
	* pthread/_context.s (__pthread_start_ticker): Don't start ticker if
	  there is only one thread running.
	* pthread/atfork.c (pthread_atfork): Remove unneeded initialisation.
	* pthread/cleanup.c (__pthread_cleanup_push): Likewise.
	(__pthread_cleanup_pop): Likewise.
	* pthread/cond.c (pthread_cond_timedwait): Likewise.
	* pthread/context.c (__pthread_running_threads): Change default to 1
	  running thread.
	* pthread/create.c (pthread_create): Start the ticker every time a
	  thread is created.
	* pthread/exit.c (pthread_exit): Stop the ticker if there is only one
	  thread left.
	* pthread/init.c (__pthread_init): Don't start the ticker on
	  initialisation.
	* pthread/join.c (pthread_join): Remove unneeded initialisation.
	* pthread/lock.c (__pthread_lock_lock, __pthread_lock_unlock): Likewise.
	* pthread/mutex.c (pthread_mutex_trylock, pthread_mutex_lock): Likewise.
	* pthread/rwlock.c (pthread_rwlock_rdlock, pthread_rwlock_wrlock,
	  pthread_rwlock_tryrdlock, pthread_rwlock_trywrlock): Likewise.
	* pthread/self.c (pthread_self): Likewise.

Sat Apr  5 13:14:30 2003  Alex Waugh  <alex@alexwaugh.com>

	Allow malloc or stack extention to increase the wimpslot.
	* Makefile: Compile sys/brk.c without stack checking.
	* alloc.c: Update to 2.7.2 of Doug Lea's malloc.
	* clib/unistd.h (brk, sbrk): add deprecated attribute.
	(__internal_sbrk): Add decl.
	* clib/unixlib/asm_dec.s (__4K_BOUNDARY): Remove.
	(XWimp_SlotSize): Add SWI number.
	* clib/unixlib/features.h (__4K_BOUNDARY): Remove.
	(__DA_WIMPSLOT_ALIGNMENT): Add.
	* clib/unixlib/unix.h (__real_himem): Add.
	(__stackalloc_incr_wimpslot): Add decl.
	* resource/initialise.c (__resource_initialise): Try to determine the
	  maximum possible wimpslot size.
	* sys/_exec.s (__exec_s3, __exlen): Remove __4K_BOUNDARY code.
	* sys/_syslib.s (__main): Remove __4K_BOUNDARY code, read current
	  wimpslot size on startup, move stackalloc initialisation to after
	  the environment handlers are setup, restore RISC OS environment
	  handlers on exit.
	(__env_riscos_and_wimpslot): New function.
	(__env_riscos): Don't alter wimpslot size.
	(__real_himem): Add.
	* sys/_vfork.s (return_parent): Remove debug code.
	* sys/brk.c (__internal_brk): Renamed from brk, try to increase
	  wimpslot if needed.
	(brk): Call __internal_brk
	(sbrk): Call __internal_brk
	(__internal_sbrk): New function.
	* sys/exec.c (__ushift, __dshift, execve): Cope with a non-contiguous
	  heap, remove __4K_BOUNDARY code, don't reread environment handlers.
	* sys/stackalloc.c (__stackalloc_incr_wimpslot): New function.
	(__stackalloc_incr_upwards): New function.
	(__stackalloc_incr_downwards): New function.
	(__stackalloc_incr): Remove function.
	(__stackalloc_init, __stackalloc): Allow a non-contiguous heap, and
	  wimpslot extension.
	* unix/unix.c (_exit): Don't restore RISC OS environment, now done in
	  _syslib.s instead.

Sat Apr  5 10:33:45 2003  Alex Waugh  <alex@alexwaugh.com>

	Thread safety patches
	* termios/ctermid.c: Changed.
	* termios/cuserid.c: Changed.
	* termios/tcgetattr.c: Changed.
	* time/asctime.c: Changed.
	* time/ctime.c: Changed.
	* time/setitmr.c: Changed.
	* time/stdtime.c: Changed.
	* time/tzset.c: Changed.
	* wchar/mbrlen.c: Changed.
	* wchar/mbrtowc.c: Changed.
	* wchar/wcrtomb.c: Changed.
	* unix/close.c: Changed.
	* unix/dirent.c (readdir_r): Fix return values
	(invalidate, newstream): Thready safety
	* unix/fchmod.c: Changed.
	* unix/fcntl.c: Changed.
	* unix/fstat.c: Changed.
	* unix/getcwd.c: Changed.
	* unix/getenv.c: Changed.
	* unix/gethostnam.c: Changed.
	* unix/getopt.c: Changed.
	* unix/ioctl.c: Changed.
	* unix/isatty.c: Changed.
	* unix/ispipe.c: Changed.
	* unix/lseek.c: Changed.
	* unix/open.c: Changed.
	* unix/pathconf.c: Changed.
	* unix/pipe.c: Changed.
	* unix/poll.c: Changed.
	* unix/proc.c: Changed.
	* unix/read.c: Changed.
	* unix/readv.c: Changed.
	* unix/reopen.c: Changed.
	* unix/select.c: Changed.
	* unix/setenv.c: Changed.
	* unix/stat.c: Changed.
	* unix/sync.c: Changed.
	* unix/syslog.c: Changed.
	* unix/truncate.c: Changed.
	* unix/tty.c: Changed.
	* unix/umask.c: Changed.
	* unix/unix.c: Changed.
	* unix/wait.c: Changed.
	* unix/wait4.c: Changed.
	* unix/write.c: Changed.
	* unix/writev.c: Changed.

Sat Apr  5 10:12:54 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/_syslib.s (free_stack_chunk): Preserve a2 as
	  it is used for returning 64bit results from functions

Fri Apr  4 22:51:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* asm_dec.s (__set_errno, __get_errno): Revert back to using
	  global errno

Wed Jan 29 18:51:20 2003  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile: crypt rules had a spurious column chars at the end
	  of their lines
	* unix/dev.c (_randomread): cast 'data' ptr to int is necessary
	  for Norcroft.
	* math-asm/_atan.s: atan1 should be exported, not atanl.
	* stdint.h: Added #include <unixlib/features.h> for the
	  __extension__ definition
	* objs/Makefile: crypt rules did have a spurious column chars;
	  Removed netlib.o.htonl, netlib.o.htons, netlib.o.ntohl,
	  and netlib.o.ntohs from NETLIB_ASM list; Removed
	  netlib.o.inet_addr and netlib.o.inet_aton from NETLIB list;
	  Add Resolv src code; Added pthread.o.newnode to the PTHREAD
	  list; Add pthread.o._exit to the PTHREAD_ASM list
	* MKDir: Added cdir of objs.resolv and objs.resolv.o.
	* arpa/nameser.h: typo in the NS_PUT16() macro

Wed Jan 29 18:48:24 2003  Alex Waugh  <alex@alexwaugh.com>

	* unistd.h (__unlinksuffix): Add decl.
	* common/_exist.s (__isdir_raw): Change result according to
	setting of __feature_imagefs_is_file.
	* stdio/rename.c (rename): Delete file, then attempt to delete
	suffix directory if nothing else exists within it.
	* unix/dev.c (__fsclose): Likewise.
	* unix/unlink.c (__unlinksuffix): New function.
	(unlink): Account for setting of __feature_imagefs_is_file.

Wed Jan 29 18:43:32 2003  Alex Waugh  <alex@alexwaugh.com>

	* unix/dev.c (__randomopen): Attempt to load the CryptRandom
	module if it doesn't appear to be installed already.

Tue Jan 21 18:03:28 2003  Nick Burrett  <nick@dsvr.net>

	* grp.h (__grpread): Add buf and buflen arguments to prototype.
	* pwd.h (__pwdread): Likewise.

Tue Jan 21 17:56:18 2003  Alex Waugh  <alex@alexwaugh.com>

	Thread safety patches
	* common/fdname.c: Changed.
	* common/sockvalid.c: Changed.
	* common/uname.c: Changed.
	* locale/ctypetable.c: Changed.
	* locale/localeconv.c: Changed.
	* locale/setlocale.c: Changed.
	* math/lgamma.c: Changed.
	* stdlib/_rand48.c: Changed.
	* stdlib/erand48.c: Changed.
	* stdlib/jrand48.c: Changed.
	* stdlib/lcong48.c: Changed.
	* stdlib/lrand48.c: Changed.
	* stdlib/mrand48.c: Changed.
	* stdlib/nrand48.c: Changed.
	* stdlib/rand.c: Changed.
	* stdlib/random.c: Changed.
	* stdlib/seed48.c: Changed.
	* stdlib/srand48.c: Changed.
	* pwd/fgetpwent.c: Changed.
	* pwd/fgetpwentr.c: Changed.
	* pwd/getlogin.c: Changed.
	* pwd/getpwent.c: Changed.
	* pwd/getpwnam.c: Changed.
	* pwd/getpwnam_r.c: Changed.
	* pwd/getpwuid.c: Changed.
	* pwd/getpwuid_r.c: Changed.
	* pwd/pwdread.c: Changed.
	* resource/seteuid.c: Changed.
	* resource/setgid.c: Changed.
	* resource/setpgrp.c: Changed.
	* resource/setprior.c: Changed.
	* resource/setrlimit.c: Changed.
	* resource/setuid.c: Changed.
	* grp/fgetgrent.c: Changed.
	* grp/fgetgrentr.c: Changed.
	* grp/getgrent.c: Changed.
	* grp/getgrgid.c: Changed.
	* grp/getgrgid_r.c: Changed.
	* grp/getgrnam.c: Changed.
	* grp/getgrnam_r.c: Changed.
	* grp/getgroups.c: Changed.
	* grp/grpread.c: Changed.

Tue Jan 21 17:49:27 2003  Alex Waugh  <alex@alexwaugh.com>

	Provide /dev/random and /dev/zero emulation.
	* swis.h (CryptRandom_*): Add CryptRandom module SWIs.
	* unixlib/dev.h (DEV_ZERO): Add.
	(DEV_RANDOM): Add.
	(NDEV): Bump to 7.
	(struct dev): Add stat and fstat.
	(__getdevtype): Add prototype.
	(__fsstat): Add prototype.
	(__fsfstat): Add prototype.
	(__nullstat, __nullfstat, __zeroread, __randomopen): Likewise.
	(__randomread): Likewise.
	* unix/dev.c (__dev): Support new fields in struct dev.
	(struct sfile): New.
	(__sfile): New.
	(__getdevtype): New function.
	(__fsstat): New function.
	(__fsfstat): New function.
	(__nullstat): New function.
	(__nullfstat): New function.
	(__zeroread): New function.
	(__randomopen): New function.
	(__randomread): New function.
	* unix/fstat.c (fstat): Call fstat function from struct dev.
	* unix/open.c (struct file): Moved to unix/dev.c.
	(__sfile): Moved to unix/dev.c.
	* unix/stat.c (stat): Call stat function from struct dev.

Sun Jan  5 12:44:20 2003  Alex Waugh  <alex@alexwaugh.com>

	* common/riscosify.c:
	"./foo.c" now translates to "@.c.foo" rather than "c.foo"
	Better handling of . and .. at beginning and ends of filenames, and
	things like "./.."
	Removes ,xyz when the filename is just a leafname.
	Interprets ".svn/text-base/malloc.c.svn-base" as unix format
	not RISC OS format.

Sun Jan  5 12:41:31 2003  Alex Waugh  <alex@alexwaugh.com>

	Make UnixLib thread-safe.
	* abort.c (abort): Add PTHREAD_UNSAFE
	* assert.c (__assert_fail): Likewise.
	* atexit.c (atexit): Likewise.
	* qsort.c (qsort): Likewise.
	* strtod.c: LIkewise.
	* termcap.c (tgetent, t_tentcp, t_tgetln): Likewise.
	(t_tgetid, tgetstr, tgoto): Likewise.

	* strsignal.c (strsignal): Simplify.

Sun Jan  5 12:37:50 2003  Alex Waugh  <alex@alexwaugh.com>

	* errno.h: Always define 'errno' as errno.
	* errno.c: Remove conditional.
	* pthread/context.c (__pthread_context_switch): Preserve errno.

	* pthread.h (__pthread_saved_context): Add spsr.
	* pthread/_context.s: Store/restore the SPSR.

	* sys/_alloca.s: Various APCS-32 fixes.
	* sys/_syslib.s: Likewise.

	* sys/errlist.c: Include pthread.h.

Sun Jan  5 12:29:13 2003  Alex Waugh  <alex@alexwaugh.com>

	* sys/exec.c (execve): Change control characters to \xXX.
	Don't backslash already quoted characters.
	* unix/unix.c (__hexstrtochar): New function.

Sat Jan  4 15:27:54 2003  Nick Burrett  <nick@dsvr.net>

	* sys/_syslib.s: Revert last change.  The SCL doesn't preserve ip
	either, so the fix should be applied to GCC.

Mon Dec 30 12:05:21 2002  Nick Burrett  <nick@dsvr.net>

	* sys/_syslib.s (__rt_stkovf_split_small): Preserve 'ip'.
	(__rt_stkovf_split_big): Likewise.
	(stack_overflow_common): Restore 'ip'.

Sun Dec 22 18:21:18 2002  John Tytgat  <John.Tytgat@aaug.net>

	* MKDir: added resolv & resolv.o
	* objs/Makefile,fe1: Added resolv/*; Removed netlib.o.ntohl,
	  netlib.o.ntohs, netlib.o.inet_addr, netlib.o.inet_aton, unix.o.syslog
	  Renamed netlib.o.htonl to netlib.o._bswap_32, netlib.o.htons to
	  netlib.o._bswap_16; Added string.o.rawmemchar, string.o.strchrnul,
	  string.o.strndup, string.o.strnlen, string.o.swab, netlib.o.in6_addr.
	* source/Makefile: Likewise.
	* Makefile: added resolv

	* arpa/inet.h: Replaced by version in glibc 2.2.5
	* arpa/nameser.h: Replaced by version in glibc 2.2.5
	* arpa/nameser_compat.h: Added (glibc 2.2.5)
	* arpa/tftp.h: Added (glibc 2.2.5)

	* bits/in.h: Added (glibc 2.2.5)
	* bits/netdb.h: Added (glibc 2.2.5)
	* bits/sockaddr: Added (glibc 2.2.5)
	* bits/socket.h: Added (glibc 2.2.5)

	* byteswap.h: Added (glibc 2.2.5)
	* dirent.h: Changed __u_int32_t into __uint32_t
	* net/if.h: Replaced by version in glibc 2.2.5
	* netdb.h: Replaced by version in glibc 2.2.5
	* netinet/{in.h,in_systm.h,ip.h,ip_icmp.h,tcp.h,udp.h}:
	  Replaced by version in glibc 2.2.5
	* netinet/ip_var.h: Changed #include <sys/bytesorder.h> into
	  #include <netinet/in.h>.
	* resolv.h: Added (glibc 2.2.5)
	* resolv/resolv.h: Added (glibc 2.2.5)
	* stdio-common/stdio_ext.h: Added (glibc 2.2.5)
	* stdio_ext.h: Added (glibc 2.2.5)
	* stdint.h: When __int8_t_defined is defined, this does not
	  mean that uint8_t, uint16_t, uint32_t and uint64_t are defined (but
	  u_int8_t, u_int16_t, u_int32_t adn u_int64_t are defined).
	* string.h: Added GNU calls __rawmemchr(), strndup(),
	  strnlen() & strchrnul(); When __USE_BSD is defined, declare bcopy(),
	  bzero(), bcmp(), index(), rindex(), strcasecmp() and strncasecmp().
	* strings.h: Function calls are BSD functions calls so
	  wrapped them inside an #ifdef __USE_BSD.
	* string/byteswap.h: Added (glibc 2.2.5)
	* sys/bitypes.h: Added (glibc 2.2.5)
	* sys/byteorder.h: Removed (as htonl(), ntohl(), htons()
	  and ntohs() are defined in netinet/in.h).
	* sys/netdb.h: Removed (as the SWI veneers are now defined
	  in bits/netdb.h)
	* sys/sysmacros.h: Added (glibc 2.2.5)
	* sys/uio.h: Changed #include <unixlib/types.h> into
	  #include <sys/types.h> so that return types of readv() and writev()
	  are a defined ssize_t (was previously the internal type __ssize_t).
	* swis.h: Added Internet 5 new SWIs.
	* unixlib/asm_dec.s: Added COMPAT_INET4 (default off),
	  added Internet 5 new SWIs.
	* unixlib/features.h: Added more #define's for Norcroft C
	  compiler; Removed all sections which are also defined in
	  misc/sys/cdefs.h;
	  Defined BSD; Added #undef COMPAT_INET4
	* unixlib/math.h: Changed __u_int32_t into __uint32_t
	* unixlib/types.h: Replaced by version in glibc 2.2.5
	* sys/cdefs.h: Added (glibc 2.2.5)
	* sys/select.h: 5th param pselect() is 'const struct
	  timespec *', not 'struct timespec'.  Was also missing 6th param
	  'const __sigset *'.
	* math/acosh.c: Changed __u_int32_t into __uint32_t.
	* math/atanh.c: Likewise.
	* math/cbrt.c: Likewise.
	* math/erf.c: Likewise.
	* math/exprm1.c: Likewise.
	* math/fmod.c: Likewise.
	* math/fpclassify.c: Likewise.
	* math/jn.c: Likewise.
	* math/llrint.c: Likewise.
	* math/llround.c: Likewise.
	* math/log2.c: Likewise.
	* math/lrint.c: Likewise.
	* math/lround.c: Likewise.
	* math/modf.c: Likewise.
	* math/nearbyint.c: Likewise.
	* math/nextafter.c: Likewise.
	* math/remainder.c: Likewise.
	* math/remquo.c: Likewise.
	* math/rem_pio2.c: Likewise.
	* math/rint.c: Likewise.
	* math/round.c: Likewise.
	* math/trunc.c: Likewise.
	* misc/sys/cdefs.h: Added (glibc 2.2.5)
	* misc/sys/socket.h: Replaced by version in glibc 2.2.5
	* misc/sys/types.h: Replaced by version in glibc 2.2.5
	* netlib/accept.c: Type of last parameter of accept() is
	  socklen_t *, not int *.
	* netlib/bind.c: Type of last parameter of bind() is socklen_t,
	  not int. Removed commented out debug line.
	* netlib/connect.c: Type of last parameter of connect() is
	  socklen_t, not int. Removed commented out debug line.
	* netlib/getpeernam.c: Type of last parameter of getpeernam()
	  is socklen_t *, not int *.
	* netlib/getsocknam.c: Type of last parameter of getsocknam()
	  is socklen_t *, not int *.
	* netlib/getsockopt.c: Type of last parameter of getsockopt()
	  is socklen_t *, not int *.
	* netlib/host.c: Return types of sethostent() end endhostent()
	  are void, not int; First 2 parameters of gethostbyaddr() are const
	  void * and socklen_t, not const char * and int.
	* netlib/in6_addr.c: Added (glibc 2.2.5)
	* netlib/inet_addr.c: Removed (new code at resolv/inet_addr.c)
	* netlib/inet_aton.c: Likewise.
	* netlib/inet_lnaof.c: Return type of inet_lnaof() is in_addr_t,
	  not u_long.
	* netlib/inet_netof.c: Return type of inet_netof() is in_addr_t,
	  not u_long.
	* netlib/inet_netwo.c: Removed #include <sys/byteorder.h>;
	  Return type of inet_network() is in_addr_t, not u_long.
	* netlib/inet_mkad.c: Both parameters of inet_makeaddr() are
	  in_addr_t, not u_long.
	* netlib/net.c: Return type of setnetent() and endnetent() is
	  void, not int.  First parameter of getnetbyaddr() is uint32_t, not
	  long.
	* netlib/ntohl.s (ntohl): Removed (is implemented as
	   __bswap_32())
	* netlib/ntohs.s (ntohs): Removed (is implemented as
	   __bswap_16())
	* netlib/ntop.c: Removed #include <sys/byteorder.h>
	* netlib/proto.c: Return type of setprotoent() and endprotoent()
	  is void, not int.
	* netlib/pton.c: Removed #include <sys/byteorder.h>
	* netlib/recv.c (recv): Third parameter of recv() is
	  size_t (unsigned int), not int.
	* netlib/recvfrom.c (recvfrom): Type of third and last parameter
	  of recvfrom() is size_t and socklen_t (unsigned int) respectively,
	  not int and int.
	* netlib/send.c (send): Type of third parameter of send() is
	  size_t, not int.
	* netlib/sendto.c (sendto): Type of third and last parameter of
	  sendto() is size_t and socklen_t (unsigned int) respectively, not int
	  and int.
	* netlib/serv.c: Removed #include <sys/byteorder.h>; Return type
	  of the setservent() and endservent() routines is void, not int.
	* netlib/setsockopt.c (setsockopt): Last parameter of
	  setsockopt() is socklen_t (unsigned int), not int.
	* netlib/socket.c: Changed #include <sys/netdb.h> into #include
	  <netdb.h>
	* netlib/_accept.s: Added check for COMPAT_INET4.
	* netlib/_recvfrom.s: Likewise.
	* netlib/_recvmsg.s: Likewise.
	* netlib/_sendmsg.s: Likewise.
	* netlib/_getpeername.s: Likewise.
	* netlib/_getsockname.s: Likewise.
	* netlib/_bswap_32.s (__bswap_32): Added (was the htonl.s
	  implementation)
	* netlib/_bswap_16.s (__bswap_16): Added (was the htons.s
	  implementation)
	* opensock.c: Added (glibc 2.2.5)
	* string/strchrnul.c: Added (glibc 2.2.5)
	* string/strndup.c: Added (glibc 2.2.5)
	* string/swab.c: Added (glibc 2.2.5)
	* strsignal.c (strsignal): Changed return type to 'char *'.
	* unix/dev.c: Changed #include <sys/netdb.h> into #include
	  <netdb.h>
	* unix/fcntl.c: Likewise.
	* unix/pselect.c (pselect): Parameters were wrong.  Based
	  implementation on glibc 2.2.5.

Sun Dec 15 13:35:02 2002  Alex Waugh  <alex.waugh@arm.com>

	* common/riscosify.c: Re-write.

Sun Dec 15 13:15:39 2002  Alex Waugh  <alex.waugh@arm.com>

	POSIX threads and Stack Chunk implementation.

Fri Dec 13 11:07:21 2002  Nick Burrett  <nick@dsvr.net>

	* time.h (localtime_r): Declare.
	(gmtime_r): Declare.
	(__calendar_convert): Fixup prototype.
	* calendconv.c (__calendar_convert): Make re-entrant.
	* gmtime.c (gmtime): Fixup call to support new re-entrant version
	of `__calendar_convert'.
	* localtime.c (localtime): Likewise.
	* localtime_r.c: New file.
	* gmtime_r.c: New file.

	* errno.h (__set_errno): Add __UNIXLIB_INTERNALS guard.  This macro
	shouldn't be exposed outside of UnixLib.

Wed Nov 27 19:00:00 2002  Nick Burrett  <nick@dsvr.net>

	64-bit placeholders
	* unixlib/types.h (__off64_t): Declare.
	(__fpos64_t): Declare.
	* sys/types.h: Define __off64_t, if not defined.
	* sys/stat.h (stat64): Define as 'stat'.

Tue Nov 26 21:46:52 2002  Nick Burrett  <nick@dsvr.net>

	C99 dialect functions.
	* stdlib/strtof.c: New file.
	* stdlib/strtold.c: New file.
	
	32-bit float type C99 dialect math functions.
	* math/fmodf.c: New file.
	* math/frexpf.c: New file.
	* math/modff.c: New file.
	* math/_asinf.s: New file.
	* math/_acosf.s: New file.
	* math/_atan2f.s: New file.
	* math/_atanf.s: New file.
	* math/_ceilf.s: New file.
	* math/_cosf.s: New file.
	* math/_coshf.s: New file.
	* math/_expf.s: New file.
	* math/_floorf.s: New file.
	* math/_ldexpf.s: New file.
	* math/_log10f.s: New file.
	* math/_logf.s: New file.
	* math/_modf1f.s: New file.
	* math/_powf.s: New file.
	* math/_sinf.s: New file.
	* math/_sinhf.s: New file.
	* math/_tanf.s: New file.
	* math/_tanhf.s: New file.
	
	* math/fmod.c: Suport long double float type C99 math functions.
	* math/frexp.c: Likewise.
	* math/modf.c: Likewise.
	* math/_asin.s: Likewise.
	* math/_acos.s: Likewise.
	* math/_atan2.s: Likewise.
	* math/_atan.s: Likewise.
	* math/_ceil.s: Likewise.
	* math/_cos.s: Likewise.
	* math/_cosh.s: Likewise.
	* math/_exp.s: Likewise.
	* math/_floor.s: Likewise.
	* math/_ldexp.s: Likewise.
	* math/_log10.s: Likewise.
	* math/_log.s: Likewise.
	* math/_modf1.s: Likewise.
	* math/_pow.s: Likewise.
	* math/_sin.s: Likewise.
	* math/_sinh.s: Likewise.
	* math/_tan.s: Likewise.
	* math/_tanh.s: Likewise.

	* math.h: Create prototypes for `float' and `long double' functions.

	* strtol.c (atol): Remove explicit casts.
	* strtoll.c (atoll): New function.

	* unix/unix.c (_Exit): New function.
	(exit): Split into _Exit.  Call atexit functions here, then
	call _Exit to perform the final termination code.
	
	* stdlib.h (_Exit): New prototype.
	(atoll): New prototype.
	(strtof): New prototype.
	(strtold): New prototype.

Wed Nov 13 11:58:00 2002  Peter Naulls  <peter@chocky.org>

	* sys/socket.h (bind): Correct prototype.
	(accept, connect, recvfrom, getsockname, getpeername): Likewise.
	(_bind, _accept, _connect, _recvfrom, _getsockname): Likewise.
	(_getpeername): Likewise.
	* netlib/accept.c: Likewise.
	* netlib/bind.c: Likewise.
	* netlib/connect.c: Likewise.
	* netlib/getsocknam.c: Likewise.
	* netlib/getsockopt.c: Likewise.
	* netlib/recvfrom.c: Likewise.
	* netlib/setsockopt.c: Likewise.

	* stdio/popen.c (pclose): Correct type usage.
	* sys/execl.c (execl): Likewise.

	* unix/dev.c (__piperead): Fix pipe code to actually work.
	(__pipewrite): Don't seek on pipes.
	(__pipeselect): Likewise.
	* unix/pipe.c (pipe): Put temporary pipe files into /tmp/pipe.

	* unix/select.c (select): Fix broken comparison.

	* unix/tty.c (__tty_console_gwinsz): Change variable naming
	to better suit terminal handling.

Wed Nov 13 10:55:36 2002  Stefan Bellon  <sbellon@sbellon.de>

	* stdint.h: Norcroft version 5.50 supports long long.

	* stdio/_printf.s (_vprintf, _snprintf): New functions.
	(_vsprintf, _vsnprintf): New Norcroft compatibility functions.

Mon Oct 21 22:12:25 2002  Alex Waugh  <alex.waugh@arm.com>

	* sys/exec.c (execve): Allow a null argument list.

	* stdio/printf.c (vfprintfsub): When the buffer isn't large enough,
	return the number of characters that would be written had the
	buffer been big enough.

Mon Oct 21 21:53:21 2002  Peter Naulls  <peter@chocky.org>

	* sys/_syslib.s (__main): Move ENTRY after NAME.
	* common/riscosify.c (__riscosify): Don't default to filetype text
	if there is an error.

Sat Sep 28 16:00:00 2002  Peter Naulls  <peter@chocky.org>

	* unix/unix.c (convert_command_line): Fix argument could error
	when faced with arguments like "2> stderr".

Tue Sep 24 14:32:56 2002  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): Make 2nd and 3rd param char *const [].
	* sys/execv.c (execv): Make 2nd param char *const [].
	* sys/execvp.c (execvp): Likewise.
	* unistd.h (execv, execve, execvp): Fix prototypes accordingly.

Tue Sep 24 13:08:36 2002  Nick Burrett  <nick@dsvr.net>

	* strsignal.c (strsignal): Return a char *, not const char *.
	* string.h (strsignal): Fix prototype.

Tue Sep 24 13:03:52 2002  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): Make 3rd param char *const *.
	* sys/execv.c (execv): Make 2nd param char *const *.
	* unistd.h (execv, execve): Fix prototypes accordingly.

Tue Sep 24 13:00:22 2002  Nick Burrett  <nick@dsvr.net>

	* unix/proc.c (setegid): Set errno to EPERM on failure.

Tue Sep 24 12:50:37 2002  John Tytgat  <John.Tytgat@aaug.net>

	* strsignal.c (strsignal): strsignal(NSIG) wasn't detected
	as an error.
	* signal.h (sys_siglist): const'ify
	* signal/signame.c (sys_siglist):  Likewise.
	* signal/_signal.s (__h_error): Using the NAME macro.
	* sys/_alloca.s (alloca): Added some comments how this
	works; Added APCS-32 compatibility.
	* sys/_sigjmp.s (sigsetjmp): No need to save a2 & ip.

Tue Sep 24 12:28:40 2002  Peter Naulls  <peter@chocky.org>

	* netinet/in.h (struct ip_opts): Rename ip_opts to Ip_opts to
	workaround C++ incompatibility.

	* alloc.c (mmap_chunk): Fix alignment warning.
	* strcmp.c (strcmp): Retain type consistency.
	* netdb.h (gethostbyname2): Add prototype.
	* common/riscosify.c (__riscosify): Fix signed/unsigned comparison.
	* math/expm1.c (expm1): Fix warnings about uninitialised variables.
	* stdio/scanf.c (vfscanf): Fix function type usage.
	* stdio/tmpfile.c (generate_temporary_filename): Fix type consistency.
	* sys/exec.c (execve): Avoid alignment warning.

Mon Aug 19 12:50:40 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: module 'string' dependency was wrong; Made
	Norcroft C compiler selection the default.
	* unistd.h: Added missing #endif to fix 18-Aug-2002 19:32:36 change.
	
Sun Aug 18 22:19:01 2002  John Tytgat  <John.Tytgat@aaug.net>

	crypt implementation -- derived from glibc 2.2.5.
	* MKDir: Creating crypt & crypt.o directories.
	* objs/Makefile,fe1: Added crypt/*; Removed o.fcrypt.
	* source/Makefile: Likewise.
	* fcrypt.h: Replaced by a #include <crypt.h>.
	* stdint.h: Added long long equivalents for Norcroft C.
	* unixlib/features.h: Added __const, __THROW definitions
	for Norcroft C.
	* fcrypt.c: Remove
	* crypt.h: New file (from glibc 2.2.5)
	* crypt/crypt.c: New file.
	* crypt/crypt-entry.c: New file.
	* crypt/crypt_util.c: New file.
	* crypt/crypt-private.h: New file.
	* crypt/ufc-crypt.h: New file.
	* crypt/md5.c: New file.
	* crypt/md5-crypt.c: New file.
	* crypt/md5.h: New file.
	
Sun Aug 18 20:54:03 2002  John Tytgat  <John.Tytgat@aaug.net>
			  Nick Burrett  <nick@dsvr.net>

	Implement __riscosify_control as a WEAK variable.
	* common/_riscosify.s: New file.
	* unixlib/local.h (__get_riscosify_control): Add prototype.
	* common/riscosify.c (__riscosify_std): Use `__get_riscosify_control'
	rather than `__riscosify_control'.
	* common/unixify.c (__unixify_std): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	* unix/dirent.c (opendir): Likewise.
	(readdir_r): Likewise.
	(rewinddir): Likewise.
	
Sun Aug 18 19:32:36 2002  Nick Burrett  <nick@dsvr.net>

	* string/swab.c: New file.
	* unistd.h (swab): Add prototype.

Sun Aug 18 16:15:25 2002  Nick Burrett  <nick@dsvr.net>

	[ BUG 51 ]
	* All header files: Include <unixlib/features.h>.  Use __BEGIN_DECLS
	and __END_DECLS for the extern "C" decls.
	* unix/tty.c (_BSD_SOURCE): Declare.
	
Sat Aug 17 13:58:36 2002  Nick Burrett  <nick@dsvr.net>

	* unix/fstat.c (fstat): Fix bad cast.

Sat Aug 17 12:02:23 2002  Nick Burrett  <nick@dsvr.net>

	* netlib/h_errno.c (h_errno): Change type to int. Include netdb.h.

Sat Aug 17 11:59:58 2002  Nick Burrett  <nick@dsvr.net>

	* netdb.h (h_errno): Declare.
	
Sat Aug 17 11:58:29 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/fstat.c (fstat): Return true extent, rather than file
	allocation size.

Sat Aug 17 11:51:39 2002  Peter Naulls  <peter@chocky.org>

	* unixlib/local.h (__RISCOSIFY_FILETYPE_SET): New macro.
	(__RISCOSIFY_MASK): Alter accordingly.
	* common/riscosify.c (__riscosify): Use the MimeMap module
	to match the filename extension and set the filetype appropriately.
	* unix/features.c (__runtime_features): Set riscosify default
	to setting the filetype.
	* unixlib/swiparams.h (MMM_TYPE_RISCOS): Define.
	(MMM_TYPE_RISCOS_STRING): Define.
	(MMM_TYPE_MIME): Define.
	(MMM_TYPE_DOT_EXTN): Define.
	* swis.h (MimeMap_Translate): Define.

Mon Aug  5 10:15:40 2002  Peter Naulls  <peter@chocky.org>

	* netlib/_net_error.s (__net_error_simple_entry): Add branch
	to jump over recent NAME entry.

	* netlib/connect.c (connect): Update debugging code.
	
Mon Aug  5 10:09:40 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (verify_redirection): A space is not permitted between
	a file descriptor number and a redirection operator.

Mon Aug  5 10:07:11 2002  Peter Naulls  <peter@chocky.org>

	* pwd/pwdread.c (__pwddefault): Fix logic inversion of pwd_inited
	comparison.

	* unix/fcntl.c (fcntl): Third argument to _sioctl is an address to
	an argument.
	
Wed Jul 31 15:16:14 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (check_io_redir): Cope with [fd]>>.
	(get_io_redir): Likewise.
	
Fri Jul 26 13:32:38 2002  Nick Burrett  <nick@dsvr.net>

	* stdint.h: Add missing #endif
	* net/if.h: Set __NET_IF_H rather than __SYS_IF_H.

Fri Jul 26 11:00:15 2002  Nick Burrett  <nick@dsvr.net>

	* stdio/fpos.c (fseek): Set errno to EINVAL if the offset to
	SEEK_SET is negative, but don't set the stream error.
	
Fri Jul 26 10:47:36 2002  Nick Burrett  <nick@dsvr.net>

	* sys/_vfork.s (vfork): No need to save sp around __vfork call.
	I think it is legacy from the old __vfork implementation.

Fri Jul 26 10:41:47 2002  Peter Naulls  <peter@chocky.org>
			  Nick Burrett  <nick@dsvr.net>

	* common/stat.c (__stat): If ImageFS is to be treated as a
	directory, then fudge directory size and set hard links to 2.
	Otherwise don't fudge directory size and set hard links to 1.
	
Fri Jul 26 10:35:30 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/fcntl.c (fcntl): When F_SETFL is called on a socket,
	actually alter the behaviour of the socket.

Fri Jul 19 14:19:48 2002  John Tytgat  <John.Tytgat@aaug.net>

	* index.c: #include <strings.h> so that we have header file
	declaration all exported functions.

Fri Jul 19 14:18:33 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Fixed typo in the Norcroft compiler settings

Fri Jul 19 14:16:30 2002  John Tytgat  <John.Tytgat@aaug.net>

	* stdlib/_rand48.c, drand48.c, erand48.c, jrand48.c, lcong48.c
          lrand48.c, mrand48.c, nrand48.c, random.c, seed48.c
          srand48.c: Added RCS style comment header
	* sys/vfork.c (__vfork): The last environment and argument
	  vector needs to be NULL.

Fri Jul 19 14:13:45 2002  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Removed o.rand
	* scl/_kernel.s: declared AREA readonly. Updated comments.
	* common/_exist.s: Embedding function names
	* gcccompat/_divdi3.s, _moddi3.s, _udivdi3.s, _umoddi3.s:
	  Likewise.
	* math-asm/_acos.s, _asin.s, _atan.s, _atan2.s, _ceil.s
	  _copysign.s, _cos.s, _cosh.s, _exp.s, _fabs.s, _fclrexcpt.s
	  _fegetenv.s, _fegetrnd.s, _feholdexc.s, _fesetenv.s, _fesetroun.s
	  _finite.s, _floor.s, _fraiseexc.s, _fsetexcpt.s, _ftstexcpt.s
	  _hypot.s, _isinf.s, _isnan.s, _ldexp.s, _log.s, _log10.s, _modf1.s
	  _pow.s, _signbit.s, _sin.s, _sincos.s, _sinh.s, _sqrt.s, _tan.s
	  _tanh.s: Likewise.
	* netlib/_accept.s, _bind.s, _connect.s, _getpeerna.s
	  _getsockna.s, _getsockop.s, _gettsize.s, _hostbyadd.s, _hostbynam.s
	  _listen.s, _net_error.s, _readv.s, _recv.s, _recvfrom.s, _recvmsg.s
	  _sclose.s, _select.s, _send.s, _sendmsg.s, _sendto.s, _sendtosm.s
	  _setsockop.s, _shutdown.s, _sioctl.s, _socket.s, _sockstat.s
	  _sread.s, _swrite.s, _writev.s, htonl.s, htons.s, ntohl.s
	  ntohs.s: Likewise.
	* scl/_kcurskch.s, _kernel.s, _kgetenv.s, _kosargs.s
	  _kosbget.s, _kosbput.s, _kosbyte.s, _koscli.s, _kosfile.s
	  _kosfind.s, _kosgbpb.s, _kosrdch.s, _kosword.s, _koswrch.s
	  _ksetenv.s, _kswi_c.s: Likewise.
	* signal/_coredump.s, _signal.s, sigexec.s, printf.s:
	  Likewise.
	* sys/_alloca.s, _divsi3.s, _divtest.s, _jmp.s, _mem.s
	  _mman.s, _modsi3.s, _os.s, _profile.s, _sdiv.s, _sdiv10.s
	  _sigjmp.s, _smod.s, _swi.s, _syslib.s, _udiv.s, _udiv10.s
	  _udivsi3.s, _umod.s, _umodsi3.s, _vfork.s: Likewise.
	* time/_clock.s: Likewise.
	* unix/getpagesiz.s: Likewise.

Sat Jun 15 13:56:57 2002  Nick Burrett  <nick@dsvr.net>

	* stat/mknod.c: New file.
	* stat/mkfifo.c: New file.
	* sys/stat.h (mknod). Add prototype.
	(mkfifo): Add prototype.
	
	* unistd/chown.c: Move here from directory unix to reduce number of
	files in the directory.
	* unistd/fchown.c: Likewise.
	* unistd/link.c: Likewise.
	* unistd/readlink.c: New file. Function split from link.c
	* unistd/symlink.c: Likewise.
	
Wed Jun 12 15:34:06 2002  Nick Burrett  <nick@dsvr.net>

	* stdlib/rand.c (srand): Call rand, not lrand.

	* stricmp.c: Include strings.h.
	* strnicmp.c: Include strings.h.

Wed Jun 12 14:34:13 2002  Nick Burrett  <nick@dsvr.net>

	* stdlib/drand48.c: New file.
	* stdlib/erand48.c: New file.
	* stdlib/jrand48.c: New file.
	* stdlib/lcong48.c: New file.
	* stdlib/lrand48.c: New file.
	* stdlib/mrand48.c: New file.
	* stdlib/nrand48.c: New file.
	* stdlib/_rand48.c: New file.
	* stdlib/rand48.h: New file.
	* stdlib/seed48.c: New file.
	* stdlib/srand48.c: New file.

	* stdlib/rand.c: Moved here from parent directory.  Stripped out
	the rand48 functions and random and srandom.

	* stdlib/random.c: New file.  A better random number generator.

	* stdlib.h (lrand48, rand, random, srandom): Remove macroised
	versions of these functions since they are now properly implemented.
	(initstate): Declare.
	(setstate): Declare.
	(drand48): Declare.
	(erand48): Declare.
	(lrand48): Declare.
	(nrand48): Declare.
	(mrand48): Declare.
	(jrand48): Declare.
	(srand48): Declare.
	(seed48): Declare.
	(lcong48): Declare.

	* sys/mman.h (MAP_FAILED): Add macro.

Wed Jun 12 12:13:20 2002  Peter Naulls  <peter@chocky.org>

	* Sprites,ff9, Sprites22,ff9: Rename from !unixlib37 to !unixlib.

Mon Jun 10 19:14:37 2002  Stefan Bellon  <sbellon@sbellon.de>

	* unix/dev.c (__fsopen): Fix ImageFS logic inversion.

Mon Jun 10 19:08:39 2002  Peter Naulls  <peter@chocky.org>

	* locale.h (LC_MESSAGES): Define.
	* locale/localeconv.c (localeconv): Use malloc'ed strings rather
	than statics.
	* locale/setlocale.c (locale_names): Add LC_MESSAGES.

Mon Jun 10 17:31:46 2002  Nick Burrett  <nick@dsvr.net>

	* common/stat.c (__feature_imagefs_is_file): Remove extern decl.
	* unix/dev.c: Likewise.
	* unixlib/features.h (__feature_imagefs_is_file): Declare here.

Mon Jun 10 13:08:23 2002  Stefan Bellon  <sbellon@sbellon.de>

	* unix/dev.c (__fsopen): Support PipeFS.
	
Mon Jun 10 13:01:48 2002  Nick Burrett  <nick@dsvr.net>
			  Stefan Bellon  <sbellon@sbellon.de>

	* unix/features.c (__feature_imagefs_is_file): Declare.
	(__runtime_features): Set default to handling Image filesystems
	as directories.
	* unix/stat.c (__stat): Allow image filesystems to be treated
	as a file.
	* unix/dev.c (__fsopen): Likewise.

Mon Jun 10 12:43:11 2002  Peter Naulls  <peter@chocky.org>
			  John Tytgat  <John.Tytgat@aaug.net>

	* pwd.h (__pwddefault): Declare.
	* getpwnam.c (getpwnam): If passwd file cannot be found,
	then use __pwddefault to supply fake entries.
	* getpwnam_r.c (getpwnam_r): Likewise.
	* getpwuid.c (getpwuid): Likewise.
	* getpwuid_r.c (getpwuid_r): Likewise.
	* pwdread.c (__pwddefault): New function.

Mon Jun 10 12:32:13 2002  John Tytgat  <John.Tytgat@aaug.net>

	* math/exp.c: Include stdlib.h.
	* unix/unix.c (__badr): Delete macro.
	(__unixlib_fatal): Delete macro.

Mon Jun 10 11:01:17 2002  John Tytgat  <John.Tytgat@aaug.net>

	* unix/unix.c (_main): Make a snapshot of `environ' as calls
	to getenv can change its value, which is considered invalid.

Mon Jun 10 10:56:10 2002  Maarten Bezemer  <veger2002@hotmail.com>

	* stdio/tmpfile.c (tempnam): A logic error prevents `dir' being
	used as a suitable temporary directory.
	
Thu Apr 18 08:39:08 2002  Alex Waugh  <alex@alexwaugh.com>

	* stdio/printf.c (vsnprintf): Honour the length parameter even
	if it is zero.

Thu Apr 18 08:32:42 2002  John Tytgat  <John.Tytgat@aaug.net>

	* clib/stddef.h: Better protection against multiple includes
	avoiding the "repeated definition of #define macro xxx" warning
	from the Norcroft compiler.  Simplified source a bit.
	* clib/time.h: Likewise.
	* sys/time.h: Likewise.
	* sys/uio.h: Removed the unnecessary #include <stdarg.h> and
	#define __need_size_t.

Wed Apr 03 09:41:27 2002  Nick Burrett  <nick@dsvr.net>

	* netlib/host.c (gethostbyname2): New function.  Move the
	main work of gethostbyname into here.
	(gethostbyname): This is implmented in terms of gethostbyname2.
	
Wed Apr 03 08:45:18 2002  Peter Naulls  <peter@chocky.org>

	* memcmp.c (memcmp): Fix compiler warnings.
	* sys/debug.c (__debugval): Likewise.
	* strncmp.c (strncmp): Likewise.
	* errno.h (sys_errlist): Constify.
	* signal.h (sys_siglist): Constify.
	* stdio.h (sys_errlist): Constify.
	* time.h (tm_zone): Constify.
	* signal/signame.c (sys_siglist): Constify.
	* sys/errlist.c (sys_errlist): Constify.
	* uname.c (__uname): Return pointer to empty buffer in read/write
	space.
	
Tue Apr 02 20:01:07 2002  Nick Burrett  <nick@dsvr.net>

	* unix/unix.c (verify_redirection): Add logic to cope with
	file descriptor numbers before redirection operators.
	(find_redirection_type): Add logic to recognise file descriptor
	before redirection operators so as to prevent false arguments.

Mon Apr 01 11:27:23 2002  Peter Naulls  <peter@chocky.org>

	* ctype.h (isprint): Fix logic error.

Sat Mar 30 10:09:52 2002  Alex Waugh  <alex@alexwaugh.com>

	* unix/tty.c (__ttyicanon): Don't set error if EOF is encountered.

Sat Mar 30 10:00:52 2002  Alex Waugh  <alex@alexwaugh.com>

	* sys/_jmp.s: Fix APCS-32 typo.

Sat Mar 30 10:00:52 2002  John Tytgat  <John.Tytgat@aaug.net>

	* unistd.h (ualarm): Declare.
	(usleep): return type is now 'int'.
	* signal/sleep.c: Added GNU LGPL.
	(sleep_int): Created, this gets	used by `sleep' and `usleep'.
	`usleep' works now with a 1/100th sec resolution instead of 1 sec.
	* sys/alarm.c: Added GNU LGPL.
	(alarm): Synced implementation with GNU C Lib.
	(ualarm): Added.
	* time/setitmr.c (setitimer): Changed invalid parameter test

	* unixlib/features.h: Clean up Norcroft compiler warnings.

Sat Mar 30 09:37:00 2002  Theo Markettos  <theo@markettos.org.uk>

	* unistd/chroot.c: New file.  Stub function.
	* unistd/getpass.c: New file.
	* unistd.h (chroot): Declare.
	(getpass): Declare.

Mon Feb 11 13:15:03 2002  Alex Waugh  <alex@alexwaugh.com>

	* strtol.c (strtol): Correctly detect when the string supplied
	contains a leading +, - or 0x but no actual number.
	* strtoll.c (strtoll): Likewise.
	* strtoul.c (strtoul): Likewise.
	* strtoull.c (strtoull): Likewise.
	
Mon Feb 11 13:10:28 2002  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/printf.c (vfprintfsub): Incorrect argument for `wcrtomb'.
	Added #include <strings.h> for bcopy() declaration.
	* sys/_syslib.s: Reshuffling of the AREAs otherwise AAsm complains.
	Added ALIGN after RMEnsure text.

Thu Feb  7 10:29:02 2002  Christian Ludlam  <chris@recoil.org>

	* unix/dirent.c (scandir): New function.
	* dirent.h (scandir): Fix prototype.

Thu Feb  7 10:17:01 2002  Peter Naulls  <peter@chocky.org>

	* alloc.c: Clean up compiler warnings.
	* netlib/host.c: Likewise.
	* stdarg.h: Likewise.
	* machine/nan.h (NAN): Likewise.

	* inttypes.h: Add __extension__ to GCC specific C extensions.
	* stdint.h: Likewise.
	* stdlib.h: Likewise.
	* wchar.h: Likewise.
	* unixlib/types.h: Likewise.

	* math.h (exp2, exp10, round, lround, llround, drem): Prototype.
	* machine/ieee754.h (__ieee754_exp): Prototype.
	
	* fcntl.h (O_NOCTTY): Define.
	* assert.h (assert): Remove __noreturn__.
	
Tue Jan 31 16:18:22 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* getopt.h: Don't include the GNU specific getopt long stuff.

Tue Jan 31 16:18:22 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* getopt.h: New file.
	* unistd.h: Include getopt.h rather than defining prototypes
	for getopt.

Tue Jan 31 14:31:05 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/tmpfile.c (generate_temporary_filename): Randomise
	filename based on program start time.  This should help to
	reduce application concurrency issues.

Tue Jan 31 14:31:05 2002  Peter Naulls  <peter@chocky.org>

	* unistd.h (symlink): Declare.
	(readlink): Declare.
	* unix/link.c (symlink): New function.
	(readlink): New function.
	* unix/glob.c (glob3): Fix warnings.
	* unix/open.c (ttyname): Return pointer to a static buffer.
	* unix/syslog.c (vsyslov): Call `write' rather than `writev'.
	* unix/unix.c (__unixinit): Fix warnings.
	(initialise_unix_io): Make tty const.

Tue Jan 15 13:20:42 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (_IOMAGIC): Change to 0xfe000000 in order to reduce
	the number of instructions required to check for a valid stream.
	* stdio/flsbuf.c (__flsbuf): Remove check on stream validity
	since all callers provide this.
	* stdio/putc.c (fputc): Implement old `putc' macro here to remove
	infinite loop caused by last change.

Sat Jan 12 16:31:01 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (putc): Do not define as a macro.  We should not
	be evaluating the argument more than once.

Sat Jan 12 16:15:07 2002  Alex Waugh  <alex@alexwaugh.com>

	* locale/ctypetable.c (__build_ctype_tables): Correctly
	initialise __ctype_lower and upper for C/POSIX locale.

	* unix/dev.c (__fsopen): When opening a file O_RDWR, return
	ENOENT when file does not exist.
	
Sat Jan 12 16:09:05 2002  Peter Naulls  <peter@chocky.org>

	* unix/fcntl.c (fcntl): Restrict flags that can be altered
	by F_SETFL.
	
Sat Jan 12 16:06:35 2002  Peter Naulls  <peter@chocky.org>

	* termios/tcsetattr.c (tcsetattr): Mask out hardware state.
	* unix/tty.c (__ttyicanon): Don't reset cursor position.

Sat Jan 12 15:46:08 2002  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (putchar): Do not define as a macro.

Thu Dec 20 09:46:26 2001  David Marston  <david@illudium.org.uk>

	* module/sul.s (upcall_handler): Remove duplicate lines.

Wed Dec 19 16:52:09 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	Module workaround for UpCall related system lock-up.
	* unixlib/asm_dec.s: New SWI decls.
	* sys/_syslib.s (_main): Add SharedUnixLibrary initialisation
	code.
	(__exit): Add SharedUnixLibrary finialsation code.
	(handlers): We no longer install __h_upcall.
	* module/sul.s: New file.

Tue Dec 18 11:19:01 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/dev.c (__fsopen): Do not set O_CREAT if the files does
	not exist.

Thu Oct  4 13:50:05 2001  Alex Waugh  <alex@alexwaugh.com>

	* stdlib/realpath.c: New file.
	* stdlib.h (realpath): Declare.

Tue Oct 02 11:18:36 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* unixlib/asm_dec.s (EOPSYS): Change to 88 inline with errno.h.

Tue Oct 02 11:15:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_signal.s (__h_error): Call __unixlib_raise_signal
	rather than raise.

Fri Sep 21 17:12:15 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* complex.h (cacos): Fix typo that I made in last change by John..

Fri Sep 21 11:20:47 2001  John Tytgat  <John.Tytgat@aaug.net>

	* complex.h (cacos): Add missing underscore to _Complex.
	* unixlib/features.h: Add "#undef __attribute__" for
	Norcroft compatibility otherwise it complains about redefinition
	with different value.

Fri Sep 21 11:11:44 2001  John Tytgat  <John.Tytgat@aaug.net>

	* signal/_signal.s (__seterr): Wrote 4 bytes too far in
	__ul_errbuf_errblock so that next zero initialised variable got
	nuked.

Fri Sep 14 15:00:02 2001  Nick Burrett  <nick.burrett@btinternet.com>

	This is part one of a large header file cleanup.  The patch
	reduces the namespace pollution of including too many header
	files, by creating special __need_XXX macros for headers that
	only need certain definitions.  Multiple definitions are
	fixed by using special __XXX_defined macros.
	* complex.h, dirent.h, fcntl.h, fnmatch.h, glob.h: Changed.
	* grp.h, math.h, pwd.h, setjmp.h, stdarg.h, stddef.h: Changed.
	* stdint.h, stdio.h, stdlib.h, string.h, termios.h: Changed.
	* time.h, unistd.h, utime.h, wchar.h: Changed.
	* sys/poll.h, sys/resource.h, sys/select.h: Changed.
	* sys/socket.h, sys/stat.h, sys/syslog.h: Changed.
	* sys/time.h, sys/timeb.h, sys/types.h, sys/uio.h: Changed.
	* sys/utsname.h, sys/wait.h: Changed.
	* unixlib/dev.h, unixlib/local.h, unixlib/types.h: Changed.
	* unixlib/unix.h: Changed.

	* unixlib/tty.h: Renamed from sys/tty.h.
	* poll.h: New header file.
	* pthread.h: New header file.
	* syslog.h: New header file.
	
	* sys/exec.c (execve): Delete code in __TTY_STATIC_BUFS.
	(__exret): Likewise.
	* unix/tty.c (__ttyopen): Likewise.
	(__ttyclose): Likewise.
	(__ttyread): Likewise.
	(__ttyicannon): Likewise.
	(__ttywrite): Likewise.
	(__ttydel): Likewise.
	* unix/unix.c (create_process_structure): Likewise.

	* unix/alphasort.c (alphasort): Fix definition.
	* unix/poll.c (poll): Likewise.
	* unix/syslog.c (openlog): Likewise.
	* unix/pselect.c: Include time.h.
	* unix/select.c (select): Change __FD_SETSIZE to FD_SETSIZE.
	
	* unixlib/features.h: Added macros as a placeholder for part two
	of the header file cleanup.
	
	* strings.h (index, rindex): Moved here from string.h.
	(bcmp, bcopy, bzero, strcasecmp, strncasecmp): Likewise.
	* inttypes.h (imaxdiv_t): Define.
	
	* ctype.h (_toupper, _tolower): Declare.
	* div.c (lldiv): New function.	
	* ctypeproc.c (_tolower): New function.
	(_toupper): New function.

Tue Sep 11 17:53:37 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* errno.h (EAGAIN): Renumber from 82 to 11 to bring inline
	with the Acorn Internet module.
	(EREFUSED): New Acorn Internet misspelling.
	(ENOSYS): Renumbered from 78 to 87.
	(ENOSR, ENOMSG, EBSDMSG, EIDRM, EDEADLK, ENOLCK, ENOMSG): Define.
	(ELIBVER, ELIBLIM, ELIBNOENT, ELIBNOEXEC): Define.
	* sys/errlist.c (sys_errlist): Fixup.

	* sys/ioctl.h (FIOSLEEPTW): Define.
	* termios/tcsetattr.c (tcsetattr): Use NOFLSH, ECHO, TOSTOP.
	* termios/tcgetattr.c (tcgetattr): Likewise.
	
Tue Sep 11 16:44:59 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* net/if.h: New file.  Renamed from sys/if.h.
	
Tue Sep 11 16:07:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* termios.h: Re-synced with FreeBSD 4.3.
	* sys/ioctl.h: Re-synced with FreeBSD 4.3.
	* unix/tty.c (ttydefchars): Change index 7 from _POSIX_VDISABLE
	to CERASE.
	(__ttyioctl): References into the c_cc array should use the
	V* macros rather than the C* macros.
	t_flushc gets its value from VDISCARD, not VFLUSH.
	t_brkc gets its value from VEOL, not CBRK.
	
Tue Sep 11 15:19:41 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/child.c: Delete file.
	* objs/Makefile (SYS): Remove sys.o.child.
	(sys.o.child): Delete dependency.
	
Tue Sep 11 15:15:37 2001  John Tytgat  <John.Tytgat@aaug.net>

	* unix/write.c: Include <unixlib/features.h> for the
	__FEATURE* #define's.
	* sys/exec.c: Likewise.
	* unix/tty.c: Likewise
	(__ttyioctl): Changed os_423break() into __os_423break().
	* sys/vfork.c: Likewise. And added explicit pid casting
	in __vfork().
	* time/setitmr.c (add_timer): Changed variable 'new' into 'newtime'
	to avoid C++ keyword warnings.
	* wchar/wcsdup.c: Likewise.
	* unistd.h: Moved the tcsetpgrp() declaration outside the
	#if 0'ed block.  Decl. of tcgetpgrp().
	* unixlib/unix.h: Decl. of __bsd_speeds[], __unixinit(), _main(),
	__exerr, __unixlib_signal_initialise(), __resource_initialise().
	Added #include <sys/types.h>, <kernel.h>.
	* termios/tcgetattr.c: #include unixlib/unix.h for
	__bsd_speeds[].
	* termios/tcsetattr.c: Likewise.
	* termios/tcsetattr.c (tcsetattr): Explicit char casting added.
	* stdio/printf.c: Made vfprintfsub() static.
	* signal/_signal.s: Added IMPORT |__unixlib_raise_signal| & raise.
	* unix/unix.c: Removed decl. of __unixlib_signal_initalise()
	& __resource_initialise().
	* objs/Makefile,fe1: (again) removed sys/syslib.c & sys/os.c.
	Moved Predefs to the top as it is independent of which
	compiler/linker is used.
	* termcap.c: Removed #include <sys/ioctl.h> as this avoids a
	problem in the Norcroft C compiler.  This header file will be
	loaded indirectly by including the other header files.
	* unixlib/local.h: Decl. of __sfixinit() & __sdirinit().
	* unix/features.c: Moved decl. of __sfixinit() & __sdirinit()
	
Tue Sep 11 14:57:01 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* objs/Makefile (GRP): User group files.
	
Tue Sep 11 14:40:33 2001  John Tytgat  <John.Tytgat@aaug.net>

	* unistd.h (usleep): New decl.
	* signal/sleep.c (usleep): New function.

Tue Sep 11 14:32:08 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* grp.h: New header file.
	* grp/fgetgrent.c: New file.
	* grp/fgetgrentr.c: New file.
	* grp/getgrent.c: New file.
	* grp/getgrgid.c: New file.
	* grp/getgrgid_r.c: New file.
	* grp/getgrnam.c: New file.
	* grp/getgrnam_r.c: New file.
	* grp/getgroups.c: New file.
	* grp/grpread.c: New file.

	* pwd/pwdread.c (__pwdread): Make local buffer static to
	avoid referencing problems.
	
Tue Sep 11 14:18:32 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/select.c (select): Use recommended setting of R1 for
	Taskwindow sleep.#
	* unix/tty.c (__ttyicanon): Yield in taskwindow to reduce
	CPU use.
	(__ttyiraw): Likewise.

Tue Sep 11 14:04:13 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* alloc.c (malloc_useable_size): Don't compile.  I don't think
	this is used on RISC OS.
	(malloc_update_mallinfo): Likewise.
	(malloc_stats): Likewise.
	(mALLOPt): Likewise.
	
	* signal/_coredump.s: Change AREA C$$data to C$$zidata.
	* sys/_alloca.s: Likewise.
	* sys/_vfork.s: Likewise.

	* sys/_sdiv.s: Rename C$code to C$$code.
	* scl/_memchk.s: Likewise.
	* sys/_udiv10.s: Likewise.
	* sys/_smod.s: Likewise.
	* sys/_umod.s: Likewise.
	* sys/_divtest.s: Likewise.
	* sys/_profile.s: Likewise.
	* sys/_sdiv10.s: Likewise.

	* time/setitmr.c (remove_ticker): Add inline attribute.
	(add_ticker): Likewise.
	
Tue Sep 11 13:55:54 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* sysexits.h: New header file.

Thu Sep  6 15:51:33 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* objs/Makefile,fe1 (SIGNAL): Remove o.setup and o.sigwakeup.
	* unixlib/sigstate.h (__unixlib_sig_init): Delete decl.
	(__unixlib_internal_post_signal): Delete decl.
	(__unixlib_setup_sighandler): Delete decl.
	(__h_sigill, __h_sigbus, __h_sigsegv0): Delete decl.
	(__h_sigfpe, __h_error, __h_sigint, __h_event): Delete decl.
	(__h_sigsys, __h_upcall, __h_sigalrm): Delete decl.
	(__h_sigvtalrm, __h_sigprof, __h_cback): Delete decl.
	(__h_exit, __cbreg, __h_errbuf, sigwakeup): Delete decl.
	* unixlib/unix.h (__runtime_features): Fix proto.
	* signal/_signal.s (__raise): Call __unixlib_raise_signal direct.
	(__h_error, __h_cback): Likewise.
	(callback_signal): Delete function.
	* signal/init.c (__unixlib_signal_initialise): Merge
	__unixlib_default_sigaction into here.
	* signal/post.c (__unixlib_default_sigaction): Delete funciton.
	(post_signal): Renaed from __unixlib_internal_post_signal.
	Make static.  Minor code cleanup.
	(sigsetup): New function.  This was __unixlib_setup_sighandler.
	* signal/setup.c: Delete file. Moved into post.c.
	* signal/sigwakeup.c: Delete file.  Nothing used it.
	* signal/signame.c (sys_siglist): Add comma after SIGTRAP [from
	Ian Jeffray].  Change message for SIGSYS to Unknown SWI.
	* signal/_syslib.s (__main): Don't change __stack_limit/__rwlimit
	after dynamic area setup [from Ian Jeffray].
	Fix inverse-logic bug when deleting UnixLib$env [from Ian Jeffray].
	
Wed Sep  5 17:32:19 2001  Alex Waugh  <ajw498@ecs.soton.ac.uk>

	* unix/syslog.c (vsyslog): Bug fix.
	
Wed Sep  5 17:26:15 2001  John Tytgat  <John.Tytgat@aaug.net>

	* objs/Makefile,fe1: Added info on how to build APCS-R and
	APCS-32 versions. Fixed include path for objasm. Removed
	sys/syslib.c & sys/os.c.
	* clib/unixlib/asm_dec.s: Changed "{config}" into "{CONFIG}"
	(objasm knows only about the latter).
	* signal/sigexec.s: Likewise.
	* signal/_coredump.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_jmp.s (setjmp & __longjmp_l3): Changed test on "ARMFPE = "3""
	into "{CONFIG}=26" [This means either an APCS-R build, or either
	an APCS-32 build. No other flavours possible.]
	SFM/LFM post increase must be 48, not 12. When SFM/LFM gets
	executed, it shouldn't execute STFE/LDFE as well.
	* sys/_syslib.s: Added lots of IMPORT statements.

Tue Sep  4 17:31:42 2001  Nick Burrett  <nick.burrett@btinternet.com>

	Emphasise that these header files are private to UnixLib.
	* unixlib/dev.h: Renamed from sys/dev.h.
	* unixlib/os.h: Renamed from sys/os.h.  Change all functions to
	be prepended with a double-underscore.
	* unixlib/unix.h: Renamed from sys/unix.h.

	Fixup all source files for the above change.
	
Mon Sep  3 13:21:31 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/tty.c (__tty_console_gwinsz): If a WIMP program, then
	try to read terminal size from the ROWS and COLUMNS environment
	variables.
	(__ttyioctl): Turn TIOCLGET and TIOCLSET into dummy ioctls.
	Fix typo in TIOCSETP to allow setting of CBREAK.
	
Mon Sep  3 13:07:28 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/unix.c (check_io_redir): Print sensible error message
	upon I/O redirection failure.
	(convert_command_line): Null terminate command line.
	
Mon Sep  3 13:01:42 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/termios.h: New header.
	* sys/types.h: Include machine/endian.h.
	* unixlib/local.h: Fix RISC OS spelling typos.
	* !Help: Likewise.

Mon Sep  3 09:29:42 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/iocomm.h: Delete file -- duplicated by sys/ioctl.h.
	* sys/filio.h: Delete file -- duplicated by sys/ioctl.h.
	* sys/sockio.h: Delete file -- duplicated by sys/ioctl.h.

Sun Sep  2 15:03:26 2001  David Marston <david.marston@physics.org>

	* sys/_syslib.s (__main): Take into account __sigstk when
	checking for old dynamic area.

Sun Sep  2 11:25:00 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (vsnprintf): Add decl.
	(snprintf): Add decl.

Sun Sep  2 11:18:36 2001  Christian Ludlam <chris@recoil.org>

	* stdio/printf.c (out_char): New function.
	(out_write): New function.ls
	(WIDESTRING): Define.
	(WCHAR): Define.
	(STOP): Define.
	(vprintfsub): Renamed from vfprintf.  Support wide characters.
	(vfprintf): New function.
	(vsnprintf): New function.
	(snprintf): New function.

Sun Sep  2 11:07:47 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_syslib.s (__main): Let user specify their own name for
	the dynamic area.

Sat Sep  1 14:43:32 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_coredump.s (backtrace_remove_loop): Re-work restoring
	of RISC OS environment handlers.
	(backtrace_reinstall_loop): Likewise.
	(__c_environment_end): Delete.
	(AREA C$$data): Set NOINIT.
	* signal/_signal.s (__h_upcall): Fix to work in SVC mode [from
	Peter Naulls]
	(__seterr): Fix [from Peter Naulls].
	(__h_errbuf): Delete.  Change all uses to __ul_errbuf_errblock.
	(__h_error): Add some comments.
	(__h_sigint): No need to store tempories on stack.
	(__h_event): Likewise.
	(__ul_errbuf): Renamed from __ul_errbuf.pc -- makes errbuf
	the correct size [from Peter Naulls].
	* sys/_syslib.s (__read_environment_handler): Delete function.
	(__write_environment_handler): Delete function.
	(__env_riscos): New function. Replacement for
	__restore_calling_environment_handlers.
	(__env_read): New function.
	(__env_unixlib): New function.
	Set __ul_errbuf for the Error handler [from Peter Naulls].
	(handlers): New table.
	(__calling_environment): Define.
	* sys/syslib.c: Delete file.
	* sys/exec.c (execve): Inline call to __reset.
	(__exret): Call __env_read and __env_unixlib rather than
	__write_environment_handler.
	
	* sys/unix.h: Merge sys/syslib.h into here.
	(__unixinit): Delete decl.
	(__unixexit): Delete decl.
	(__find_free_child): Delete decl.
	* sys/syslib.h: Delete header file.
	* sys/_syslib.s (__main): Merge _main from sys/syslib.c into
	here.  Big code cleanup.  __himem was incorrectly set to __sigstksize.
	Reference variables relative to ip, to reduce use of LTORG.
	Incorporate the reading of UnixLib$env into here.
	Inline check_for_callaswi.
	(__svccli): Delete function.
	(check_for_callaswi): Delete function.
	(___stdioinit): Delete weak link.
	(___stdioexit): Likewise.
	(__u): Define.
	* unix/unix.c: Merge sys/syslib.c into here.
	(__atexit_function_array): New vector.
	(__atexit_function_count): New.
	(__unixinit): Initialise locale and stdio here.  Remove UnixLib$env
	checks.  If child process does not inherit an environment, then
	create a new one.
	(__unixexit): Delete function.
	(_main): New function.
	(exit): Moved here from sys/syslib.c.
	(_exit): Likewise.

	* bsearch.c: Include sys/unix.h rather than sys/syslib.h.
	* qsort.c, termcap.c: Likewise.
	* common/funcallerr.c: Likewise.
	* netlib/socket.c: Likewise.
	* resource/getrlimit.c, resource/initialise.c: Likewise.
	* resource/ulimit.c: Likewise.
	* signal/init.c: Likewise.
	* sys/brk.c, sys/debug.c, sys/exec.c, sys/mman.c: Likewise.
	* sys/vfork.c: Likewise.
	* time/getitmr.c, time/setitmr.c: Likewise.
	* unix/close.c, unix/dirent.c, unix/getcwd.c: Likewise.
	* unix/ioctl.c, unix/lseek.c, unix/open.c, unix/pipe.c: Likewise.
	* unix/read.c, unix/readv.c, unix/reopen.c, unix/select.c: Likewise.
	* unix/tty.c, unix/write.c, unix/writev.c: Likewise.

	* time/setitmr.c (check_ticker): Optimise.
	
Thu Aug 16 11:23:16 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_syslib.s (sigstk): Delete.
	(__main): Fix indirection error when referencing __sigstksize.
	(no_old_area): Use local variables rather than % variables
	to kill warnings.
	(exit_with_error_no_memory): Change to an unconditional MOV.

Thu Aug 16 11:02:04 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__h_event): Don't set our own callback.

Thu Aug 16 10:17:58 2001  Alex Waugh <ajw498@ecs.soton.ac.uk>

	* swis.h: Add SysLog module macros.
	* unix/syslog.c (LogFile): Delete.
	(connected): Delete.
	(__progname): Delete.
	(vsyslog): Use Doggysoft's SysLog module.
	(openlog): Remove old socket code.
	(closelog): Likewise.
	
Thu Aug 16 10:07:01 2001  Alex Waugh <ajw498@ecs.soton.ac.uk>

	* common/unixify.c (__unixify): Ensure we allocate enough buffer
	space for the ,xyz filetype extension.

Wed Aug 15 17:22:19 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__seterr): Prevent corruption of v5.

Wed Aug 15 15:25:34 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* tmpfile.c (tmpfile): Fix logic error with the inlined fcntl.
	We were previously taking the action of failure, which cannot
	possibly happen.
	
Thu Aug  9 08:46:48 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* assert.c (__assert_fail): Change exp to const char*.
	* assert.h (__assert_fail): Likewise.
	
Wed Aug  8 19:41:10 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* kernel.h (struct stack_chunk): Fix GCC warning.
	* math.h (double, ldexp, scalb): Likewise.
	
Wed Aug  8 09:52:58 2001  Peter Burwood  <pjb@arcangel.dircon.co.uk>
			  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_signal.s: Add lots of explanations.
	(__seterr): New function.  Moved here from sys/os.c.
	(_kernel_last_oserror): Likewise.
	(__h_sigsegv1): Remove code that attempted to fixup the base
	register.  Only really of use for virtual memory.
	(__h_sigsys): Alter to call __h_cback directly rather than via
	SWI OS_CallBack.
	* sys/os.c: Delete file.
	
Wed Aug  8 09:44:05 2001  Nick Burrett  <nick.burrett@btinternet.com>

	Work towards a drop-in replacement for the SharedCLibrary.
	* swis.h: Renamed from sys/swis.h.
	(_swi, _swix, _FLAGS, _IN): Moved here from sys/os.h.
	(_INR, _OUT, _OUTR, _BLOCK, _RETURN, _C, _N, _Z): Likewise.
	* sys/os.h: Delete definitions above.
	* sys/swis.h: Delete file.
	* common/fdname.c: Include swis.s, not sys/swis.h.
	* common/riscosify.c: Likewise.
	* common/serial.c: Likewise.
	* locale/ctypetable.c: Likewise.
	* locale/strcoll.c: Likewise.
	* locale/strxfrm.c: Likewise.
	* locale/setlocale.c: Likewise.
	* resource/initialise.c: Likewise.
	* stdio/rename.c: Likewise.
	* sys/brk.c: Likewise.
	* sys/exec.c: Likewise.
	* sys/mman.c: Likewise.
	* sys/vfork.c: Likewise.
	* sys/syslib.c: Likewise.
	* time/strftime.c: Likewise.
	* time/stdtime.c: Likewise.
	* time/calendconv.c: Likewise.
	* time/broken.c: Likewise.
	* time/setitmr.c: Likewise.
	* time/gmtime.c: Likewise.
	* time/localtime.c: Likewise.
	* time/tzset.c: Likewise.
	* time/mktime.c: Likewise.
	* unix/dev.c: Likewise.
	* unix/tty.c: Likewise.
	* unix/rmdir.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/getcwd.c: Likewise.
	* unix/getenv.c: Likewise.
	* unix/pipe.c: Likewise.
	* unix/uname.c: Likewise.
	* unix/select.c: Likewise.
	* unix/unix.c: Likewise.
	* unix/setenv.c: Likewise.
	* unix/chdir.c: Likewise.

Tue Aug  7 17:44:26 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/_coredump.s (backtrack_reinstall_loop): Replace occurrances
	of the check for APCS32 with {config}=26.
	* signal/sigexec.s (__unixlib_exec_sigstack): Likewise.
	(__unixlib_exec_sigstack_bsd): Likewise.
	(__unixlib_exec_sig): Likewise.
	* unixlib/asm_dec.s (MACRO return): Likewise.
	(MACRO stackreturn): Likewise.
	* sys/_jmp.s (__longjmp_l1): Likewise.

Tue Aug  7 16:13:28 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* conform: New directory.  This is a testsuite extracted from
	glibc 2.2.3 that tests the conformancy of C library headers.
	
Tue Aug  7 10:07:03 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_swi.s (__swihack): New.  Missing from initial checkin.
	(_swihack_build): Likewise.

Tue Aug  7 09:14:12 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_swi.s: New file.
	* sys/os.h (_swi, _swix): Add function prototype.
	(_FLAGS, _IN, _INR, _OUT, _OUTR, _BLOCK, _RETURN, _C, _N, _Z): Add
	supporting macros.
	* Makefile (SYS_ASM): Add _swis.o.
	
Mon Aug  6 09:16:22 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* signal/_signal.s (__h_sigint): Unset escape condition flag
	if escape not pressed.
	(__h_cback): Tidy up.
	
Mon Aug  6 09:11:55 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/unix.c (convert_command_line): Fix off-by-one error
	when creating temporary buffer for command line args.

Sat Aug 04 15:29:12 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/exec.c (set_dde_cli): Don't use strchr.
	(execve): If called from `system' then cope when command and
	arguments all appear in argv[1].
	(__exret): Ensure process->argc is set to zero.
	* sys/vfork.c (__vfork): Set child->argc earlier so if we do
	have memory problems, we at least will have the opportunity to
	free the vector.

Sat Aug 04 11:46:43 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* time/times.c (times): Add NULL check on argument.
	* unix/tty.c (__ttyioctl): Fix the FIXMEs in TIOCGETP and TIOCSETP.
	
Thu Aug 02 09:22:31 2001  Nick Burrett  <nick@dsvr.net>

	* vfork.c: Unset debugging mode.

Thu Aug 02 15:55:07 2001  John Tytgat  <John.Tytgat@aaug.net>

        Removing clashing symbols between UnixLib and OSLib.
        * clib/sys/os.h (__os_cli): Renamed from os_cli.
        (__os_byte): Renamed from os_byte.
	(__os_word): Renamed from os_word.
        * sys/_os.s: Likewise.
        * unix/gethostnam.c: Renamed os_byte to __os_byte.
        * unix/tty.c: Likewise.
        * sys/exec.c: Renamed os_cli to __os_cli.
	* time/time.c: Renamed from os_word to __os_word.
	
Thu Aug 02 14:26:42 2001  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve, __exret): Revert last change.  Was infact
	an off-by-1 error.
	* sys/_syslib.s (__main): Extra indirection needed to correctly
	set __sigstk.
	* sys/_vfork.s (vfork): Change final stack return from EQ to AL.
	Was dropping through to __vret.
	* sys/debug.c (__debug): Add __sigstk and __sigstksize output.
	* sys/vfork.c (__vexit): Additional logging.

Tue Jul 31 12:32:14 2001  Nick Burrett  <nick@dsvr.net>

	* sys/exec.c (execve): ushift envp only if it already exists.
	(__exret): dshift envp only if it exists.

Tue Jul 24 17:11:43 2001  Nick Burrett  <nick@dsvr.net>

	* time/strftime.c (strftime): Call tzset -- reverts John Tytgat's
	change of 08-Nov-2000.

Mon Jul 23 16:30:46 2001  Peter Teichmann <teich-p@Rcs1.urz.tu-dresden.de>

	* time.h (struct tm): Change tm_zone to char*.
	* time/calendconv.c (__calendar_convert): Don't fixup tm_gmtoff,
	tm_isdst or tm_zone here.
	* time/ctime.c (ctime): Call tzset.
	* time/gmtime.c (gmtime): Set tm_gmtoff, tm_isdst and tm_zone.
	* time/localtime.c (localtime): Likewise.
	* time/mktime.c (mktime): Call tzset. Base tm_gmtoff, tm_zone
	and tm_isdst on values of tzname.
	* time/tzset.c (__tzname): Renamed from tzname.
	(tzname): New pointer version.
	(timezone, daylight): Zero-initialise.
	(tzset): Cope with 7 character time zone names.

Thu May 24 14:46:43 2001  Nick Burrett  <nick@dsvr.net>

	* sys/_alloca.s (__alloca): Use unconditional stackreturn
	otherwise we drop into __alloca_free.

Wed May  9 09:21:36 2001  Nick Burrett  <nick@dsvr.net>

	* signal/_signal.s: Add IMPORTs for __sigstk and __sigstksize.
	Remove IMPORT for __unixlib_exec_sig_interrupt.
	* objs/Makefile (SYS_ASM): Remove sys/_address.o

Thu May  3 08:35:46 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* unix/tty.c (__ttyiraw): Check appropriate file descriptor
	flag for O_NDELAY.
	(__ttyicanon): Likewise.  If buffer is empty and we're doing
	non-blocking I/O, return and set errno to EAGAIN.

Thu May  3 08:27:13 2001  Peter Naulls  <peter@erble.freeserve.co.uk>
			  Nick Burrett  <nick@dsvr.net>

	* unix/tty.c (__ttyioctl): Implement TIOCSETAW, TIOCSETAF,
	TIOCGPGRP, TIOCSPGRP, TIOCLGET, TIOCLSET, TIOCGETP, TIOCSETP,
	TIOCGETC, TIOCSETC, TIOCGLTC and TIOCSLTC.

Thu May  3 07:14:49 2001  Peter Naulls  <peter@erble.freeserve.co.uk>

	* sys/_os.s (os_console): Don't set input stream to listen on
	serial port.

Thu May  3 07:14:49 2001  Peter Naulls  <peter@erble.freeserve.co.uk>
			  Nick Burrett  <nick@dsvr.net>

	* signal/_signal.s (callback_signal): Use a semaphore to evade
	re-entrancy problems.  We cannot be certain about the size or
	state of the USR stack, so provide our own.  Merge the functionality
	of __unixlib_exec_sig_interrupt into here.
	(__h_event): Preserve flags on exit.
	(__h_cback, __cbflg): Clarify.
	* signal/sigexec.s (__unixlib_exec_sig_interrupt): Delete function.
	* sys/_syslib.s (__main): Reserve __sigstksize bytes for the
	callback_signal stack.
	(__sigstk): Define.
	(__sigstksize): Define.  Set default stack size of 4096 bytes.

Tue Jan  2 10:20:30 2001  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/coredump.c: Delete file.
	* sys/_address.s: Delete file.
	* unixlib/local.h (__address_valid): Delete decl.

Fri Dec 29 11:49:55 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_mem.s (__memcpy_cu_l1): Fix typo in return regs.
	* Docs/Changes: Delete file.

Thu Dec 21 15:07:42 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Do some of the leg-work required to support APCS-32.
	* unixlib/asm_dec.s (MACRO return): New MACRO.
	(MACRO stackreturn): New MACRO.
	* All assembler files: All files changed to use the MACROs return
	and stackreturn for function exit.

Wed Nov 29 12:40:26 2000  John Tytgat  <John.Tytgat@aaug.net>

	* stdio/scanf.c (vfscanf): fix for infinite loop when skipping spaces.
	Reading fixed length string did not consume enough input characters.
	(problem found by Vincent Lefevre)

Wed Nov 08 10:21:26 2000  John Tytgat  <John.Tytgat@aaug.net>

	* time/broken.c (__cvt_broken_time): Reduced stack requirements.
	Added workaround for month overflow problem in the Territory/UK module.
	* time/calendconv.c (__calendar_convert): Removed tzset call (not
	needed).
	* time/mktime.c (mktime): Likewise.
	* time/strftime.c (strftime): Likewise.
	* clib/time.h (mktime): argument "struct tm *" is not const.
	* time/mktime.c(mktime): argument "struct tm *" is not const and
	tm_wday & tm_yday are now correctly filled in (not in __tz variable).
	* unix/fstat.c (fstat): set regs[3] to zero too when it is not a
	RISC OS device.
	* unix/stat.c (stat): stat("/dev/null") didn't work.

Sun Aug 20 12:04:34 2000  John Tytgat  <John.Tytgat@aaug.net>

	* errno.c (errno): Remove volatile, for POSIX conformance.
	* sys/_syslib.s (__wimpprogram): Export.

Thu Aug 17 17:17:22 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Re-write command line and environment passing between processes.
	Arguments are now passed on the command line rather than both the
	command line and the proc structure.
	* sys/unix.h (struct proc): Delete clean_argv, clean_argb, envb, argb.
	Add envc and cli.
	* sys/debug.c (__debug): Fix for new proc structure and print
	environment vector.
	* sys/exec.c (__ushift): Comment.
	(execve): Use os_print for debugging.  Print environment vector.
	Re-write the code for building argv and envp for the child process.
	Cope properly with " and ' in arguments.  Don't copy new argv into
	struct proc - leave this task up to __unixinit.  Major tidyup.
	Don't prepend command line with a '/' because we won't be able to
	call RISC OS builtin commands.
	(__exret): Fixup for new struct proc.
	* sys/execl.c (execl): Initially allocate memory for 8 arguments.
	* sys/vfork.c (free_process): New function.
	(__vfork): Clean up.  Re-write argv and envp inheritance.
	Call free_process on error.
	(__vexit): Call free_process.  Tidy up.
	* sys/_exec.s: Annotate.  So that in the future I don't have such a
	hard time trying to figure out what it does.
	* unix/unix.c (__unixinit): Simplify because we know that the command
	line arguments are always taken from the CLI.
	Print a more descriptive error message when something serious fails.
	(__unixexit): More descriptive __debug statements.
	(find_terminator): Optimise function.
	(initialise_process_structure): Delete #if 0 code.
	(convert_command_line): Re-work now that we've changed struct proc.
	Cope with an infinite command line length.

	* sys/brk.c (brk, sbrk): Add some debugging code.
	* sys/execvp.c (execvp): Add some debugging code.
	* unix/features.c: Likewise.
	* unix/getenv.c (__chkenv, __addenv): Likewise.

	* unix/getcwd.c (getcwd): Change unixify_path call to a __unixify_std
	call.

Wed Jul  5 15:58:27 2000  John Tytgat  <John.Tytgat@aaug.net>

	* clib/errno.h (errno): Remove volatile, for POSIX conformance.
	* unix/fchmod.c: Remove garbade from header.

Mon Jul  3 12:31:38 2000  John Tytgat  <John.Tytgat@aaug.net>

	* sys/syslib.h (__wimpprogram): Declare.
	* unixlib/asm_dec.s (XWimp_ReadSysInfo): Define.
	* sys/_syslib.s: Initialise __wimpprogram.
	* time/getitmr.c (getitimer): Change test for __taskwindow to
	__wimpprogram.
	* time/setitmr.c (setitimer): Likewise.
	* signal/sleep.c (sleep): Likewise.
	* unix/unix.c (__stop_itimers): Likewise.

Mon Jul  3 12:19:27 2000  John Tytgat  <John.Tytgat@aaug.net>

	* common/unixify.c (unixify): Fix suffix swapping for "c.dev".

Mon Jul  3 12:14:10 2000  John Tytgat  <John.Tytgat@aaug.net>

	* !Help: Change "RiscOS" to "RISC OS".
	* qsort.c: Change PARANOID to __PARANOID.
	* common/unixify.c (__unixify): Filetype extension marker is
	a comma, not a dot.

Sat Jun 10 13:58:43 2000  John Tytgat  <John.Tytgat@aaug.net>

	Support `,xyz' RISC OS file type extensions on filenames.
	* dirent.h (telldir): Return __off_t.
	(struct __os_gbpb_10): New struct.
	(struct __dir_stream): Add suffix, dd_suf_off.  Change type of
	dir_cache and dir_cache_index to __os_gbpb_10.  Change do_read to
	__u_int.  Make dirent not a pointer.  Place conditionally in
	__UNIXLIB_INTERNALS.
	* unixlib/swiparams.h: New file.
	* unixlib/local.h (__sfixfind): Declare.
	(__RISCOSIFY_FILETYPE_EXT): Define.
	(__RISCOSIFY_FILETYPE_FFF_EXT): Define.
	(__RISCOSIFY_FILETYPE_NOTFOUND): Define.
	(__RISCOSIFY_FILETYPE_NOTSPECIFIED): Define.
	(__riscosify, __riscosify_std, __unixify): Add __filetype argument.
	(__unixify_std): Add declaration.
	* unixlib/asm_dec.s (USEFILEPATH): Define.
	* common/exist.c (__isdir): Add support for filetype extension.
	(__object_exists): Likewise.
	* common/riscosify.c (__sfixinit): Free previously allocated memory.
	(__sfixfind): Make global.
	(__riscosify_std): Add filetype argument.
	(__riscosify): Add filetype argument.  Support filetype extension.
	* common/serial.c (__get_file_ino): Support filetype extension.
	* common/uname.c (__uname): Likewise.
	* common/unixify.c (__unixify_std): New function.
	(__unixify): Add filetype argument.  Support filetype extension.
	* stdio/rename.c (rename): Support filetype extension.
	* unix/chdir.c (chdir): Likewise.
	* unix/chmod.c (chmod): Likewise.
	* unix/dev.c (__fsopen): Likewise.
	* unix/dirent.c (GBPB_FAKE_CURRENTDIR): Define.
	(GBPB_FAKE_PARENTDIR): Define.
	(GBPB_START_ENUM): Define.
	(GBPB_END_ENUM): Define.
	(GBPB_MAX_ENUM): Define.
	(newstream, opendir, readdir_r, readdir): Support filetype extension.
	(telldir, seekdir, rewinddir, closedir): Likewise.
	* sys/exec.c (execve): Fix call to __riscosify.
	* unix/fstat.c (fstat): Support filetype extension.
	* unix/mkdir.c (mkdir): Likewise.
	* unix/rmdir.c (rmdir): Likewise.
	* unix/stat.c (stat): Likewise.
	* unix/unlink.c (unlink): Likewise.
	* unix/utime.c (utime): Likewise.
	* unix/getcwd.c (unixify_path): Delete function.
	(getcwd): Call unixify_std instead.
	* unix/truncate.c (truncate): Fix call to __riscosify_std.

Sat Jun 10 09:58:21 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Prevent compiler warnings.
	* math/j0.c (pzero, qzero): Initialise p and q.
	* math/j1.c (pone, qone): Likewise.
	* math/jn.c (jn, yn): Likewise.
	* math/lgamma_r (lgamma_r): Initialise temp.
	* math/log1p.c (log1p): Initialise f, c and hu.
	* math/rem_pio2.c (rem_pio2): Initialize z.
	* strtod.c (Storeinc): Add parentheses.
	(__dtoa): Initialise ilim, ilim1, spec_case, mlo.
	* sys/syslib.h (__resource_initialise): Delete declaration.
	(__unixlib_signal_initialise): Delete declaration.
	* stdio/stdio.c: Include stdlib.h.
	* wchar.h: Disable inline functions.
	* wchar/wcstok.c (wcstok): Fix ambiguous else warning.  Uncomment
	__set_errno.

Sat Jun 03 16:21:34 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* wchar/btowc.c: New file.
	* wchar/mbrlen.c: New file.
	* wchar/mbrtowc.c: New file.
	* wchar/mbsinit.c: New file.
	* wchar/mbsnrtowcs.c: New file.
	* wchar/mbsrtowcs.c: New file.
	* wchar/wcpcpy.c: New file.
	* wchar/wcpncpy.c: New file.
	* wchar/wcrtomb.c: New file.
	* wchar/wcscat.c: New file.
	* wchar/wcschr.c: New file.
	* wchar/wcscmp.c: New file.
	* wchar/wcscoll.c: New file.
	* wchar/wcscpy.c: New file.
	* wchar/wcscspn.c: New file.
	* wchar/wcsdup.c: New file.
	* wchar/wcslen.c: New file.
	* wchar/wcsncat.c: New file.
	* wchar/wcsncmp.c: New file.
	* wchar/wcsncpy.c: New file.
	* wchar/wcsnrtombs.c: New file.
	* wchar/wcspbrk.c: New file.
	* wchar/wcsrchr.c: New file.
	* wchar/wcsrtombs.c: New file.
	* wchar/wcsspn.c: New file.
	* wchar/wcsstr.c: New file.
	* wchar/wcstod.c: New file.
	* wchar/wcstof.c: New file.
	* wchar/wcstok.c: New file.
	* wchar/wcstol.c: New file.
	* wchar/wcstold.c: New file.
	* wchar/wcstoq.c: New file.
	* wchar/wcstoul.c: New file.
	* wchar/wcstouq.c: New file.
	* wchar/wcswidth.c: New file.
	* wchar/wcsxfrm.c: New file.
	* wchar/wctob.c: New file.
	* wchar/wcwidth.c: New file.
	* wchar/wmemchr.c: New file.
	* wchar/wmemcmp.c: New file.
	* wchar/wmemcpy.c: New file.
	* wchar/wmemmove.c: New file.
	* wchar/wmemset.c: New file.
	* wchar.h: New file.
	* Makefile (WCHAR): Add new files.

Sat Jun 03 16:26:06 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* fenv.h (fesetexceptflag): Use const rather than __const.
	* math/exp2.c: Include stdlib.h.
	* complex.h: For Acorn C compiler, define _Complex, __real__,
	__imag__ and __complex__ to empty strings.  This is simply to
	get Acorn C to compile UnixLib rather than make a working complex
	math library.
	* complex/conj.c (conj): Hack compilation for Acorn C.
	* !Help: Add a note warning of a broken complex library.

	* Docs/ReadMe38: Updated.

Sat Jun 03 15:53:18 2000  John Tytgat  <John.Tytgat@aaug.net>

	* fenv.h (fesetenv, feupdateenv): Use const rather than __const.
	* unix/write.c (write): Change __FEATURE_DEV_PIPE to __FEATURE_PIPEDEV.
	* unix/dev.c: Include string.h.

Sat Jun 03 15:44:21 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c: Undefine DEBUG.
	* signal/post.c (__unixlib_internal_post_signal): Use os_print for
	debug messages rather than printf.  This cleans up the display when
	running UnixLib with full debug.
	(__unixlib_raise_signal): Likewise.
	* signal/setup.c (__unixlib_setup_sighandler): Likewise.
	* signal/sigprocmsk.c (sigprocmask): Likewise.
	* signal/sigsuspend.c (sigsuspend): Likewise.
	* signal/sleep.c (sleep): Likewise.
	* common/riscosify.c (__sfixinit): Likewise.
	(__riscosify): Likewise.  Inline the assert call.
	(__eprintf): Delete function.
	* signal/siginfo.c (__unixlib_siginfo_handler): Merge os_nl into
	os_print.

Sat Jun 03 15:26:46 2000  Nick Burrett  <nick.burrett@btinternet.com>

	Remove command line length restriction - based on the work originally
	done by John Tytgat <John.Tytgat@aaug.net>.
	* unix/unix.c (__unixinit): Use a malloc buffer for the incoming
	command string.
	(create_process_structure): Don't malloc buffers for argv and argb
	here.
	(convert_command_line): Check argc doesn't exceed
	`command_line_size >> 1'. This should make it parse many one character
	arguments.
	(check_io_redir): Renamed from check_for_io_redirection.  Function
	re-written to remove code duplication and simplified.
	(get_io_redir): Created from check_for_io_redirection.
	(verify_redirection): Return an int.  Simplified.
	(find_redirection_type): Re-write.
	(initialise_unix_io): Tidy code.  When allocating an fd for stderr,
	directly access the fd array rather than using __alloc_file_descriptor.
	* sys/param.h (MAXCOMMANDLEN): Delete.
	* sys/exec.c (execve): Use command line length to create the buffer
	space for `cli'.  Remove check for length exceeding MAXCOMMANDLEN.
	Stipulate that __codeshift must be greater than command line length.
	* sys/execlp.c (execlp): Remove MAXCOMMANDLEN restriction.
	* sys/execle.c (execle): Likewise.
	* sys/execl.c (execl): Likewise.
	* sys/syslib.h (__resource_initialise): Delete decl.
	(__unixlib_signal_initialise): Delete decl.

	Fix compiler errors.
	* math.h (fpclassify): Remove splurious semi-colon.
	(fma, fmin, fmax, fdim, log2, lrint, llrint): Likewise.
	(nearbyint, trunc, signbit): Likewise.
	* signal/_signal.s: Use errno rather than __errno.

	Code clean up.
	* resource/initialise.c (__resource_initialise): Take struct proc
	as an argument. Re-write function to set variables in that argument
	rather than the global __u.
	* signal/init.c (__unixlib_signal_initialise): Likewise.
	* unix/unix.c (create_process_structure): Take no argument.  Return
	a struct proc as the result instead of directly writing to __u.
	(initialise_process_structure): Simplified.
	(__unixinit): Re-written and simplified, reducing code duplication.
	(find_terminator): Return a const char*.

	* !MKDir: Create directories for complex, math-asm, scl and string.
	* objs/Makefile (CCfeatures): Define as empty.

Sat Jun 03 13:20:28 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* signal/signame.c (__unixlib_internal_signame_init): Delete function.
	(sys_siglist): Statically define signals in here.
	* unixlib/sigstate.h (__unixlib_internal_signame_init): Delete decl.

	* locale/ctypetable.c (__build_ctype_tables): Optimised.

Wed Jan 12 16:55:36 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* inttypes.h: New header file.
	* stdint.h: New header file.
	* strtoimax.c: New file.
	* strtoumax.c: New file.
	* strtoll.c: New file.
	* strtoull.c: New file.

	* math.h: Add GCC __const__ attribute to some functions.

Wed Jan 12 16:50:51 2000  Nick Burrett  <nick.burrett@btinternet.com>

	* unix/features.c (features): Check UnixEnv$prog$sfix and initialise
	riscosify.
	(__sfix_default): Define.
	* unix/unix.c (__unixinit): Remove call to __riscosify_init.
	* common/riscosify.c (__sfix_default): Move to features.c.
	(__riscosify_init): Delete function.
	(__sdirinit): Rename from sdirinit and make globally accessable.
	(__sfixinit): Rename from sfixinit and make globally accessable.
	(sfix_hash): Declare inline for GCC.

	* sys/_syslib.s (__real_break): Declare here.
	* sys/brk.c (__real_break): Declare extern.
	
	* stdio/freopen.c (freopen): Set EINVAL if filename is NULL.

	* signal/signame.c (sys_siglist): Define signals at compile time.
	(__unixlib_internal_signame_init): Delete.
	* sys/syslib.c (_main): Don't call __unixlib_internal_signame_init.

	* sys/_exec.s (__exec_rtn_corrupt): Call _exit rather than abort.

	* unix/unix.c (initialise_unix_io): Inline fcntl call to duplicate
	the stdout file descriptor.
	(check_fd_redirection): Inline fcntl file descriptor duplication call.
	* stdio/fopen.c (fdopen): Inline fcntl call.
	* stdio/tmpfile.c (tmpfile): Likewise.
	* stdio/newstream.c (__getmode): Initialise mptr using a cast rather
	than call memset. Replace switch statements with if..elseif for
	improved code generation. Remove final real/write sanity check.
	* stdio.h (__getmode): Alter decl. appropriately.

	* unix/dev.c (__fslseek): Tidy up.
	(__pipewrite): Likewise.
	(__pipeclose): Likewise.
	(__fsclose): Likewise.
	
	* sys/unix.h (__unixlib_fatal): Add GCC's __noreturn__ attribute.
	
	* sys/brk.c (brk): Inline getrlimit call.
	
	* stdio/freopen.c (freopen): Check validity of `mode' here.
	* stdio/fopen.c (fopen): Likewise.
	* stdio/newstream.c (__getmode): Remove check for mode == NULL.
	Change return type to __io_mode; remove __io_mode parameter.

Thu Nov 18 12:25:07 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* math/llrint.c: Only GCC can compile this file.
	* math/llround.c: Likewise.
	* math.h (llround): Declare.

Thu Nov 18 12:18:07 1999  Nick Burrett  <nick.burrett@btinternet.com>

	Move SharedCLibrary functions to their own directory.
	* scl: New directory.
	* scl/_kernel.s: Moved from directory sys.
	* scl/_kgetenv.s: Likewise.
	* scl/_kosargs.s: Likewise.
	* scl/_kosbget.s: Likewise.
	* scl/_kosbput.s: Likewise.
	* scl/_kosbyte.s: Likewise.
	* scl/_koscli.s: Likewise.
	* scl/_kosfile.s: Likewise.
	* scl/_kosfind.s: Likewise.
	* scl/_kosgbpb.s: Likewise.
	* scl/_kosrdch.s: Likewise.
	* scl/_kosword.s: Likewise.
	* scl/_koswrch.s: Likewise.
	* scl/_ksetenv.s: Likewise.
	* scl/_kswi_c.s: Likewise.
	* scl/_memchk.s: Likewise.

	* kernel.h (_kernel_current_stack_chunk): Declare.
	* scl/_kcurskch.s: New file. Implement it.

	* complex.h: Add missing header file.

Tue Nov 16 13:45:59 1999  John Tytgat  <John.Tytgat@aaug.net>

	* time/setitmr.c (add_ticker): Time for OS_CallAfter was wrongly
	calculated.
	* signal/sleep.c (sleep): Don't block forever when called in a
	Taskwindow due to alarm not working.

Tue Nov 16 13:33:50 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* math-asm/_sincos.s: New file.
	* math.h (__sincos): If __UNIXLIB_INTERNALS then declare __sincos.

	* unixlib/math.h (signbit, copysign, finite): If __GNUC__ and
	optimising then define inline versions of these functions.

	* complex.h: New header file.
	* complex/cabs.c: New file.
	* complex/cacos.c: New file.
	* complex/cacosh.c: New file.
	* complex/carg.c: New file.
	* complex/casin.c: New file.
	* complex/casinh.c: New file.
	* complex/ccos.c: New file.
	* complex/ccosh.c: New file.
	* complex/cexp.c: New file.
	* complex/cimag.c: New file.
	* complex/clog.c: New file.
	* complex/clog10.c: New file.
	* complex/conj.c: New file.
	* complex/cpow.c: New file.
	* complex/cproj.c: New file.
	* complex/creal.c: New file.
	* complex/csin.c: New file.
	* complex/csinh.c: New file.
	* complex/csqrt.c: New file.
	* complex/ctan.c: New file.
	* complex/ctanh.c: New file.

Tue Nov 16 13:30:56 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* Docs/Copyright: New file.

	* math-asm: New directory. Move all files from math/*.s here
	to workaround RISC OS 77 file directory limit.
	* Makefile: Updated.

	* fenv.h: New header file.
	* math-asm/_flrexcpt.s: New file.
	* math-asm/_fegetenv.s: New file.
	* math-asm/_fegetrnd.s: New file.
	* math-asm/_feholdexc.s: New file.
	* math-asm/_fesetenv.s: New file.
	* math-asm/_fesetroun.s: New file.
	* math-asm/_fraiseexc.s: New file.
	* math-asm/_fsetexcpt.s: New file.
	* math-asm/_ftstexcpt.s: New file.
	
	* math.h: Include machine/nan.h.
	(FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL): Define.
	(fpclassify): Declare.
	(FP_ILOGB0): Define.
	(FP_ILOGBNAN): Define.
	(isfinite): Define.
	(isnormal): Define.
	(isgreater, isgreaterequal): Define.
	(isless, islessequal): Define.
	(islessgreater): Define.
	(isunordered): Define.
	* math/fpclassify.c: New file.
	* math/fma.c: New file.
	* math/fmin.c: New file.
	* math/fmax.c: New file.
	* math/fdim.c: New file.
	* math/lrint.c: New file.
	* math/llrint.c: New file.
	* math/log2.c: New file.
	* math/nearbyint.c: New file.
	* math/remquo.c: New file.
	* math/trunc.c: New file.
	
	* math/exp.c: New file.
	* math/exp2.c: New file.
	* math/exp10.c: New file.
	* math/t_exp.c: New file.
	* math/round.c: New file.
	* math/lround.c: New file.
	* math/llround.c: New file.
	* math-asm/_signbit.s: New file.
	* machine/huge_val.h (HUGE_VALL): Renamed from HUGE_VALl.
	(HUGE_VALF): Renamed from HUGE_VALf.

Tue Nov 16 13:25:15 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/dev.h (struct dev): Change `open' return type to void*.
	(__fsopen, __ttyopen, __pipeopen, __sockopen): Fix accordingly.
	(__nullopen): Likewise.
	* unix/dev.c (__fsopen, __ttyopen, __pipeopen): Likewise and
	ensure all return types are cast to void*.
	(__sockopen, __nullopen): Likewise.
	* unix/tty.c (__ttyopen): Likewise.
	* unix/open.c (__open): Recognise that `open' now returns void*.

	* unixlib/fd.h (struct __unixlib_fd): Make `dflag' 16 bits,
	saving 4 bytes per file descriptor.
	(__alloc_file_descriptor): Wrap in `__UNIXLIB_INTERNALS'.
	* unix/dev.c (__fsopen): If file is a directory then use `opendir'.
	(__fsclose): If file is a directory then use `closedir'.
	(__fsread): If file is a directory then use `readdir_r'.
	* unix/fstat.c (fstat): Handle file canonicalisation when file
	is a directory.

	* common/riscosify.c (__riscosify): RISC OS pathname `@.c' was
	incorrectly translated to `@./c'.

	* unixlib/features.h: Make macros re-definable at compile time.
	* unix/dev.c (__FEATURE_*): Make macro checks #if rather than a
	#ifdef/#ifndef check.
	* stdio.h: Likewise.
	* dirent.h: Likewise.

	* common/attrib.c (__set_protection): Re-write to open up better
	optimisation by the compiler.
	(__get_protection): Likewise.
	
	* sys/os.c (__seterr): Inlined string copy to remove function
	prologue overhead and re-ordered lines for better opimisation by
	the compiler.
	
	* unix/unix.c (initialise_unix_io): Replace `dup' with `fcntl'.
	(check_fd_redirection): Replace `dup2' with `fcntl'.
	
	* unix/write.c (write): Raise SIGPIPE if __FEATURE_DEV_PIPE is
	defined.

	* math/drem.c: New function.

	* strsep.c (strsep): Don't return NULL if begin[0] is 0.
	* strtoul.c (strtoul): If the input is negative, then return 1 minus
	the result, rather than returning EINVAL.

Fri Sep 24 16:38:35 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/syslib.h (__ALLOCA_FATAL, __PARANOID): Move macro definitions
	from here
	(__DYNAMIC_AREA, __4K_BOUNDARY, __USEFILEPATH): Likewise
	* unixlib/features.h: ... to here. New file.
	(__INTEGRITY_CHECK): New macro - define it by default.
	(__FEATURE_ITIMERS): New macro.
	(__FEATURE_SOCKET): New macro.
	(__FEATURE_PIPEDEV): New macro.
	* stdio.h: Include unixlib/features.h.
	(__validfp): Define as 1 if `__INTEGRITY_CHECK' is undefined.
	* dirent.h (__validdir): Likewise.
 	* stdio/newstream.c (__newstream): Replace `__validfp' check with an
 	inline version.

	* sys/syslib.c (_exit): Remove `COMPLETE_CRAP' code.

	* sys/vfork.c (__vexit): Call `__stop_itimers' only if
	`__FEATURE_ITIMERS' is defined.
	* sys/exec.c (execve): Likewise.
	* sys/syslib.c (_exit): Likewise.
	* unix/unix.c (__unixexit): Likewise.

	* sys/alarm.c (alarm): If `__FEATURE_ITIMERS' is undefined then
	set `errno' to ENOSYS and return.
	* time/setitmr.c (setitimer): Likewise.
	* unix/pipe.c: Likewise.

	* unix/unix.c (__stop_itimers): Define if `__FEATURE_ITIMERS' is
	defined.
	* time/setitmr.c (remove_ticker, add_ticker): Likewise.
	(check_ticker, struct timer_control): Likewise.

	* unix/dev.c (__dev): Include __pipe* function pointers only if
	`__FEATURE_PIPEDEV' is defined.
	Include __sock* function pointers only if `__FEATURE_SOCKET' is
	defined.
	(__pipeopen): Define if `__FEATURE_PIPEDEV' is defined.
	(__pipeclose, __piperead, __pipewrite, __pipelseek): Likewise.
	(__pipeioctl, __pipeselect): Likewise.
	(__sockopen): Define if `__FEATURE_SOCKET' is defined.
	(__sockclose, __sockread, __sockwrite, __socklseek): Likewise.
	(__sockioctl, __sockselect): Likewise.
	
	* sys/_udiv.s: Fix typo in C$code.
	
	* signal/_coredump.s (__write_corefile): We output a stack backtrace
	rather than an corefile.
	* signal/post.c (__unixlib_internal_post_signal): `sigwakeup' doesn't
	do much, so inline it.

Fri Sep 21 12:19:15 1999  John Tytgat  <John.Tytgat@barco.com>

	* common/unixify.c (__unixify): Fix the return values that would
	otherwise break `getcwd'.

Tue Sep 21 11:45:41 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* stdio.h (TMP_MAX): Reduce size to fit into a signed 32-bit
	type.

Tue Sep 21 11:38:03 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_os.s (os_prdec): New function.
	* sys/os.h (os_prdec): Declare.
	* unixlib/asm_dec.s (XOS_ConvertInteger1): Define.
	(XOS_ConvertInteger2, XOS_ConvertInteger3): Define.
	(XOS_ConvertInteger4): Define.
	* unix/write.c: Minor debug statement improvements.
	* unix/dev.c: Likewise.
	* stdio/flsbuf.c: Likewise.
	* stdio/fwrite.c: Likewise.
	* stdio/fpos.c: Likewise.
	* stdio/freopen.c: Likewise.
	* stdio/fopen.c: Likewise.
	* stdio/fclose.c: Likewise.
	
	* stdio/fpos.c (ftell): On streams open for read/write, flush the
	output buffer before attempting to calculate the file position.
	
	* Changelog: Tidy up.

Fri Aug 20 09:28:15 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* gcccompat/_udivdi3.s: New file.
	* gcccompat/_umoddi3.s: New file.
	* gcccompat/_divdi3.s: New file.
	* gcccompat/_moddi3.s: New file.

Wed Aug 01 13:02:06 1999  Nick Burrett  <nick.burrett@btinternet.com>

	* stddef.h (NULL): Remove cast to void *.
	* errno.h (errno): Define if not already defined.
	Declare `errno' and defined `__errno' as a macro to point to it.
	(ED, EIEIO): Removed.
	* unixlib/asm_dec.s (__set_errno): Use `errno'.
	(__get_errno): Define.
	* netlib/_net_error.s: Import `errno'.
	* sys/errlist.c: Remove ED and EIEIO.
	* netlib/htonl.s: Remove embedded function name.
	* netlib/htons.s, netlib/ntohl.s, netlib/ntohs.s: Likewise.

Tue Jul 27 21:09:00 1999 CL0085
John Tytgat <John.Tytgat@barco.com>

	* sys/syslib.h: Add RISC OS 4 version identifier

Tue Jul 27 21:09:00 1999 CL0084
John Tytgat <John.Tytgat@barco.com>

	* kernel.h (_kernel_oscli): Add prototype.

Thu May 06 20:00:00 1999 CL0083
Simon Callan <simon@callan.demon.co.uk>

	* Add small test programme, and build for release.

Mon Feb 15 20:00:00 1999 CL0082
Simon Callan <simon@callan.demon.co.uk>

	* Correct small problem with make file

Sun Jan  3 16:04:11 1999 CL0081
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/features.c: New file.
	* sys/unix.h (__runtime_features): Declare.
	* unix/unix.c (__unixinit): Call it.
	* Makefile: Added unix/features.c.

	* stpcpy.c (stpcpy): Add parentheses to remove GCC warnings.
	* strcat.c (strcat): Likewise.
	* strcpy.c (strcpy): Likewise.
	* strcspn.c (strcspn): Likewise.
	* strncat.c (strncat): Likewise.
	* strpbrk.c (strpbrk): Likewise.
	* strspn.c (strspn): Likewise.
	* termcap.c (tgetent): Re-arrange code to remove GCC warnings.
	(t_tentcp, tgetnum, tgoto, tputs): Likewise.
	* common/riscosify.c (def_map): Likewise.
	(__sfixfind): Re-ordered 'if' logic.
	(__sfix_default): Add 'ii'.
	(__riscosify): Case 'char' subscripts to 'unsigned char'.
	(everywhere): Formatting changes.
	* stdio/rename.c (rename): Re-arrange code to remove GCC warnings.
	* stdio/tmpfile.c (generate_temporary_filename): Likewise.
	* sys/debug.c (__debug): Likewise.
	* sys/exec.c (execve): Likewise.
	* unix/dirent.c (readdir_r): Likewise.
	* unix/getenv.c (__addenv): Likewise.
	* unix/unix.c (convert_command_line): Likewise.

	* unix/select.c (select): Use 'clock' to read the monotonic time.

	* Docs/ReadMe: New file.
	* Docs/ReadMe38: Updated.

Sat Dec 12 12:32:09 1998 CL0080
Nick Burrett  <nick.burrett@btinternet.com>

	* alloc.c (RISCOS_CCBUG): Don't define if compiling with GCC.
	* stdio.h: Don't use pragmas if compiling with GCC.
	* signal/_coredump.s (backtrace_register_dump_loop_end): Use a
	number instead of a string in SWI OS_WriteI expression.
	(backtrace_print_function_name_found): Likewise.

Wed Oct 07 21:05:15 1998 CL0079
Nicholas Clark <nick@unfortu.net>

	* stdio/perror.c: For a null pointer perror() is supposed to print only
	the error message, not treat the null pointer as a null string.

Sun Oct 04 22:25:31 1998 CL0078
Nicholas Clark <nick@unfortu.net>

	* stdio/fread.c: Was adding (bytes read) to file offset for reads
	satisfied from stdio buffer. Result was that fseek SEEK_CUR (and ftell)
	would be wrong position in file.
	* stdio/fwrite.c: Likewise.

Thu Sep 24 20:47:00 1998 CL0077
Nicholas Clark <nick@unfortu.net>

	* clib/sys/dev.h: Prototype for __pipeselect()
	* unix/dev.c (__pipeselect): Check if there is data in the pipe ready
	to read.
	* unix/dev.c (__pipewrite): Allow more data to be written to a pipe
	after reading data has commenced.

Thu May 07 14:45:47 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* sys/_alloca.s: Reorder LDR to optimise for StrongARM
	* sys/_exec.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_vfork.s: Likewise.

Sun Jun 21 19:36:45 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* unix/getenv.c (__getenv_from_os): Free buffer and call malloc
	again, to save unnecessary copying of (garbage) contents.

Thu Jul 23 14:17:44 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (sfixinit, __sfixfind): Replaced binary search
	lookup with array of linked lists keyed by a hash function. Clearer,
	smaller, presumably faster and avoids OS_HeapSort. Why did I implement
	binary search in the first place?

Fri Jul 24 10:40:07 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* signal/_signal.s: Removed two gramatically incorrect "'"s spotted
	by Peter Naulls.
	* sys/os.h: RISC OS not RiscOS in comment.
	* sys/dev.h: Likewise.
	* sys/syslib.h: Likewise.
	* stdio/rename.c: Likewise.

Sun Jul 26 23:58:14 1998 CL0076
Nicholas Clark <nick@unfortu.net>

	* signal/_coredump.s: 3 should be 12 (ie 3 * 4) in the definitions of
	__calling_environment_end and __c_environment_end as you don't get
	pointer arithmetic in assembler. Second LDR ip was actually ADR ip.

Fri Jun 05 18:12:47 1998 CL0075
Nick Burrett  <nick.burrett@btinternet.com>

	* math/_ldexp.s: Second parameter is an int, not a double.
	* clib/termios.h (__TERMIOS_H): Rename from _TERMIOS_H.

Sat May 09 15:37:33 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* clib/sys/unix.h: Add clean_argb and clean_argv to process struct
	* sys/debug.c: Dump clean_argv and clean_argb
	* sys/exec.c (execve): Reset clean_argv and clean_argb
	* sys/vfork.c (__vfork): Create child argv from clean_argv
	* unix/unix.c (convert_command_line_): Create clean_argv and
	clean_argb

Thu May 07 14:45:47 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* clib/unixlib/asm_dec.s: Correct typos in comments.
	* netlib/_net_error.s: Spotted spelling mistake in comment
	* signal/_coredump.s: Reorder LDR to optimise for StrongARM
	* signal/_signal.s: Likewise.
	* sys/_alloca.s: Likewise.
	* sys/_exec.s: Likewise.
	* sys/_jmp.s: Likewise.
	* sys/_syslib.s: Likewise.
	* sys/_vfork.s: Likewise.
	* strchr.c: BUG fixed - now casts to (char)
	* strrchr.c: Likewise.
	* memchr.c: Likewise.

Mon May 04 15:13:08 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* sys/syslib.c: Replace (r) by (return_code) inside #ifdef DEBUG
	* unix/tty.c (__ttyrc): Ensure '\r' is actualy output, else "\r\n"
	sent to tty appears as "\n". ("\n\r" output as "\n\r" with and without
	this change)

Sun May 03 16:22:49 1998 CL0074
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (__riscosify): Add check so that
	"<GCC$Dir>.foo" and "<GCC$Dir>/foo" both convert to "<GCC$Dir>.foo"
	* unix/getenv.c (__getenv_from_os): When failing to read macro
	variable expansion due to buffer overflow r[2] not always equal to 2.
	Changed buffer overflow check to test that error number is 0x1E4
	* sys/_syslib.s (__main): Do not assume *anything* about
	registers when XOS_DynamicArea or XOS_ChangeEnvironment fail. Minor
	optimisations to exit_with_error and CallASWI check.

Thu Apr 30 17:42:08 CL0073
1998 Nicholas Clark <nick@unfortu.net>

	* termios/tcsetattr.c: Cast (char) -1 in error check after loop that
	searches __bsd_speeds[].
	* termios/cfsetispeed.c: New file.
	* termios/cfsetospeed.c: New file.
	* termios/cfsetispeed.c: New file.
	* termios/cfsetospeed.c: New file.
	* sys/syslib.c: Remove call to __resource_initialise() - 1) at this
	point the call attempts to use undefined values, 2) it is called
	later in unix/unix.c.

Mon Jan 12 22:53:48 CL0072
1998 Nicholas Clark <nick@unfortu.net>

	* sys/_os.s(os_prhex): Re-written - 3 words shorter, 1 loop removed.
	* sys/_syslib.s(__main): Revised code to generate dynamic area name -
	code output unchanged but new algorithm somewhat shorter
	* clib/unixlib/asm_dec.s: Added XOS_WriteI
	* signal/_coredump.s: replaces sys/coredump.c
	* signal/_signal.s(__core): moved to _coredump.s to allow a tail
	optimisation.
	* signal/coredump.c: Re-written in assembler - deleted

Sun Jan 11 17:35:24 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* signal/_signal.s: Store sp in callback handler *without* write back.

Thu Jan 08 17:26:49 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c: Moved __riscosify_control to separate file
	* common/riscosifyc.c: __riscosify_control

Sat Jan 03 00:10:25 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* sys/_os.s os_swi: use lr rather than fp to load registers (save on
	stack over SWI so SVC safe) - preserves fp for stack backtrace if SWI
	causes a signal.

Fri Jan 02 00:49:15 1998 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/riscosify.c (__riscosify): Code to find end of disc name
	now more sophisticated - recognises ".$" and '/', and can reliably
	detect full native pathnames.

Fri Dec 26 15:34:24 1997 CL0071
Nicholas Clark <nick@unfortu.net>

	* common/stat.c: set X bit from R bit for all filetypes except Text and
	Data.

Thu Dec 25 12:00:00 1997 CL0071
Nicholas Clark  <nickc@liv.ac.uk>

	* unix/dev.c __fsopen: if OS_File 18 fails to create file explicitly
	check whether parent dir exists before reporting ENOENT.
	* unix/select.c select: do not assume that fd_set pointers passed in
	actually point to full length structs when writing results.

Sat Dec 20 19:40:05 1997 CL0070
Nick Burrett  <nick.burrett@btinternet.com>

	* pwd/fgetpwentr.c: New file.
	* pwd/getpwuid_r.c: New file.
	* pwd/getpwnam_r.c: New file.
	* pwd/getpwent.c (getpwent_r): New function.
	* pwd/getlogin.c (getlogin): Use re-entrant pwd functions and store
	the login name statically.
	* termios/cuserid.c: New file.
	* clib/unistd.h (L_cuserid): Defined.
	* clib/pwd.h: Add re-entrant functions.

Wed Jan 28 21:05:00 1998 CL0069
Simon Callan <simon@callan.demon.co.uk>

	* clib/sys/sockio.h: Remove reference to <sys/iocomm.h>
	* netlib/socket.c: Remove reference to <sys/filio.h>
	* sys/vfork.c: Include <termios.h>, not <termio.h>

Mon Dec 08 00:59:31 1997 CL0068
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/assert.h: Allow multiple inclusion as required by the standard.

	* clib/ctype.h (isascii): Correct parentheses for operand precedence.

	* clib/netinet/in.h: Declare INADDR_NONE. Add some BSD protocols.
	Add declarations of standard well-known ports.
	(struct ip_opts): Declare.
	Include sys/byteorder.h.

	* netlib/ntop.c: Use __set_errno.

	* netlib/pton.c: Use __set_errno.
	(inet_pton4): Update to version 8.7 from Internet Software Consortium.

	* netlib/inet_aton.c: Use inet_pton.
	* netlib/inet_addr.c: Likewise.

	* sys/_syslib.s: Place _kernel_fpavailable back in C$$Code to fix
	assember errors with ObjASM 3.

	* sys/mman.c: Remove causes of 'use of = in a condition' warnings.
	Correct parentheses in usage of & and == in expressions.
	* time/time.c: Likewise.

	* unix/dirent.c (readdir_r): Do not write past the end of the d_name
	buffer. Increase cache for reading directories to 1K.

	* unix/ioctl.c: Remove #include <termio.h>.

Wed Dec 03 23:27:56 1997 CL0067
Nick Burrett  <nick.burrett@btinternet.com>

	* common/riscosify.c (sdirinit): Remove 'use of = in condition' warning.
	(sfixinit): Likewise.
	(sdirseg): Likewise.
	(__riscosify): Likewise.

	* unix/open.c (ttyname): Only return /dev/tty if fd is a terminal.

	* sys/_syslib.s (C$$data): Re-arrange and enforce a strict structure.
	(__main): Optimise for the new data structure arrangement.
	(__rt_stkovf_split_small): Likewise.
	(__rt_stkovf_split_big): Likewise.
	(error_table): New table
	(exit_with_error): Fix for ObjASM 3 bug. Pass an index into error_table.
	(NO_MEMORY): New define.
	(NO_CALLASWI): New define.
	(no_old_area, no_dynamic_area): Remove underscores for local names.
	(da_found, exit_word, dynamic_deletion): Likewise.
	(dynamic_area_name_end): Likewise.
	(_kernel_fpavailable): Place in its own AREA.
	* clib/sys/syslib.h (__main): Remove declaration.

	* clib/termios.h: Re-written.
	* clib/sys/ioctl.h: Integrate clib/sys/{fileio, sockio, iocomm}.h.
	* clib/sys/{fileio, sockio, iocomm}.h: Removed.
	* clib/termio.h: Display compiler error, if included.
	* clib/sgtty.h: New header file.
	* clib/stdio.h (L_ctermid): Define macro.
	(ctermid, cuserid): Remove enclosing #if 0
	* termios/{ctermid, cuserid, gtty, stty, tcdrain, tcflow}.c: New file.
	* termios/{tcflush, tcgetattr, tcgetpgrp, tcsendbrk}.c: New file.
	* termios/{tcsetattr, tcsetpgrp}.c: New file.
	* termcap.c: Include termios.h, not termio.h.

	* clib/sys/tty.h (tty): Use structure termios.
	Include termios.h, not termio.h.
	Include sys/ioctl.h.
	* unix/tty.c (everywhere): Support header file termios.h.
	Replace XTABS with OXTABS.
	(__ttyopen): Remove cc array. Use ttydefchars instead. Set __ispeed
	and __ospeed.
	(__ttyicanon): Don't recognise flag ONLRET.
	(__ttywrite): Don't recognise flag OLCUC.
	(__ttyinput): Don't recognise flag IUCLC.
	(__ttycr): Don't recognise flag OCRNL and ONOCR.
	(__ttyopen): Remove setting of c_line.
	* unix/unix.c. Use the header file termios.h.

	* unix/tty.c (__ttyioctl): Re-written, ready to provide more support
	for tty ioctls.
	(__ttyioctl, case TIOCEXCL): Do nothing.
	(__ttyioctl, case TIOCNXCL): Likewise.
	(__ttyioctl, case TIOCFLUSH): Flush input/output buffers.
	
	* unix/tty.c (__ttyiraw): Set variables iflag, oflag and lflag to type
	tcflag_t.
	(__ttyicanon): Likewise.
	(__ttywrite): Set variables oflag, lflag to type tcflag_t.
	(baud_map): New structure.
	(baud_rate): New array.
	(convert_baud_rate): New function.
	(__tty_423_sterm): Rename variable c to control.
	Make variable i type tcflag_t and rename to cflag.
	Remove array __ttybaud; use convert_baud_rate instead.
	(__ttyinput): Change argument iflag to type tcflag_t.
	(__ttyecho): Change arguments oflag and lflag to type tcflag_t.
	(__ttydel): Change argument lflag to type tcflag_t.
	(__ttytab): Change argument oflag to type tcflag_t.
	(__ttycr): Likewise.
	(__ttynl): Likewise.

	* clib/unixlib/types.h (__tcflag_t): Change type to unsigned long
	(__speed_t): New typedef.
	* clib/sys/types.h (speed_t): Define for __speed_t.

	* clib/unistd.h (_POSIX_{NO_TRUNC, VDISABLE, TIMERS}): Defined.
	(_POSIX_{REALTIME_SIGNALS, PII, PII_SOCKET, PII_INTERNET}): Defined.
	(_POSIX_{PII_INTERNET_STREAM, PII_INTERNET_DGRAM, POLL}): Defined.
	(_POSIX_SELECT): Defined.

	* clib/termcap.h: Correct prototype declarations.
	* termcap.c (tgetent): Fix prototypes according to termcap.h.
	(tgetnum, tgetflag, tgetstr, tputs): Likewise.
	(t_tgetid): Make argument const.
	(everywhere): Replace 0 with NULL when referring to pointers.
	Remove use of register.
	Remove causes of 'use of = in condition' warning.

	* sys/_os.s: Remove all uses of the macro NAME.

Wed Oct 29 10:43:50 1997 CL0066
Nick Burrett  <nick.burrett@btinternet.com>

	* wchar/mblen.c: New file.
	* wchar/mbstowcs.c: New file.
	* wchar/mbtowc.c: New file.
	* wchar/wcstombs.c: New file.
	* wchar/wctomb.c: New file.
	* clib/stdlib.h [0]: Allow prototypes for mblen, mbstowcs, mbtowc,
	wcstombs and wctomb to be declared.

	* unix/fnmatch.c: Remove some RCS/SCCS headers. Reformat for GNU
	coding standards.

Tue Oct 21 00:07:06 1997 CL0065
Nicholas Clark  <nickc@liv.ac.uk>

	* unix/dev.c (__pipeselect): Fix to use FD_SET (initial version passed
	int * rather than fd_set *)

Mon Oct 20 11:05:21 1997 CL0064
Nick Burrett  <nick.burrett@btinternet.com>

	* common/riscosify.c (__riscosify): Extra comments. Re-write of
	the code used to part discnames and environment variables.
	(can_csd): Removed.
	(dir_sep_kind): Removed.

	* unix/syslog.c: Fixes to allow a successful compilation.
	* clib/sys/syslog.h: Prevent multiple inclusion.
	(_PATH_LOG): Changed to /usr/syslog.
	(vsyslog): Use correct va_list prototype.

Sun Oct 19 13:59:14 1997 CL0063
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/local.h: Put __open and __close back in.
	Comment out __riscosify_std macro.
	* clib/sys/unix.h (struct sfile): Remove.

	* common/exist.c: Remove unnecessary #include's.
	Use _POSIX_PATH_MAX instead of MAXPATHLEN.
	(__isdir): Call __isdir_raw rather than os_file.
	(__object_exists): Likewise.
	* common/_exist.c: Use OS_File 17 rather than OS_File 5.
	* common/fdname.c: Remove causes of 'use of = in a condition' warnings.

	* unix/*.c: Remove causes of 'use of = in a condition' warnings.
	Use __set_errno. Use __riscosify_std instead of __riscosify.
	Remove '__' from argument types in .c files. Remove 'register'.
	Use meaningful variable names.
	Use _POSIX_PATH_MAX instead of MAXPATHLEN.
	Use os_* when already exists in preference to os_swi.
	Reduce #include's to those required (on some files).

	* unix/access.c: General tidy up as above.
	* unix/fcntl.c: Likewise.
	* unix/fnmatch.c: Likewise.
	* unix/fstat.c: Likewise.
	* unix/getenv.c: Likewise.
	* unix/gethostnam.c: Likewise.
	* unix/getopt.c: Likewise.
	* unix/glob.c: Likewise.
	* unix/isatty.c: Likewise.
	* unix/ispipe.c: Likewise.
	* unix/link.c: Likewise.
	* unix/lseek.c: Likewise.
	* unix/pipe.c: Likewise.
	* unix/select.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/sync.c: Likewise.
	* unix/sysconf.c: Likewise.
	* unix/truncate.c: Likewise.
	* unix/ulink.c: Likewise.

	* unix/chdir.c: Set ENOENT rather than EEXIST when directory does
	not exist.
	* unix/chmod.c (chmod): OS_File 17 instead of OS_File 5.
	(fchmod): Move into its own compilation unit.
	* unix/fchmod.c: New file.
	* unix/chown.c (fchown): Move into its own compilation unit.
	* unix/fchown.c: New file.

	* unix/dev.c: Restructure to remove most gotos.

	* unix/dirent.c: Define CACHE_SIZE. Loop on call to fill cache with
	OS_GBPB, since that can fail.

	* unix/dup2.c: Correct validation of FD2 argument.

	* unix/getcwd.c (unixify_path): New function.
	(getcwd): Use unixify_path to call __unixify.

	* unix/mkdir.c: OS_File 17 instead of OS_File 5.

	* unix/open.c (struct sfile): Moved here.

	* unix/pathconf.c (fpathconf): Convert FD to filename for call
	to pathconf.

	* unix/rmdir.c: Loop on OS_GBPB 9 as required by the PRM's.

	* unix/setenv.c (unsetenv): Re-adjust EP pointer when removing
	item from array.

	* unix/tty.c: (MAX_INPUT): #if used to check value is valid.
	(__ttyicanon): Swapped tty and file_desc argument position and callers.
	(__ttyiraw): Likewise.
	(__ttywrite): Remove unnecessary isupper.
	(__ttyinput): Likewise.

	* unix/unix.c: Ensure function names appear at start of line.
	(check_fd_redirection): Check fd < MAXFD.

	* unix/utime.c: OS_File 17 instead of OS_File 5.

	* unix/wait4.c (wait4): Check options against ~(WNOHANG|WUNTRACED).

Fri Oct 17 10:17:06 1997 CL0062
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/glob.h: Don't include <sys/stat.h> when compiled with GCC.

	* sys/syslib.c (_main): Remove call to ___do_global_ctors and __fptest.
	Use __[read,write]_environment_handler.
	* sys/syslib.s (___do_global_ctors): Remove.
	(__no_dynamic_area): Merge __fptest into here.
	(__fptest): Remove.
	(__read_environment_handler): Renamed from __rdenv.
	(__write_environment_handler): Renamed from __wrenv.
	(__rt_stkovf_split_small): Call __unixlib_raise_signal directly.
	(__rt_stkovf_split_big): Likewise.
	* sys/exec.c: (__exret): Use __write_environment_handler.
	* clib/sys/syslib.h (__fptest): Remove declaration.
	(___do_global_ctors): Remove declaration.
	(__read_environment_handler): Renamed from __rdenv.
	(__write_environment_handler): Renamed from __wrenv.
	* signal/coredump.c (__backtrace): Use __write_environment_handler.

Tue Oct 14 11:18:13 1997 CL0061
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h: Added 2 new riscosify flags
	* riscosify.c __riscosify(): now check for dir present. os_file 17
	before creating dir. more comments

Tue Oct 14 23:36:35 1997 CL0060
Nick Burrett  <nick.burrett@btinternet.com>

	* atexit.c (__atexit_function_array): Renamed from __ax.
	(__atexit_function_count): Renamed from __axcnt.
	(__MAX_ATEXIT_FUNCTION_COUNT): Renamed from __MAX_AXCNT.
	* clib/stdlib.h: Likewise.
	* sys/syslib.c: Likewise.
	(_main): Setup the signal names and resource limits as early as
	possible.
	Do not initialise the signal handlers here.
	* signal/init.c (__unixlib_signal_initialise): Do not setup the
	signal names here.

	* bsearch.c (bsearch): Use more meaningful variable names.

	* unix/unix.c (convert_command_line): Don't decrement argc when
	we terminate the argv list.
	(__unixinit): Initialise the signal handlers immediately after
	the process structure has been created.

	* unix/stat.c (lstat): Move into its own compilation unit.
	(fstat): Likewise.
	(__stat): Likewise.
	* unix/lstat.c: New file.
	* unix/fstat.c: New file.
	* common/stat.c: New file.
	* clib/sys/stat.h (__stat): Declare.

Tue Oct 14 17:01:00 1997 CL0059
Nick Burrett  <nick.burrett@btinternet.com>

	* Docs/Changelog: Add entries CL0001 to CL0030
	* Doc/CL0000049/*: delete

Mon Oct 13 00:07:23 1997 CL0058
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unistd.h: Use __nbytes rather than __n in prototype or write.

	* clib/sys/uio.h: Update prototypes for readv, writev to use __ssize_t.

	* unix/read.c: Added quick exit for nbytes == 0. Use ssize_t rather
	than __ssize_t and removed unnecessary type conversions to ssize_t.
	* unix/write.c: Likewise.

	* unix/readv.c: Use ssize_t instead of int. Check iov_len before
	calling device read function. Return byte count if fail after first
	read. Set errno to EINVAL if count is <= 0.
	* unix/writev.c: Likewise. Also increment process's output count.

Sun Oct 12 11:58:29 1997 CL0057
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/netinet/ip.h (struct ip): Use bitfields to ensure structure
	layout is correct with ARM C compiler in ANSI mode.
	(struct ip_timestamp): Likewise.
	* clib/netinet/ip_var.h (struct ipasfrag): Likewise.
	* clib/netinet/tcp.h (struct tcphdr): Likewise.

Sat Oct 11 01:00:00 1997 CL0056
Simon Callan  <simon@callan.demon.co.uk>

	* sys/_jmp.s: restore file that got deleted.

Thu Oct 09 16:05:58 1997 CL0055
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c (__unixlib_fatal, __badr): Add the noreturn attribute
	to the function definition.
	[__badr, __unixlib_fatal]: Don't define for __GNUC__.
	(check_for_io_redirection): Recogise the [fd]> redirection construct.
	Call __open to open the file descriptor.
	(verify_redirection): Likewise.
	(get_fd_redirection): New function.
	(convert_command_line): Check *cli != NULL on the 2nd while loop.

	* unix/open.c (__open): Move code to open a file for a file descriptor
	to here.
	(open): Call __open.
	(__sfile): Make static.
	* unix/close.c (__close): Move code to perform the file descriptor
	closing to here.
	(close): Call __close.
	* unix/reopen.c (__reopen): Delete common code shared with close/open
	and call __close/__open instead.
	* clib/unixlib/local.h (__open, __close): Declare.
	* clib/sys/unix.h (__sfile): Remove

	* unix/pselect.c: New file.
	* unix/poll.c: New file.
	* clib/sys/select.h (pselect): Declare.
	* clib/sys/poll.h: New file

Thu Oct 09 20:08:48 1997 CL0054
Simon Callan  <simon@callan.demon.co.uk>

	* all files: remove all RCS log entries.

Mon Oct 06 22:36:06 1997 CL0053
Nicholas Clark  <nickc@liv.ac.uk>

	* netlib/_net_error.s: preserve ip across call to __seterr

Sat Sep 20 09:53:25 1997 CL0052
Nicholas Clark  <nickc@liv.ac.uk>

	* strlen.c: Rewrite to optimise loop by 1 ARM instruction (3 not 4)

Mon Sep 29 23:56:40 1997 CL0052
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/sys/tty.h: Add 1 character lookahead buffer
	* clib/sys/dev.h: add __select function entry to dev table
	relevant function prototypes wrapped with __UNIXLIB_NO_COMMON_DEV
	changed all dev table functions to pass unixlib_fd pointer as 1st arg
	tidied and added __ to dummy argument names

	* unix/tty.c: Use lookahead buffer to implement __ttyselect
	__ttyicanon and __ttyiraw check lookahead, __ttylseek not compiled
	unless __UNIXLIB_NO_COMMON_DEV

	* unix/close.c: use __set_errno. more debugging info

	* unix/dev.c: relevant functions wrapped with __UNIXLIB_NO_COMMON_DEV
	added __*select, changed functions to pass unixlib_fd as 1st arg

	* unix/open.c,
	* unix/pipe.c: changed to call with unixlib_fd as 1st arg

	* unix/ioctl.c,
	* unix/lseek.c,
	* unix/read.c,
	* unix/readv.c,
	* unix/reopen.c,
	* unix/write.c,
	* unix/writev.c: changed to call with unixlib_fd as 1st arg
	use __set_errno

	* netlib/accept.c: set _FDMAGIC on accepted socket's fd

	* sys/select.h: remove const from select prototype
	* netlib/select.c: renamed as unix/select.c
	* unix/select.c: major re-write. Copes with all DEVs. Retruns FD_SETs of
	live fds. Subtracts time waited from timeout passed

	* signal/coredump.c __backtrace: Give register dump when PC is invalid

Mon Oct 06 20:20:30 1997 CL0051
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c (check_for_io_redirection): Cope with spaces appearing
	after a redirection chevron.
	(verify_redirection): Likewise.
	(convert_command_line): Likewise.

Sat Oct 04 16:05:23 1997 CL0050
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/unix.c: (initalise_process_structure): Renamed from
	__initialise_proc.
	Rename process variable 'u' to 'process'.
	Increase the regs array from 3 to 10.
	(__unixinit): Re-write and split into many functions.
	(create_process_structure): New function.
	(initialise_unix_io): New function.
	(check_fd_redirection): New function.
	(find_terminator): New function.
	(check_for_io_redirection): New function.
	(verify_redirection): New function.
	(find_redirection_type): New function.
	(convert_command_line): New function.

	* sys/exec.c (execl, execle, execlp, execv, execvp): Move into
	their own separate compilation units.
	(execve): Cosmetic changes, make variable names more descriptive.
	* sys/execl.c: New file.
	* sys/execle.c: New file.
	* sys/execlp.c: New file.
	* sys/execv.c: New file.
	* sys/execvp.c: New file.

Sat Oct 04 23:36:26 1997 CL0049
Nicholas Clark  <nickc@liv.ac.uk>

	* common/riscosify.c (__riscosify): Ensure "." returns "@"
	Do create directories unless they exist already. (not don't!)
	(sdirinit) don't lose last char from names when adding '.'

Sat Sep 20 09:53:25 1997 CL0048
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/asm_dec.s: Added NetSWIsimple macro
	Update NetSWI to call __net_error before changing out of SVC

	* netlib/_net_error.s: Added  __net_error_simple_entry
	* netlib/*.s
	  Files with 1-4 args which call NetSWI: Replaced with NetSWIsimple
	  Other files which call NetSWI: remove BLVS __net_error
	netlib/_shutdown.s,
	netlib/_listen.s,
	netlib/_ioctl.s,
	netlib/_getsockname.s,
	netlib/_getpeername.s,
	netlib/_connect.s,
	netlib/_close.s,
	netlib/_bind.s:
	  NetSWIsimple0 - ie don't rely on R0 being uncorrupted.
	netlib/_getsockopt.s:
	netlib/_setsockopt.s:
	  NetSWI0 - ie don't rely on R0 being uncorrupted.
	netlib/_select.s: Work around bug in Internet 5.02

Sat Oct 04 19:40:02 1997 CL0047
Nicholas Clark  <nickc@liv.ac.uk>

	* common/riscosify.c (__riscosify): Ensure "." returns "@"
	(sdirinit) don't lose last char from names when adding '.'

Thu Oct 02 11:53:21 1997 CL0046
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/dirent.h (struct __dir_stream): Correct spelling of gbpb_off
	field and change type to remove compiler warning.

	* clib/sys/unix.h: Remove struct sdir. Correct indentation.

	* clib/unixlib/local.h: Change __RISCOSIFY_* from enum. Declare
	__riscosify_init. Conditionalise out __sfixfind. New macro
	__RISCOSIFY_TRUNCATE_VALUE replaces separate mask and shift.

	* common/riscosify.c (__riscosify_init): New function.
	(__sdirinit): Moved from unix.c and rewritten to make it easy to add
	default mappings for Unix directories to RISC OS directories.
	(size_t truncate[]): Removed reference to the devil himself.
	(sdirseg): Changed return value to enum sdirseg_result. Move '.'
	termination of translation to sdirinit.
	(__riscosify): Style. Correct os_file (8) call. Allow '_' in
	pathnames. Various bug fixes

	* common/uname.c: __uname moved back here from riscosify.c.

	* common/unixify.c (__unixify): Free buffer if it overflows.
	Keep symmetric with __riscosify.

	* sys/exec.c: Merge recent changes from Nick B and Nick C.
	* sys/syslib.c: Likewise.
	* unix/dirent.c: Likewise.
	* unix/stat.c: Likewise.

	* unix/unix.c: (__unixinit): Tidied up redirection processing and added
	support for [n]<> file and more comments.
	(__panic): Removed. (__badr): Reinstated. Simulated 'noreturn' on
	__badr and local use of __unixlib_fatal from within __unixinit since
	it reduces code size.
	(__sdirinit): Moved with suffix initialisation code to
	common/riscosify.c.
	
Fri Sep 19 13:40:41 1997 CL0045
Nick Burrett  <nick.burrett@btinternet.com>

	* common/unixify.c: #include <errno.h>
	* clib/sys/unix.h (__sfix): Remove definition.
	* clib/unixlib/local.h: Move #include <stddef.h> outside of
	__UNIXLIB_INTERNALS check. General tidy-up.
	* clib/unixlib/math.h: Don't #include <machine/endian.h>.
	* sys/_exec.s (__exec_rtn_corrupt): Call abort() instead of raise().
	* sys/_alloca.s (__builtin_alloca): Do not define.

	* unix/stat.c (__stat): Remove #ifdef DEV_SOCKET
	* unix/dev.c (__dev): Likewise.
	

Thu Sep 18 23:40:22 1997 CL0044
Nicholas Clark  <nickc@liv.ac.uk>

	* sys/exec.c execve: Changed processing of execname[0] == '*' so that
	it removes '*' and ' ' characters from child argb.

	* clib/unixlib/asm_dec.s: Corrected macro NetSWI to load errno before
	exiting SVC mode.

	* netlib/s/_net_error: Removed code to load errno

Thu Sep 18 17:29:38 1997 CL0043
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdlib.h: Annotated. Don't #include <errno.h>.
	* unix/getenv.c: #include <errno.h>.
	* unix/dirent.c: #include <errno.h>. Remove Alun Jones comment.
	* stdio/newstream.c: #include <errno.h>.
	(__getmode): Set errno with __set_errno.
	* stdio/getdelim.c: #include <errno.h>.
	(getdelim): Set errno with __set_errno.
	* stdio/fwrite.c: #include <errno.h>.
	(fwrite): Set errno with __set_errno.
	* stdio/fread.c: #include <errno.h>.
	* stdio/flsbuf.c: #include <errno.h>.
	(__flsbuf): Set errno with __set_errno.  Include Nick Clark's change
	to prevent a write operation of zero bytes.
	* stdio/filbuf.c: #include <errno.h>.
	* stdio/fclose.c: #include <errno.h>.
	(fclose): Set errno with __set_errno.
	* system.c: #include <errno.h>.
	(system): Set errno with __set_errno.

	* clib/assert.h (__fail): Delete
	(__assert_fail): Declare prototype.
	(assert): Fix to reflect above. Define a GCC specific version.
	* assert.c (__fail): Delete.
	(__assert_fail): New function.
	
	* clib/dirent.h (__dir_stream): Make __magic an unsigned int.
	(DIRSIZ): Remove

	* clib/sys/syslib.h (handler): Replace one character variable names
	with something more appropriate.
	(env): Likewise. Use a macro to define number of handlers.
	(__ENVIRONMENT_HANDLERS): Define
	(__Oenv): Rename to __calling_environment.
	(__Cenv): Rename to __c_environment.
	(__restore_calling_environment_handlers): Declare prototype.
	* sys/syslib.c (everywhere): Reflect changes made to syslib.h.
	(__c_environment): Declare a handler for UpCall.
	(__restore_calling_environment_handlers): New function
	(_main): Use long local variable names.
	(exit): Likewise.
	(_exit): Likewise.
	(__reset): Likewise. Call __restore_calling_environment_handlers.
	* signal/coredump.c (__backtrace): Reflect changes made to syslib.h.
	* signal/_signal.s (__h_upcall): New function
	* clib/unixlib/sigstate.h (__h_upcall): Declare prototype.
	* sys/exec.c (execve): Call __restore_calling_environment_handlers
	(__exret): Reflect changes made to syslib.h

	* sys/os.c (__seterr_): Remove
	* clib/sys/os.h (__seterr_): Remove prototype.
	(OS_E*): Removed macros.

Thu Sep 18 11:04:20 1997 CL0042
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h: 	define __filename_to_riscos();
	  defined constants for flags
	  arrange __UNIXLIB_OLD_UNAME when defined to cause compliation of
	  "traditional" __uname() emulation, otherwise ensure compile time
	  errors for __uname()

	* common/uname.c: deleted

	* common/unixify.c: new file - __unixify()

	* common/riscosify.c: new file - __riscosify() and special suffix
	routines

	* unix/dirent.c: __uname() -> __riscosify(), use filename character
	conversion table to convert '/', '#' found in filenames

	* unix/getcwd.c: use filename character conversion table
	use new __unixify() function rather than static function to convert path
	
	* unix/unix.c: 	call __sfixinit() in riscosify() to initialise special
	suffix list

	* common/exist.s: __uname() -> __riscosify(), convert non "raw"
	functions to C

	* common/exist.c: __file_exitsts(), __object_exists() now in C

	* common/serial.c: __uname() -> __riscosify(), save inline strcpy

	* stdio/rename.c: __uname() -> __riscosify() twice, save two strcpy
	I've used __set_errno(ENAMETOOLONG) is this acceptable for rename() ?

	* sys/syslib.c		remove reference to __uname_dont_pack_ptr
	currently default is not to truncate at all, and not to drop vowels

	* unix/chdir.c:	__uname() -> __riscosify(), save strlen

	* unix/chmod.c: __uname() -> __riscosify()

	* unix/dev.c: __uname() -> __riscosify()

	* sys/exec.c: __uname() -> __riscosify(), save strlen

	* unix/mkdir.c: __uname() -> __riscosify(), replaced assignment to errno
	with __set_errno

	* unix/open.c: comment about __uname() updated

	* unix/rmdir.c:	__uname() -> __riscosify(), replaced assignment to errno
	  with __set_errno

	* unix/stat.c: __uname() -> __riscosify()

	* unix/truncate.c: __uname() -> __riscosify(), replaced assignment to
	errno with __set_errno

	* unix/unlink.c: __uname() -> __riscosify(), replaced assignment to
	errno with __set_errno

	* unix/utime.c: __uname() -> __riscosify(), replaced assignment to errno
	with __set_errno

Wed Sep 17 07:34:04 1997 CL0041
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* alloc.c (malloc_stats): Re-enabled for -DDEBUG.
	(malloc, realloc, memalign): Check that malloc size has not wrapped
	around after rounding.

	* unix/stat.c (__stat): Constrain stat.st_size for directories to
	be in [0,32768] to overcome image FS problems.

Mon Sep 15 16:02:28 1997 CL0040
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_jmp.s (sigsetjmp, siglongjmp): Remove
	* sys/_sigjmp.s: Move sigsetjmp and siglongjmp here.

	* locale/ctypetable.c (__build_ctype_tables): Define
	* clib/locale.h (__build_ctype_tables): Declare.
	* locale/locale.c (build_ctype_tables): Move to ctypetable.c
	(__locale_territory): Remove declaration.
	(setlocale): Call __build_ctype_tables.
	* locale/territory.c (__locale_territory): New file and declare.
	* sys/syslib.c (_main): Replace setlocale with __build_ctype_tables.
	(_exit): Don't store the time that the process was executing for.

	* ctype.c (toascii, tolower, toupper, isascii, isalnum, isalpha,
	iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace,
	isupper, isxdigit): Move to ctypeproc.c
	* ctypeproc.c: New file.

	* locale/localeconv.c (read_byte_list): Use OS_BinaryToDecimal to
	convert numbers to strings.

	* unix/proc.c (getegid, geteuid, getgid, getpgrp, getpid, getppid,
	getuid, seteuid, setgid, setpgid, setpgrp, setuid): Move functions
	into their own compilation units
	* resource/getegid.c: New file
	* resource/geteuid.c: New file
	* resource/getgid.c: New file
	* resource/getpgrp.c: New file
	* resource/getpid.c: New file
	* resource/getppid.c: New file
	* resource/getuid.c: New file
	* resource/seteuid.c: New file
	* resource/setgid.c: New file
	* resource/setpgid.c: New file
	* resource/setpgrp.c: New file
	* resource/setuid.c: New file

Mon Sep 15 01:30:55 1997 CL0039
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/asm_dec.s (XOS_SetVarVal): Corrected.
	(EOPPNOTSUP, FIOSLEEPTW): Removed.

	* stdio/setbuf.c (do_buffer): Keep iobuf struct consistent even on
	malloc failure.

	* sys/exec.c (set_dde_cli): New function.
	(execve): Use set_dde_cli. Deinstall handlers after point of no return.

	* sys/_kgetenv.s: Pass (size-1) to XOS_ReadVarVal instead of size to
	leave room for the terminator. Save error around call to __seterr.

	* sys/_ksetenv.s: Handle incoming value == NULL. Save error around
	call to __seterr.

	* sys/_kosargs.s: Save one instruction.
	* sys/_kosbget.s: Set return value on error.
	* sys/_kosbput.s: Return -2, not -1, on error.
	* sys/_kosbyte.s: Correct formation of return value from r1,r2 and C.
	* sys/_koscli.s: Return 1 on success.
	* sys/_kosfile.s: Return -2, not -1, on error.
	* sys/_kosrdch.s: Check for error and set return appropriately.
	* sys/_koswrch.s: Likewise.

Sun Sep 14 18:07:50 1997 CL0038
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/unixlib/asm_dec.s: Place vertical bars around __set_errno
	* netlib/_net_error.s: Likewise.

Sun Sep 14 15:45:43 1997 CL0037
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/asm_dec.s: Added NetSWI macro.

	* netlib/*.s: Rename macro CallSWI to NetSWI. Call __net_error on error.

	* netlib/_net_error: New file.

	* netlib/_socket.s: Do not explicitly set FIOSLEEPTW in assembly,
	now done in netlib/socket.c if running in a task window.

	* netlib/socket.c: Set FIOSLEEPTW on sockets when running in a task
	window.

Sun Sep 14 17:31:13 1997 CL0036
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/kernel.h (_kernel_swi_c, _kernel_osbyte, _kernel_osrdch,
	_kernel_oswrch, _kernel_osbget, _kernel_osbput, _kernel_osgbpb,
	_kernel_osword, _kernel_osfind, _kernel_osargs, _kernel_oscli,
	_kernel_getenv, _kernel_setenv): Declare

	* unixlib/asm_dec.s (ExitSVC): Replace 1<<28 with 1:SHL:28.
	(XOS_BGet, XOS_BPut, XOS_SetEnv, XOS_SetVarVal): Define

	* sys/_kernel.s (_kernel_osfile): Moved function to sys/_kosfile.s
	* sys/_kosfile.s: New file
	* sys/_koswrch.s: New file
	* sys/_kosrdch.s: New file
	* sys/_kosbyte.s: New file
	* sys/_kosbget.s: New file
	* sys/_kosbput.s: New file
	* sys/_kswi_c.s: New file
	* sys/_kgetenv.s: New file
	* sys/_kosargs.s: New file
	* sys/_koscli.s: New file
	* sys/_kosfind.s: New file
	* sys/_kosgbpb.s: New file
	* sys/_ksetenv.s: New file

	* objs/Makefile: Add support for compiling with GCC, assembling with
	'as' and making the library with 'makealf'.
	(CCflags): Remove '-fw' switch for Norcroft C
	(ARflags): Add switch '-c'
	(UnixLib): Remove switch '-c'

Wed Sep 10 18:09:16 1997 CL0035
Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/setbuf.c: Reduce code duplication. Used __set_errno.

	* clib/unixlib/types.h: Rename __uint*_t types to __u_int*_t

	* clib/sys/unix.h: Make __magic unsigned.
	* clib/stdio.h: Make __magic unsigned. Fixed all prototypes with a
	double underscore.

Tue Sep 09 17:37:51 1997 CL0034
Nicholas Clark  <nickc@liv.ac.uk>

	* netlib/*.s: Used Stewart Brodies SWI veneer to ensure all sockets
	are called in SVC mode [Stewart says that some versions of Acorn's stack
	go horribly wrong otherwise]

	* stdio/flsbuf.c: Flushing a stream with no characters buffered
	pending a write now does not perform a write() of 0. [consistent with
	BSD, can avoid problems with unconnected sockets]

	* sys/exec.c: Remove DDE Utils extended command line on OSCLI failure
	* sys/_exec.s: Remove DDE Utils extended command line on OSCLI failure

	* clib/unixlib/asm_dec.s: Added Stewarts SVC swi veneers and DDE SWI


Tue Sep 02 15:55:49 1997 CL0033
Nick Burrett  <nick.burrett@btinternet.com>

	* math/erf.c: New file. Implements erf() and erfc().
	* math/j0.c: New file. Bessel functions j0() and y0().
	* math/j1.c: New file. Bessel functions j1() and y1().
	* math/jn.c: New file. Bessel functions jn() and yn().
	* math/k_cos.c: New file. Internal function __kernel_cos().
	* math/k_rem_pio2.c: New file. Internal func. __kernel_rem_pio2().
	* math/k_sin.c: New file. Internal function __kernel_sin().
	* math/lgamma.c: New file. Gamma functions gamma() and lgamma().
	* math/lgamma_r.c: New file. Gamma function lgamma_r().
	* math/logb.c: New file. Function logb().
	* math/rem_pio2.c: New file. Function rem_pio2().
	* clib/math.h: Declare prototypes for the above

	* signal/post.c (__unixlib_internal_post_signal): Optimise the
	default signal action check.

Fri Sep 05 1997 CL0032
Simon Callan <simon@callan.demon.co.uk>

	* Backout the __uname() / __riscosify() changes, as they are not
	yet ready for release.

Thu Aug 07 00:17:12 1997 CL0030
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* sys/mman.c: (mmap): Set errno to ENOSYS when no dynamic areas rather
	than ENOMEM.

Wed Aug 06 20:35:48 1997 CL0029
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/unixlib/local.h (__filename_to_riscos): Define.
	(__RISCOSIFY*): Define.
	(__UNIXLIB_OLD_UNAME): Define.

	* common/riscosname.c (__filename_to_riscos): New function.

	* unix/dirent.c: Use filename character conversion table in
	common/riscosname.c to convert '/' found in filenames
	* unix/getcwd.c: Likewise.
	* unix/unix.c: Call __sfixinit().

	* common/exist.s (__file_exists): Remove.
	(__object_exists): Remove.
	* common/exist.c (__file_exitsts): New function.
	(__object_exists): New function.

	* common/serial.c: Use __filename_to_riscos instead of __uname.
	* stdio/rename.c: Likewise.
	* unix/chdir.c: Likewise.
	* unix/chmod.c: Likewise.
	* unix/dev.c: Likewise.
	* sys/exec.c: Likewise.
	* unix/open.c: Likewise.
	* unix/stat.c: Likewise.
	* unix/mkdir.c: Likewise. Use __set_errno.
	* unix/rmdir.c: Likewise.
	* unix/truncate.c: Likewise.
	* unix/unlink.c: Likewise.
	* unix/utime.c: Likewise.

	* sys/syslib.c (__uname_dont_pack_ptr): Remove.

Sun Aug 03 18:34:24 1997 CL0027
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/signal.h: Correct macros for sigaddset, sigdelset, sigismember
	and put them inside a __UNIXLIB_INTERNALS. These macros are not really
	for the user, especially since they do not do any argument checking.

	* clib/stdlib.h: Declare setenv, unsetenv and clearenv.

	* clib/sys/unix.h: Add envp and envb to Unix proc struct. These are
	temporary until the UnixLibSupport module is ready. They are used to
	pass the current environ to a child process. Remove declaration of
	defunct __permstr. Declare __decstrtoui, __last_environ,
	__UNIX_ENV_PREFIX and environment support functions.

	* stdio/popen.c: (pclose): Return status from wait not return value of
	wait. Do not close stream->fd directly in pclose, let fclose do it.

	* sys/exec.c: (execve): Copy current environ into proc struct for
	child process to collect. Check result of realloc before storing so
	memory leak is avoided. Reorganisation to move calculation of
	__codeshift and __exshift later in function so that malloc_trim can
	be called safely. Fix store beyond end of buffer when argv[0] is NULL,
	i.e., when called from system with execl (line, 0).

	* sys/syslib.c: (_exit): Do not set Sys$ReturnCode since __exit does it.

	* sys/vfork.c: Initialisation and freeing of child's envp and envb.
	Use monotonic clock to generate process id (this will change).

	* unix/chdir.c: Rewritten to use and change Prefix$Dir when it has
	been set. Use new __getenv_from_os.

	* unix/getcwd.c: Complete rewrite to reduce code size and make clearer.
	Check Prefix$Dir first since OS_File calls are intercepted by DDEUtils.
	Use new __getenv_from_os. Remove possible memory errors.

	* unix/getenv.c: Complete rewrite. Use __UNIX_ENV_PREFIX when
	environment names interact with global RISC OS environment. Support
	for new setenv, clearenv and unsetenv functions. Remove need for static
	__envcnt and __envsize variables. __intenv now only checks RISC OS
	environment. Allow for environ to have been allocated in parent process.

	* unix/pipe.c: Change call to __intenv and __permstr.

	* unix/putenv.c: Rewritten to not modify argument and allow NAME to be
	removed from the environment. Use setenv to add and unsetenv to remove.

	* unix/setenv.c: New file to provide setenv, unsetenv and clearenv.

	* unix/unix.c: Add default value for UnixFS$/pipe to use Wimp$ScrapDir,
	needed for cases when programs use pipes but do not set UnixFS$/pipe.
	Remove __permstr and use strdup instead. Make __decstrtoui external
	and check END argument before writing to it. Collect environment from
	parent process if we are a child. Use monotonic clock to generate
	process id (this will change).

Sun Aug 03 15:45:24 1997 CL0025
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/signal.h (sigaddset, sigdelset, sigismember): Fix typos
	
	* signal/_signal.s (__h_error): Fix LDM typo that would otherwise
	cause an Address Exception if raise ever returned.

	* unix/getsubopt.c: Re-written.

Sun Aug 03 14:42:53 1997 CL0028
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/unixlib/local.h: Arguments to __address_valid are now const.

	* locale/localeconv.c: (read_byte_list): Converted sprintf call into
	inline code and check buffer does not overflow.

	* unix/uname.c: Extract module version from help string instead of
	using OS_Module 20 since that does not work on ROMPatches which is
	not a ROM module.

Sat Aug 02 17:13:24 1997 CL0024
Nick Burrett  <nick.burrett@btinternet.com>

	* time/broken.c: fix off-by-one error with tm_mon.
	
	* time/tzset.c: don't overwrite the tzname string constants.
	
	* time/settod.c: remove some comments
	
	* clib/signal.h: Define macro versions of sigaddset, sigdelset,
	sigismember. Prefix all variable names with '__'.

	* signal/sigismember.c: #undef sigismember
	* signal/sigdelset.c: #undef sigdelset
	* signal/sigaddset.c: #undef sigdelset
	* signal/sigsets.c: #undef sigemptyset, sigfillset, sigmask

	* signal/post.c, signal/signal.c, signal/sigprocmsk.c: Remove
	inline_sigfuncs and code associated with it.
	
	* clib/netdb.h: re-written
	
	* clib/socketlib.h: removed
	* clib/unixlib/local.h: declare __net_readline
	
	* netlib/readline.c (__socketlib_readline): remove static buffer
	and redeclare as __net_readline.
	
	* netlib/host.c (__gethostent): use __net_readline
	* netlib/net.c (__getnetent): use __net_readline
	* netlib/proto.c (__getprotoent): use __net_readline
	* netlib/serv.c (__getservent): use __net_readline
	
	* netlib/h_errno.c: new file

Sat Aug 02 12:54:29 1997 CL0023
Nick Burrett  <nick.burrett@btinternet.com>

	* locale/setlocale.c (territory_number): If locale is empty,
	use default locale and not the C locale.
	(build_ctype_tables): top-bit set chars are undefined for C locale.
	(setlocale): Preserve old locale if new locale is invalid.
	Invalidate lconv structure.

	* locale/localeconv.c (read_number): removed
	(read_symbol): return int, not void *
	(localeconv): Cache lconv structure. Replace read_number calls
	with read_symbol.
	(read_byte_list): Replace strcat with stpcpy.

	* clib/locale.h: Declare __setlocale_called for lconv structure
	caching.

Fri Aug 01 20:22:01 1997 CL0022
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/sys/utsname.h: New header
	
	* unix/uname.c: uname() function for <sys/utsname.h>
	
	* unix/glob.c: don't explicitly set errno to zero
	
	* clib/unixlib/types.h: more exact definitions of  __int8_t,
	__int16_t etc. for GCC.
	
	* strtol.c: remove strtoul(). Use __set_errno
	
	* strtoul.c: define strtoul()
	
	* strspn.c, stpcpy.c, strcat.c, strchr.c, strcmp.c, strcpy.c,
	strichr.c, stricmp.c: move functions into their own separate
	compilation units
	
	* strcspn.c, strpbrk.c, stpncpy.c, strncat.c, strrchr.c, index.c,
	strncmp.c, strncpy.c, strrichr.c, strnicmp.c: new files

Thu Jul 31 23:52:21 1997 CL0026
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* strdup.c: Replace use of __permstr with malloc and memcpy.

	* clib/unixlib/local.h: Comment out __UNIXLIB_INTERNALS after #endif.

	* locale/localeconv.c: (read_byte_list): Free memory if realloc fails.
	(localeconv): Only need to malloc 1 character for null string. Do not
	set errno to ENOMEM, since malloc does that already.

	* locale/setlocale.c: (setlocale): Use (void) on __set_errno to stop
	compiler warnings.

	* stdio/remove.c: Remove need for stdio to be pulled in.

	* time/calendconv.c: Comment out #define DEBUG.

	* unix/tty.c: Remove setting of errno to ENOMEM, since malloc does
	that already.

Mon Jul 28 21:57:20 1997 CL0021
Nicholas Clark  <nickc@liv.ac.uk>

	* clib/string.h: Removed #ifdef 0 from strxfrm and strcol
	
	* locale/setlocale.c: setlocale(,"") equivalent to setlocale(,"C").
	  comment in perl source:
	
	  Ultrix setlocale(..., "") fails if there are no environment
	  variables from which to get a locale name.
	
	  implication: most Unixes accept "" without complaint.
	
	* clib/unixlib/local.h: __attribute to __attrib

	* time/c.calendconv: Fixed 3 off-by-ones in __tz
	  Check the SWI with Mon 1st Jan 1900.
	
	* time/c.gmtime: gmtoff == 0 whether localtime on daylight saving!

Sat Jul 26 17:03:30 1997 CL0019
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/syslib.c: Call setlocale() to initialise ctype tables
	
	* locale/setlocale.c: Re-build ctype tables for category LC_ALL.
	
	* locale/localeconv.c: Perform malloc memory check and prevent
	memory leak.

Sat Jul 26 13:30:25 1997 CL0020
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* All changed files: More meaningful variable names, use of __set_errno
	and '__' added to function argument names in header files.

	* clib/unistd.h: Add declaration of getdomainname and setdomainname.

	* clib/sys/select.h: Add declaration of _select.

	* clib/unixlib/types.h: Remove __ptr_t from __FD_ZERO. Use unsigned
	number in __FDMASK.

	* netlib/select.c: New file to interface select to underlying
	Socket_Select SWI. Converts fd's and fd_set's from UnixLib fd's
	to underlying Socket fd's.

	* sys/debug.c: Check file is a RISC OS device before printing name.

	* unix/getdomain.c: New file. Provides getdomainname and setdomainname.
	getdomainname tries Inet$LocalDomain and Inet$HostName.

	* unix/gethostnam.c: Fixed off-by-one errors with length checks.
	Returned name is not zero terminated when ENAMETOOLONG occurs.

Sat Jul 26 12:56:12 1997 CL0018
Nick Burrett  <nick.burrett@btinternet.com>

	* signal/kill.c, signal/coredump.c, signal/post.c,
	signal/raise.c, signal/setup.c, signal/sigprocmsk.c,
	sys/sigsetjmp.c: remove support for sigcode and sigerror

	* signal/post.c: inline all signal functions if inline_sigfuncs
	is defined. Remove all traces of pre-emptive signal handling.

	* signal/init.c: remove pre-emptive signal handling support.
	Fix an error message typo.

	* signal/signal.c: inline sigemptyset() if inline_sigfuncs is
	defined.

	* signal/sigpreempt.c: deleted

	* signal/sigprocmsk.c: inline sigismember() and sigdelset() if
	inline_sigfuncs is defined.

	* clib/unixlib/sigstate.h: remove pre-emptive signal handling
	support. Remove support for sigcode and sigerror. Minor cosmetic
	changes.

Thu Jul 24 00:01:33 1997 CL0017
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* All changed files: More meaningful variable names, use of __set_errno
	and '__' added to function argument names in header files.

	* clib/dirent.h: Declare readdir_r and add dirent field to DIR struct
	to hold the last value returned from readdir.

	* clib/stdio.h: Changed __STDIOLIB__ so each file only uses one word
	in pulling in __stdioinit rather than a full function.

	* clib/unixlib/local.h: Declare __fd_to_name to return the RISC OS
	filename corresponding to an open RISC OS file descriptor. Moved all
	bar __uname_control stuff inside __UNIXLIB_INTERNALS.

	* common/fdname.c: New file for __fd_to_name.

	* common/serial.c: Modified __get_file_ino so __uname is only performed
	when DIRECTORY is not NULL (as called from readdir). Fixed DIRECTORY
	and NAME concatenation to not overrun the internal buffer.

	* sys/debug.c: Only print active file descriptor and now print the
	filename corresponding to them.

	* unix/chmod.c: Return EPERM on protection change error rather than
	RISC OS error. Use __fd_to_name in fchmod. Return more Unix errors
	where appropriate when RISC OS error occurs.

	* unix/dev.c: (__fsopen): Open the file before setting protection
	bits on a newly created file. This allows RCS lock files to be
	created open for writing with permission 444 (r--r--r--).
	(__fsclose): Use __fd_to_name.

	* unix/dirent.c: New readdir_r function for POSIX. readdir function
	now reentrant for different DIR streams by using a buffer allocated
	on demand in the DIR stream and uses readdir_r function.

	* unix/stat.c: (fstat): Use __fd_to_name. Return more Unix errors
	where appropriate when RISC OS error occurs.

Wed Jul 23 22:27:56 1997 CL0016
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* clib/sys/syslib.h: remove __noreturn__ attribute from __funcall_error

	* signal/sigprocmsk.c: declare mask as sigset_t rather than
	unsigned int.

	* stdio/freopen.c: reset input pointer (i_ptr), eof (__eof) and
	pushedback indicator.

	* stdio/rename.c: remove need for stdio to be pulled in. Call __uname
	on new file with the create directory flag set. This allows
	rename ("foo", "foo.c") to create the "c" directory if needed.

	* sys/syslib.c: remove double initialisation of __uname_control.

	* sys/_sdiv10.s: correct spelling of sdiv10 functions.

Tue Jul 22 00:00:00 1997 CL0015
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/ctype.h: Rewrite for compatibility with the structures
	returned by the Territory manager.
	(_tolower, _toupper): Remove.
	* ctype.c: Reflect changes made to clib/ctype.h.
	* unix/tty.c: Replace _tolower with tolower.
	* strichr.c: Likewise.
	* stricmp.c: Likewise.

	* clib/locale.h: Re-arrange the locale globals.
	* locale/setlocale.c: Fully implement setlocale().
	* locale/localeconv.c: Bix fixes.
	* locale/strcoll.c: New file.
	* locale/strxfrm.c: New file.
	* sys/syslib.c: Call setlocale() to initialise the ctype tables.

	* time/tzset.c: Replace __time_territory with __locale_territory.
	* time/strftime.c: Likewise.
	* time/stdtime.c: Likewise.
	* time/mktime.c: Likewise.
	* time/calendconv.c: Likewise.
	* time/broken.c: Likewise.

Sun Jul 13 00:00:00 1997 CL0014
Nick Burrett  <nick.burrett@btinternet.com>

	* ctime.c: Removed.
	* mktime.c: Removed.
	* unix/time.c: Removed.
	
	* clib/locale.h: New file.
	* clib/time.h: Prototype some internal functions.
	* time/_clock.s: New file.
	* time/asctime.c: New file.
	* time/broken.c: New file.
	* time/calendconv.c: New file.
	* time/ctime.c: New file.
	* time/difftime.c: New file.
	* time/gmtime.c: New file.
	* time/localtime.c: New file.
	* time/mktime.c: New file.
	* time/stdtime.c: New file.
	* time/strftime.c: New file.
	* time/time.c: New file.
	* time/times.c: New file.
	* time/tzset.c: New file.

	* locale/setlocale.c: New file.
	* locale/localeconv.c: New file.
	
	* unix/sysconf.c [_SC_CLK_TCK]: Return CLOCKS_PER_SEC, not 60.

Sat Jul 12 00:00:00 1997 CL0013
Nick Burrett  <nick.burrett@btinternet.com>

	* sys/_syslib.s: Relocate some code from here into their own
	separate compilation units.
	* sys/_memchk.s: New file.
	* sys/_profile.s: New file.
	* sys/_divtest.s: New file.
	* sys/_sdiv.s: New file.
	* sys/_smod.s: New file.
	* sys/_udiv.s: New file.
	* sys/_umod.s: New file.
	* sys/_sdiv10.s: New file.
	* sys/_udiv10.s: New file.
	* sys/_divsi3.s: New file.
	* sys/_modsi3.s: New file.
	* sys/_udivsi3.s: New file.
	* sys/_umodsi3.s: New file.

Mon Jun 30 00:00:00 1997 CL0012
Nick Burrett  <nick.burrett@btinternet.com>

	* abort.c (abort): Ensure application terminates if raise returns.

Sun Jun 29 00:00:00 1997 CL0011
Nick Burrett  <nick.burrett@btinternet.com>

	* signal/coredump.c (__backtrace): More stringent checks for
	out-of-bounds memory accesses.

Fri Jun 27 00:00:00 1997 CL0010
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* alloc.c: Comment out malloc_stats to remove stdio dependency.

	* clib/stdio.h [FILE]: Add __string_istream flag.
	(__underflow): Rename to __peekchar.
	[__UNIXLIB_INTERNALS]: Add.
	
	* clib/unixlib/fd.h [BADF]: Ensure an out-of-range fd will return
	true instead of false.

	* sys/syslib.c: Move __funcall_error from here.
	* common/funcallerr.c: Container file for __funcall_error.

	* signal/siginfo.c: Use os_print to remove stdio dependency.
	* stdio/filbuf.c: Check __string_istream flag.
	* stdio/fread.c: Likewise.
	* stdio/scanf.c (sscanf, vfscanf): Fix.
	* sys/exec.c: Call malloc_trim before copying parent process up in
	memory.
	* sys/_os.s (os_swi): Place in a READONLY code section.
	* time/setitmr.c (timer_controls): Make const.
	* unix/tty.c: Remove need to have global __t variable.
	* unix/unix.c: Local version of strtoul.
	[__sfix_default]: Created. Allows sfix string to be writable.
	(default_outfd): Fix assignment bug.
	
	* clib/stdlib.h (malloc_trim): Add prototype.

Thu Jun 26 00:00:00 1997 CL0009
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* resource/initialise.c: Use u_char* when performing arithmetic on
	__lomem and __break. Correct error where a non-dynamic area program
	had its data limit set to 1/4 of its real value.
	
	* sys/exec.c: realloc bug fixes.
	* sys/mman.c: Fix bad use of strncpy.
	* sys/_kernel.s (_kernel_osfile): New function.

Tue Jun 24 00:00:00 1997 CL0007
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/kernel.h (_kernel_udiv): Declare prototype.
	(_kernel_sdiv, _kennel_smod, _kernel_umod): Likewise.
	(_kernel_udiv10, _kernel_sdiv10, _kernel_fpavailable): Likewise
	* sys/_syslib.s (_kernel_udiv10): New function.
	(_kernel_sdiv10): New function.
	(_kernel_fpavailable): New function.

Sun Jun 22 00:00:00 1997 CL0008
Peter Burwood  <pjb@arcangel.dircon.co.uk>

	* mktime.c: Fixed gcc register must appear first warning.
	* clib/errno.h [__set_errno]: New macro.
	* clib/kernel.h [_kernel_last_oserror]: New structure.
	* clib/setjmp.h [__attribute__]: Undefine
	* clib/stdlib.h (_exit): Remove decl.
	[__UNIXLIB_INTERNALS]: Use.
	* clib/unistd.h (_exit): Add gcc's __noreturn__ attribute.
	(brk): Remove const qualifier.
	* clib/sys/os.h [__UNIXLIB_INTERNALS]: Use.
	* clib/sys/syslib.h (__funcall_error): Make 1st arg const.
	(__exit*): Add __noreturn__ attribute.
	(__real_break): Add.
	[__UNIXLIB_INTERNALS]: Use.
	* clib/unixlib/sigstate.h [__SIG_INVALID_P]: New macro.
	* signal/coredump.c (__backtrace): Don't restore exit handler.
	
	* signal/init.c: Use __set_errno and __SIG_INVALID_P.
	* signal/kill.c: Likewise.
	* signal/post.c: Likewise.
	* signal/raise.c: Likewise.
	* signal/sig*.c: Likewise.
	* signal/sleep.c: Likewise.

	* sys/exec.c: Reduce memory requirements of argv and argv[].
	* sys/vfork.c: Likewise.
	* unix/unix.c: Likewise. Set errno to E2BIG if command line too long.
	(__unixinit): Don't call lseek on tty.

	* sys/syslib.c (exit): Remove Nick Clark's change.

	* sys/_exec.s: Use __real_break instead of __break.
	* sys/_vfork.s: Likewise.

	* sys/_os.s (os_prhex): Adjust stack pointer so it is below buffer.
	* sys/_syslib.s (__real_break): Initialise.
	(_exit): Call __munmap_all.

	* unix/getenv.c: Don't set errno if variable was not found.
	* unix/putenv.c: Fix #include filename.

	* alloc.c: Latest version from Doug Lea.
	* sys/brk.c: Re-written.
	* sys/mman.c: New file.
	* clib/sys/mman.h: New file.
	* sys/_mman.s: New file.
	* sys/os.c (__seterr): Don't reset errno if there is no error.
	(__seterr_): Likewise.
	(__kernel_last_oserror): New function.


Sun Jun 22 00:00:00 1997 CL0006
Nick Burrett  <nick.burrett@btinternet.com>

	* stdio/*.c (__fill_buffer): Rename from __underflow.
	* clib/stdio.h (__fill_buffer): Rename from __underflow.

Wed Jun 18 00:00:00 1997 CL0005
Nicholas Clark  <nickc@liv.ac.uk>

	* common/serial.c: Canonicalise the filename.

Tue Jun 17 00:00:00 1997 CL0004
Nicholas Clark  <nickc@liv.ac.uk>

	* errno.c: Initialise errno to zero.
	* clib/limits.h [QUAD_MAX]: Define.
	* clib/sys/os.h (__the_error): Renamed from the_error and made global.
	* stdio/scanf.c: Replace all 'char z' with 'int z'.
	* sys/sigsetjmp.c (__siglongjmp_helper): Add const to arg.

Mon Jun 16 00:00:00 1997 CL0003
Nick Burrett  <nick.burrett@btinternet.com>

	* unix/fnmatch.c: New file.
	* clib/fnmatch.h: New file.

Sun Jun 15 00:00:00 1997 CL0002
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/unixlib/types.h (__sigset_t): Define.
	(__sig_atomic_t): Define.
	* clib/signal.h: Use __sigset_t, __sig_atomic_t.

	* clib/setjmp.h (sigsetjmp): Declare.
	(siglongjmp): Declare.
	* sys/sigsetjmp.c: New file.
	* sys/_jmp.s (sigsetjmp): New function.
	(siglongjmp): New function.

	* signal/sigprocmsk.c [SIG_BLOCK]: OR the mask instead of ANDing it.

Sat Jun 14 00:00:00 1997 CL0001
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdio.h (__underflow): Declare.
	* stdio/filbuf.c: Restructure.
	(__underflow): New function.
	* stdio/scanf.c [peekc]: Use __underflow.

Fri Jun 13 00:00:00 1997 CL0000
Nick Burrett  <nick.burrett@btinternet.com>

	* clib/stdio.h (__getmode): Declare.
	(__steam_init): Declare.
	* stdio/fopen.c (freopen): Remove.
	(getmode): Remove
	(stream_init): Remove
	* stdio/newstream.c (__getmode): Define.
	(__stream_init): Define.
	* stdio/freopen.c: New file.
	* unix/reopen.c: New file.
	* clib/unixlib/local.h (__reopen): Declare.
