Name Date Size #Lines LOC

..--

READMEH A D07-Jun-20009.3 KiB197178

README.Plan9H A D18-Feb-2003792 2619

alloc.cH A D18-Feb-200313.6 KiB592464

c_ksh.cH A D07-Jun-200031.3 KiB1,4721,222

c_sh.cH A D11-Mar-201219.3 KiB906705

c_test.cH A D07-Jun-200014.8 KiB663520

c_test.hH A D07-Jun-20001.8 KiB5443

c_ulimit.cH A D07-Jun-20006.6 KiB272235

conf-end.hH A D07-Jun-20001.7 KiB5629

config.hH A D07-Jun-200010 KiB36554

eval.cH A D07-Jun-200030.7 KiB1,3771,085

exec.cH A D07-Jun-200038 KiB1,6881,292

expand.hH A D07-Jun-20002.7 KiB10766

expr.cH A D07-Jun-200013 KiB606521

history.cH A D07-Jun-200023.5 KiB1,191880

io.cH A D07-Jun-200010.5 KiB552438

jobs.cH A D07-Jun-200044.4 KiB1,8751,427

ksh_dir.hH A D07-Jun-2000653 2621

ksh_limval.hH A D07-Jun-2000448 2416

ksh_stat.hH A D07-Jun-20001.6 KiB5949

ksh_time.hH A D07-Jun-2000478 2619

ksh_times.hH A D07-Jun-2000413 1913

ksh_wait.hH A D07-Jun-20001.2 KiB5140

lex.cH A D07-Jun-200028.7 KiB1,3941,119

lex.hH A D07-Jun-20003.7 KiB131105

mail.cH A D07-Jun-20004 KiB195149

main.cH A D14-Oct-200018.9 KiB848617

misc.cH A D17-Jun-200027.7 KiB1,3061,024

mkfileH A D26-Mar-2003549 4235

path.cH A D07-Jun-20007.2 KiB345222

proto.hH A D07-Jun-200011.7 KiB301265

sh.hH A D17-Jun-200022.3 KiB750555

shf.cH A D07-Jun-200027 KiB1,2951,006

shf.hH A D07-Jun-20003.4 KiB8669

syn.cH A D07-Jun-200019.9 KiB946777

table.cH A D07-Jun-20004.7 KiB238199

table.hH A D07-Jun-20005.8 KiB182136

trap.cH A D08-Jan-201210.2 KiB455339

tree.cH A D07-Jun-200014.8 KiB759645

tree.hH A D07-Jun-20004.9 KiB14199

tty.cH A D07-Jun-20003.9 KiB178150

tty.hH A D07-Jun-20003 KiB10976

var.cH A D07-Jun-200026.7 KiB1,227983

version.cH A D07-Jun-2000129 93

README

1
2Last updated Jul '99 for pdksh-5.2.14.
3	(check ftp://ftp.cs.mun.ca:/pub/pdksh/ or
4	 http://www.cs.mun.ca/~michael/pdksh/ for new versions/patches)
5
6PD-ksh is a mostly complete AT&T ksh look-alike (see NOTES file for a list
7of things not supported).  Work is mostly finished to make it fully
8compatible with both POSIX and AT&T ksh (when the two don't conflict).
9
10Since pdksh is free and compiles and runs on most common unix systems, it
11is very useful in creating a consistent user interface across multiple
12machines.  For example, in the CS dept. of MUN, pdksh is installed on a
13variety of machines including Suns, HPs, DecStations, pcs running Linux,
14etc., and is the login shell of ~5200 users.
15
16PDksh is currently being maintained by Michael Rendell (michael@cs.mun.ca),
17who took over from Simon J. Gerraty (sjg@zen.void.oz.au) at the later's
18suggestion.  A short list of things that have been added since the last
19public pdksh release (4.9) are auto-configuration, arrays, $(( .. )),
20[[ .. ]], variable attributes, co-processes, extended file globbing,
21many POSIXisms and many bug fixes.  See the NEWS and ChangeLog files for
22other features added and bugs fixed.
23
24Note that pdksh is provided AS IS, with NO WARRANTY, either expressed or
25implied.  Also note that although the bulk of the code in pdksh is in the
26public domain, some files are copyrighten (but freely distributable) and
27subject to certain conditions (eg, don't remove copyright, document any
28changes, etc.).  See the LEGAL file for details.
29
30If you would like to be notified via email of new releases as they become
31available, send mail to pdksh-request@cs.mun.ca with subject
32"send release notifications" (or "don't send release notifications" to stop
33them).
34
35
36Files of interest:
37	NEWS		short list of noticeable changes in various versions.
38	CONTRIBUTORS	short history of pdksh, people who contributed, etc.
39	NOTES		lists of known bugs in pdksh, at&t ksh, and posix.
40	PROJECTS	list of things that need to be done in pdksh.
41	BUG-REPORTS	list of recently reported bugs that have been fixed
42			and all reported bugs that haven't been fixed.
43	LEGAL		A file detailing legal issues concerning pdksh.
44	etc/*		system profile and kshrc files used by Simon J. Gerraty.
45	misc/README*	readme files from previous versions.
46	misc/Changes*	changelog files from previous versions.
47	os2/*		files and info needed to compile ksh on os/2.
48	tests/*		pdksh's regression testing system.
49
50
51Compiling/Installing:
52
53  The quick way:
54	./configure
55	make
56	make check	# optional
57	make install	# will install /usr/local/bin/ksh
58			#  and /usr/local/man/man1/ksh.1
59	[add path-to-installed-pdksh to /etc/shells]
60
61  The more detailed description:
62    * run "configure --help | your-favorite-pager" and look at the
63      --enable-* and --disable-* options (they are at the end).
64      Select any you options you wish to enable/disable
65      (most people can skip this step).
66    * run configure: this is a GNU autoconf configure script that will generate
67      a Makefile and a config.h.  Some of the useful options to configure are:
68	--prefix=PATH	    indicates the directory tree under which the binary
69			    and man page are installed (ie, PATH/bin/ksh and
70			    PATH/man/man1/ksh.1).
71			    The default prefix is /usr/local.
72	--exec-prefix=PATH  overrides --prefix for machine dependent files
73			    (ie, the ksh binary)
74	--program-prefix=pd install binary and man page as pdksh and pdksh.1
75	--verbose	    show what is being defined as script runs
76      Note that you don't have to build in the source directory.  To build
77      in a separate directory, do something like:
78		$ mkdir objs
79		$ cd objs
80		$ ../configure --verbose
81		....
82		$ make
83      See the file INSTALL for a more complete description of configure and its
84      generic options (ksh specific options are documented in the --help output)
85    * miscellaneous configuration notes:
86	* If your make doesn't understand VPATH, you must compile in
87	  the source directory.
88	* On DecStations, MIPS and SONY machines with older C compilers that
89	  can't handle "int * volatile x", you should use gcc or turn off
90	  optimization.  The problem is configure defines volatile to nothing
91	  since the compiler can't handle it properly, but the compiler does
92	  optimizations that the volatile is meant to prevent.   So.  Use gcc.
93	* On MIPS RISC/os 5.0 systems, sysv environment, <signal.h> is
94	  messed up - it defines sigset_t, but not any of the rest of
95	  the posix signals (the sigset_t typedef should be in the
96	  ifdef KERNEL section) - also doesn't have waitpid() or wait3().
97	  Things compile up ok in the svr4 environment, but it dumps core
98	  in __start (perhaps our system doesn't have the full svr4
99	  environ?).  Try compiling in the bsd43 environ instead (still not
100	  perfect - see BUG-REPORTS file), using gcc - cc has problems with
101	  macro expansions in the argument of a macro (in this case, the ARGS
102	  macro).
103	* On TitanOS (Stardent/Titan), use `CC="cc -43" configure ...'.
104	  When configure finishes, edit config.h, undef HAVE_DIRENT_H and
105	  define HAVE_SYS_DIR_H (the dirent.h header file is broken).
106	* On Linux (red hat distribution), check that /dev/tty has mode 0666
107	  (not mode 0644).  If it has the wrong permissions, ksh will print
108	  warnings about not being able to do job control.
109	* on NeXT machines (3.2, probably other releases), the siglist.out file
110	  won't be generated correctly if you try to use the system's compiler
111	  (it has a broken cc -E and strange header files).  There are two
112	  ways to make it work:
113	    1) if you have gcc, use it (for everything).  Alternatively,
114	       force configure to use it for CPP, i.e., use
115		  CPP="gcc -E" configure ...
116	    2) Force configure to use some extra CPPFLAGS, using
117		  CPPFLAGS="XXX" configure ...
118	       where XXX is obtained from running "cc -v YYY.c" on some
119	       C file.  Look at the options passed to cpp (there are lots
120	       of them...) and replace the XXX above with them.
121	  Make sure you do a "make distclean" (or "rm config.cache") if
122	  you re-run configure with a difference CPP or CPPFLAGS.
123	  Also note that if you are building multiple arch binaries, you
124	  will have to specify both CC and CPP.
125    * run make: everything should compile and link without problems.
126    * run make check: this fires up a perl script that checks for some known
127      and some fixed bugs.  The script prints pass/fail for tests it expected
128      to pass/fail, and PASS/FAIL for tests it expected to fail/pass.  If you
129      don't have perl, or if your perl doesn't work (most common problem is
130      the .ph header files are missing or broken), you can run
131	  ENV= path-to-pdksh-executable misc/Bugs path-to-pdksh-executable
132      instead.
133    * run make install: this installs ksh (in /usr/local/bin/ksh by default,
134      or where ever you told configure to put things).
135    * add path-to-installed-pdksh to /etc/shells if it's not already there.
136      This is only needed if you intend to use pdksh as a login shell (things
137      like ftp won't allow users to connect in if their shell isn't in this
138      file).
139
140The following is a list of machines that pdksh is reported to work on:
141    -/PC Linux 1.x,2.x
142    -/PC NetBSD 0.9a
143    -/PC BSDI 1.1
144    -/PC FreeBSD 2.x, 3.x
145    -/PC OpenBSD
146    -/PC Interactive/Sunsoft 3.0.1 and 4.1 (note that problems have been
147	    reported with isc3.2 - see the BUG-REPORTS file)
148    -/PC OS/2
149    Commadore/Amiga NetBSD 1.0
150    Dec/alpha OSF/1 v2.x, v3.x
151    Dec/alpha NetBSD 1.1B
152    Dec/pmax Ultrix 4.2
153    Dec/vax Ultrix 2.2 (not tested recently :-))
154    Dec/vax 4.3BSD+NFS (MtXinu) (not tested recently :-))
155    HP/pa HP-UX 9.01
156    IBM/RS/6000 AIX 3.2.5
157    MIPS/m120 RISC/os 5.0 (bsd43 environ)
158    NeXT NeXTStep 3.2
159    SGI/IRIX 6.2
160    Sun/sun4 SunOS 4.1.3, 4.1.4
161    Sun/sun4 Solaris 2.x
162    Sun/sun386i SunOS 4.0.2
163    Sun/sun3 SunOS 4.0.3, 4.1.1_U1
164    Stardent/TitanOS 4.2
165
166
167Newer versions of pdksh may be available from
168	ftp://ftp.cs.mun.ca:/pub/pdksh/
169you may want to check for one if you run into any problems, as the problem may
170already be fixed (you can get new release notifications automatically - see
171above).  The file pdksh-unstable-XXX.tar.gz has the very latest version which
172may not compile (it is generated automatically when changes are detected
173in the main source repository) - it is for those who want to follow
174changes as they are made.
175
176You can send bug reports, fixes, and enhancements to pdksh@cs.mun.ca (please
177don't assume I will see bug reports that are posted to some newsgroup or
178mailing list - I probably won't).
179If you are reporting a bug (with or without a fix), please include
180	* the version of pdksh you are using (see version.c, or, if you are
181	  running pdksh, try echo $KSH_VERSION),
182	* the machine, operating system and compiler you are using,
183	* and a description of how to repeat the bug (a small shell
184	  script that demonstrates the bug is best).
185as well as the following, if relevant (if you aren't sure, include them)
186	* what options you are using (both configure options and set -o options)
187	* the output of configure, with the verbose flag
188	  (eg, make distclean; ./configure --verbose)
189	* the contents of config.log (this is created by the configure script)
190	* if you are using gcc (the GNU C compiler), which version it is.
191
192BTW, THE MOST FREQUENTLY REPORTED BUG IS
193	echo hi | read a; echo $a	# Does not print hi
194I'm aware of this and there is no need to report it.
195
196Michael Rendell, michael@cs.mun.ca
197

README.Plan9

1This is a Plan 9 port of pdksh version 5.2.14, a public
2domain implementation of the Korn shell.
3
4The entirety of the code is in the public domain.
5There were two non-public domain pieces (sigact.[ch]
6and aclocal.m4) but they are gone.
7
8This has not been significantly tested under Plan 9 for
9lack (not want) of a complete Perl distribution with
10which to run the test suite.
11
12THIS IS NOT A COMPLETE PDKSH DISTRIBUTION.
13This is only the source code required to compile and
14run the shell under Plan 9.  For revision history and
15any other information, look at the web page mentioned
16in the README file.
17
18Russ Cox <rsc@plan9.bell-labs.com>
19March 2000
20
2112 June 2000: rsc: Added -I flag so you can
22	bind pdksh over rc for use in mk,
23	a dubious justification.
24
2531 Dec 2002: rsc: Killed all ifdefs.
26