home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
readme36c
< prev
next >
Wrap
Text File
|
1993-02-24
|
17KB
|
362 lines
W A R N I N G
The release of this document establishes public prior use of the name
"ARMix" as referred to in this document. This document in it's entirety
is (c) Copyright 1993 H.Rogers, all rights reserved. UNIX is a registered
trademark of AT&T Corporation, Unix Systems Laboratories.
N O T I C E
UnixLib v3.6c will be the _last_ release of UnixLib. UnixLib functionality
will shortly be replaced by ARMix - a POSIX kernel extension to RiscOS
with associated libraries. ARMix will provide virtual memory, preemptive
scheduling, windowed terminals, full POSIX process and file management,
BSD network library support, and support for an eventual port of the BSD
filesystem. ARMix is scheduled for Alpha release in May 1993. Please
contact the address at the end of this document for more information.
This version is being released as a stop gap measure to provide UnixLib
users with some bugfixes. Do not base long term development on UnixLib
any longer - it will shortly be obsolete and is no longer actively supported
by the author. In particular code written for ARMix already providing
superior functionality to UnixLib includes an interrupt driven POSIX compliant
terminal driver with dynamically loadable hardware support modules, POSIX
compliant RiscOS 3.10 filesystem interface, POSIX/BSD process management
and signals, and a virtual memory system. The design of ARMix is completed -
the work remaining is comparatively routine coding. UnixLib is very non
compliant with POSIX - ARMix is written from scratch to be 100% POSIX
compliant.
H.Rogers 14/2/1993
UnixLib v3.6c (29/8/1992)
This is a complete replacement ANSI compliant C library for use
with Acorn RiscOS ANSI C Release 3.0/3.1A/3.1B/4.0. It incorporates a
subset of the UNIX system call interface and some common System V and
4.3 BSD C libraries. There is *no* Acorn software in this library - take
note Acorn! ;-)
Recent changes to UnixLib are documented towards the end of this file.
Directories marked '#' below contain proprietary source code. Source code
in these directories is Copyright 1990/1991/1992 H.Rogers and XFM Software,
and may only be distributed or modified in connection with UnixLib
development. All other use or distribution is strictly prohibited.
This entire paragraph and the list of directories below must be present
in a file called "ReadMe" in a prominent place on all media used to
distribute the aforementioned source code or derivations thereof. Failure
to comply with the above requirements is breach of copyright and other
international laws.
!Alias * Alias file (see "ReadMe")
!Boot !Boot for UnixLib maintenance
clib * Library directory
clib.h * UnixLib ANSI header files
clib.o * UnixLib directory
clib.o.unixlib * UnixLib itself
clib.sys.h * UnixLib specific header files
etc * UnixLib version of /etc
ReadMe * Documentation for UnixLib - this file
src Source code
src.ReadMe Documentation for source code
src.o UnixLib portable object code
src.c # UnixLib portable source code
src.stdio.o UnixLib stdio object code
src.stdio.c # UnixLib stdio source code
src.unix.c UnixLib UNIX emulation source code
src.unix.o UnixLib UNIX emulation object code
src.sys.c UnixLib RiscOS related source code
src.sys.s UnixLib RiscOS related source code (ARM code)
src.sys.o UnixLib RiscOS related object code
test UnixLib test programs
test.ReadMe Documentation for test programs
Asterisked files/directories are those that are necessary to compile
programs with UnixLib. If you are installing UnixLib onto a hard disk you
are advised not to change the organization of the directory tree other than
to move etc into the root directory, since updates will be issued with
this structure.
!Alias *must* be executed before using this library. It contains necessary
command line aliases that need to be set for the C compiler to work correctly
with UnixLib. Comments in the file explain it. RTFM to see what the command
line arg.s do. !Alias can of course be inserted into any other command file.
!Boot contains !Alias, and also sets up other aliases to facilitate
maintenance of UnixLib. These are documented within the !Boot file.
All the header files, etc. are completely different from the Acorn
equivalents. You *must* have the entire clib directory completely separate
from any Acorn code or header files. If you do not have it called 'clib' in
the root directory you may need to modify !Alias.
Csh style command line redirection is now inbuilt to UnixLib. UnixLib programs
that are invoked direct from OS_CLI scan the command line for redirections at
the same time as performing argument processing. UnixLib programs invoked as
children of other UnixLib programs inherit the parent's file descriptor set
(as in UNIX), and therefore do not perform this scanning. Redirection
directives that are supported are: ">", ">>", ">&", ">>&", "<".
There are environment variables specific to UnixLib programs; some are new to
v3.6c and others have had their names changed:
Unix$uid: If set, then it's value is used to set the UNIX uid.
Unix$tty: controls which terminal file programs use - if unset or set
to "/dev/console" or "/dev/tty" then the console (Archimedes keyboard/screen)
is assumed; if set to "/dev/rs423" then the RS423 port is used. Other names
may be allocated in future for multiple serial I/O ports, Econet, etc. Note
that these names may be used by UnixLib programs to open the corresponding
devices.
All user settable environment variables particular to UnixLib are prefixed
with Unix$ or UnixFS$. However certain state information internal to UnixLib
is stored in variables prefixed with UnixLib$ - such variables should be
ignored and not altered or deleted. UnixLib$dir (set by the !Alias command
file in this distribution) is only used when compiling with UnixLib, and does
not need to be set for UnixLib compiled programs to run.
The standard UNIX environment variables which control the behaviour of some
of the C libraries are as normal - SHELL, TERM, TERMCAP, etc. Note that
system() ignores the requirement for a shell if SHELL is unset, but calls
SHELL with the '-c' option (as per UNIX) is it is set. I.e. if you have GNU
bash in adfs::4.$.library you should set SHELL to "adfs::4.$.library.bash".
Filename conversion:
Programs compiled using UnixLib now intelligently scan pathnames (complex
filenames consisting of components delimited by '/') and work out for
themselves whether a RiscOS or UNIX initial component is being used. With
very few exceptions existing RiscOS and UNIX applications will work
without alteration.
Filename suffix translation can now be customised. The variable UnixFS$sfix
can be set to a colon separated value list of filename suffixes that are to
be aliased to RiscOS subdirectories. If it is unset the default list is
"a:c:f:h:i:l:o:p:s:y". I.e. "hero.c" gets translated to "c.hero".
UNIX style pathnames can now contain RiscOS style components:
/adfs::4/etc/passwd
adfs::4/etc/passwd
/adfs::4.etc.passwd
adfs::4.etc/passwd all translate to: adfs::4.$.etc.passwd
<UnixLib$Dir>/clib/o
<UnixLib$Dir>.clib/o all translate to: <UnixLib$Dir>.clib.o
<UnixLib$Dir>/clib.o translates to: <UnixLib$Dir>.o.clib
/<UnixLib$Dir>/clib.o translates to: $.<UnixLib$Dir>.o.clib
/SCSIFS::$/tmp/<Temp> translates to: SCSIFS::$.tmp.<Temp>
$/clib
$.clib
/$.clib
/clib all translate to: $.clib
@/clib
@.clib both translate to: @.clib
clib translates to: clib
ThisIsVeryLong## translates to: ThsIsVryLn
If there exists a directory called $.src.ulib.src.unix then:
/src.ulib/src.unix/uname.c
will translate to:
$.src.ulib.src.unix.c.uname
otherwise it will translate to:
$.src/ulib.src/unix.c.uname
Pathnames referring to UNIX devices (of the form "/dev/xxx") are treated
specially and refer to appropriate devices. Unrecognised devices are
translated to "xxx:". Current recognised devices are "/dev/tty",
"/dev/console", "/dev/rs423" and "/dev/null".
Variables of the form UnixFS$/xxx are used to alias UNIX pathnames commencing
"/xxx", "/usr/xxx" or "/