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: 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 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 funtion 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 Nauls.
	* 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 loose 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'trely on R0 being uncorrupted.
	netlib/_getsockopt.s:
	netlib/_setsockopt.s:
	  NetSWI0 - ie don'trely 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 loose 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.
