[comp.sources.bugs] perl 3.0 patch #16

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (03/29/90)

System: perl version 3.0
Patch #: 16
Priority: MED-HIGH
Subject: MSDOS support
Subject: support for machines that can't cast negative floats to unsigned ints
Subject: Configure didn't use the optional libraries it found
Subject: yet another nm format from SVR4
Subject: MIPS machines don't like volatile on typedefs
Subject: added ctime.pl
Subject: added syslog.pl
Subject: documented workaround for SunOS 4.0.[12] fputs bug
Subject: sample client wasn't inputting from stdin
Subject: non-terminal blocks should never have arrays requested of them
Subject: formats didn't work inside eval
Subject: $foo++ now optimized to ++$foo where value not required
Subject: sprintf($s,...,$s,...) didn't work
Subject: system() can lose arguments passed to shell scripts on SysV machines
Subject: use of $`, $& or $' sometimes causes memory leakage
Subject: splice(@array,0,$n) can cause duplicate free
Subject: grep blows up on undefined array values
Subject: .. now works using magical string increment
Subject: changed unsigned to unsigned int
Subject: ioctl didn't return values correctly
Subject: @dbmvalues{'foo','bar'} could use the same cache entry for both values
Subject: do FILE inside eval blows up
Subject: strings with prefix chopped off sometimes freed wrong
Subject: taint check blows up on undefined array element
Subject: final semicolon in program wasn't optional with -p or -n
Subject: tail anchored pattern could dump if string to search was shorter

Description:
	There is now support for compiling perl under the Microsoft C
	compiler on MSDOS.  Special thanks go to Diomidis Spinellis
	<dds@cc.ic.ac.uk> for this.  To compile under MSDOS, look at the
	readme file in the msdos subdirectory.

	As a part of this, six files will be renamed when you run
	Configure.  These are config.h.SH, perl.man.[1-4] and t/op.subst.

	Suns (and perhaps other machines) can't cast negative floating
	point numbers to unsigned ints reasonably.  Configure now detects
	this and takes appropriate action.

	Configure looked for optional libraries but then didn't ever use
	them, even if there was no config.sh value to override.

	System V Release 4 provides us with yet another nm format for
	Configure to parse.  No doubt it's "better".  Sigh.

	MIPS CPUs running under Ultrix were getting configured for volatile
	support, but they don't like volatile when applied to a type generated
	by a typedef.  Configure now tests for this.

	I've added two new perl library routines: ctime.pl from
	Waldemar Kebsch and Marion Hakanson, and syslog.pl from Tom
	Christiansen and me.

	In subroutines, non-terminal blocks should never have arrays
	requested of them, even if the subroutine call's context is
	looking for an array.

	Formats didn't work inside eval.  Now they do.

	Any $foo++ that doesn't return a value is now optimized to ++$foo
	since the latter doesn't require generation of a temporary to hold
	the old value.

	A self-referential printf pattern such as sprintf($s,...,$s,...)
	would end up with a null as the first character of the next field.

	On machines that don't support executing scripts in the kernel,
	perl has to emulate that when an exec fails.  In this case,
	the do_exec() routine can lose arguments passed to the script.

	A memory leakage in pattern matching triggered by use of $`, $& or $' 
	has been fixed.

	A splice that pulls up the front of an array such as splice(@array,0,$n)
	can cause a duplicate free error.

	The grep operator blew up on undefined array values.  It now handles
	them reasonably, setting $_ to undef.

	The .. operator in an array context is used to generate number
	ranges.  This has been generalized to allow any string ranges that
	can be generated with the magical increment code of ++.  So
	you can say 'a' .. 'f', '000'..'999', etc.

	The ioctl function didn't return non-zero values correctly.

	Associative array slices from dbm files like @dbmvalues{'foo','bar'}
	could use the same cache entry for multiple values, causing loss of
	some of the values of the slice.  Cache values are now not flushed
	until the end of a statement.

	The do FILE operator blew up when used inside an eval, due to trying
	to free the eval code it was still executing.

	If you did s/^prefix// on a string, and subsequently assigned a
	value that didn't contain a string value to the string, you could
	get a bad free error.

	One of the taint checks blew up on undefined array elements, which
	showed up only when taintperl was run.

	The final semicolon in program is supposed to be optional now.
	Unfortunately this wasn't true when -p or -n added extra code
	around your code.  Now it's true all the time.

	A tail anchored pattern such as /foo$/ could cause grief if you
	searched a string that was shorter than that.

Fix:	From rn, say "| patch -p -N -d DIR", where DIR is your perl source
	directory.  Outside of rn, say "cd DIR; patch -p -N <thisarticle".
	If you don't have the patch program, apply the following by hand,
	or get patch (version 2.0, latest patchlevel).

	After patching:
		*** DO NOTHING--INSTALL ALL PATCHES UP THROUGH #18 FIRST ***

	Note: some systems will get a rejection on two hunks of MANIFEST.
	That's okay, just ignore it.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel.h file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

	If you are missing previous patches they can be obtained from me:

	Larry Wall
	lwall@jpl-devvax.jpl.nasa.gov

	If you send a mail message of the following form it will greatly speed
	processing:

	Subject: Command
	@SH mailpatch PATH perl 3.0 LIST
		   ^ note the c

	where PATH is a return path FROM ME TO YOU either in Internet notation,
	or in bang notation from some well-known host, and LIST is the number
	of one or more patches you need, separated by spaces, commas, and/or
	hyphens.  Saying 35- says everything from 35 to the end.


	You can also get the patches via anonymous FTP from
	jpl-devvax.jpl.nasa.gov (128.149.1.143).

Index: patchlevel.h
Prereq: 15
1c1
< #define PATCHLEVEL 15
---
> #define PATCHLEVEL 16

Index: msdos/Changes.dds
*** msdos/Changes.dds.old	Tue Mar 27 16:40:11 1990
--- msdos/Changes.dds	Tue Mar 27 16:40:13 1990
***************
*** 0 ****
--- 1,57 ----
+ These are the changes done by the `patches' file:
+ 
+ [These patches have been applied, more or less, so I don't supply the
+ patches file--law]
+ 
+ Compilation of some portions is done conditional on the definition
+ of the following symbols:
+ 
+ BINARY		Enables the usage of setmode under MSDOS (added binmode command)
+ BUGGY_MSC	Adds #pragma_function(memset) to avoid internal compiler error
+ CHOWN		Enables chown
+ CHROOT		Enables chroot
+ FORK		Enables fork and changes the compilation of system
+ GETLOGIN	Enables getlogin
+ GETPPID		Enables getppid
+ GROUP		Enables all the group access functions
+ KILL		Enables kill
+ LINK		Enables link
+ PASSWD		Enables all the password access functions
+ PIPE		Enables the pipe function
+ WAIT		Enables the wait function
+ UMASK		Enables the umask function
+ 
+ S_IFBLK *	Enables the block special device check
+ S_ISGID *	Enables the setgid check
+ S_ISUID *	Enables the setuid check
+ S_ISVTX *	Enables the vtx check
+ unix *		Compiles globbing for Unix
+ MSDOS *		Compiles globbing for MS-DOS
+ 		Closes stdaux and stdprn on startup
+ 		Adds a copyright message for -v
+ 		Disables the compilation of my_popen, my_pclose as the
+ 		are in a separate file.
+ 
+ Symbols marked with * are defined in the compilation environment.  The
+ rest should be added to config.h (config.h.SH).  All functions when not
+ supported give a fatal error.
+ 
+ Added documentation for the binmode function in the manual.
+ 
+ Fixed the following bugs:
+ 
+ In eval.c function eval if ioctl or fcntl returned something
+ other than 0 or -1 the result was a random number as the
+ double `value' variable wasn't set to `anum'.
+ 
+ In doio.c function do_exec there were two errors associated with
+ firing up the shell when the execv fails.  First argv was not freed,
+ secondly an attempt was made to start up the shell with the cmd
+ string that was now cut to pieces for the execv.  Also the maxible
+ possible length of argv was calculated by (s - cmd).  Problem was
+ that s was not pointing to the end of the string, but to the first
+ non alpha.
+ 
+ [These are incorporated in patches 15 and 16--law]
+ 
+ Diomidis Spinellis, March 1990

Index: Configure
Prereq: 3.0.1.6
*** Configure.old	Wed Mar 28 09:19:55 1990
--- Configure	Wed Mar 28 09:20:03 1990
***************
*** 8,14 ****
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: Configure,v 3.0.1.6 90/03/12 16:10:23 lwall Locked $
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
--- 8,23 ----
  # and edit it to reflect your system.  Some packages may include samples
  # of config.h for certain machines, so you might look for one of those.)
  #
! # $Header: Configure,v 3.0.1.7 90/03/28 09:14:53 lwall Locked $
! 
! : make sure these files are renamed
! test -f config_h.SH || mv -f config.h.SH config_h.SH
! test -f perl_man.1 || mv -f perl.man.1 perl_man.1
! test -f perl_man.2 || mv -f perl.man.2 perl_man.2
! test -f perl_man.3 || mv -f perl.man.3 perl_man.3
! test -f perl_man.4 || mv -f perl.man.4 perl_man.4
! test -f t/op.s || mv -f t/op.subst t/op.s
! 
  #
  # Yes, you may rip this off to use in other distribution packages.
  # (Note: this Configure script was generated automatically.  Rather than
***************
*** 102,107 ****
--- 111,117 ----
  d_bcmp=''
  d_bcopy=''
  d_bzero=''
+ d_castneg=''
  d_charsprf=''
  d_crypt=''
  cryptlib=''
***************
*** 1110,1115 ****
--- 1120,1126 ----
  
  echo " "
  echo "Checking for optional libraries..."
+ dflt=''
  case "$libswanted" in
  '') libswanted='c_s';;
  esac
***************
*** 1153,1158 ****
--- 1164,1170 ----
  shift
  dflt="$*"
  case "$libs" in
+ '') dflt="$dflt";;
  *) dflt="$libs";;
  esac
  case "$dflt" in
***************
*** 1437,1442 ****
--- 1449,1456 ----
  else
      $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list
      $contains '^printf$' libc.list >/dev/null 2>&1 || \
+ 	$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p' <libc.tmp >libc.list
+     $contains '^printf$' libc.list >/dev/null 2>&1 || \
  	$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list
      $contains '^printf$' libc.list >/dev/null 2>&1 || \
         $sed -n -e 's/^_//' \
***************
*** 1492,1497 ****
--- 1506,1540 ----
  set bzero d_bzero
  eval $inlibc
  
+ : check for ability to cast negative floats to unsigned
+ echo " "
+ echo 'Checking to see if your C compiler can cast negative float to unsigned'
+ $cat >try.c <<'EOCP'
+ main()
+ {
+ 	double f = -123;
+ 	unsigned long along;
+ 	unsigned int aint;
+ 	unsigned short ashort;
+ 
+ 	along = (unsigned long)f;
+ 	aint = (unsigned int)f;
+ 	ashort = (unsigned short)f;
+ 	if (along == 0L || aint == 0 || ashort == 0)
+ 	    exit(1);
+ 	else
+ 	    exit(0);
+ }
+ EOCP
+ if $cc -o try $ccflags try.c >/dev/null 2>&1 && ./try; then
+     d_castneg="$define"
+     echo "Yup, it does."
+ else
+     d_castneg="$undef"
+     echo "Nope, it doesn't."
+ fi
+ $rm -f try.*
+ 
  : see if sprintf is declared as int or pointer to char
  echo " "
  cat >.ucbsprf.c <<'EOF'
***************
*** 1756,1761 ****
--- 1799,1859 ----
      echo "dbm.h not found."
  fi
  
+ socketlib=''
+ : see whether socket exists
+ echo " "
+ if $contains socket libc.list >/dev/null 2>&1; then
+     echo "Looks like you have Berkeley networking support."
+     d_socket="$define"
+     : now check for advanced features
+     if $contains setsockopt libc.list >/dev/null 2>&1; then
+ 	d_oldsock="$undef"
+     else
+ 	echo "...but it uses the old 4.1c interface, rather than 4.2"
+ 	d_oldsock="$define"
+     fi
+ else
+     : hpux, for one, puts all the socket stuff in socklib.o
+     if $contains socklib libc.list >/dev/null 2>&1; then
+ 	echo "Looks like you have Berkeley networking support."
+ 	d_socket="$define"
+ 	: we will have to assume that it supports the 4.2 BSD interface
+ 	d_oldsock="$undef"
+     else
+ 	echo "Hmmm...you don't have Berkeley networking in libc.a..."
+ 	: look for an optional networking library
+ 	if test -f /usr/lib/libnet.a; then
+ 	    (ar t /usr/lib/libnet.a ||
+ 		nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
+ 	    if $contains socket libc.list >/dev/null 2>&1; then
+ 		echo "but the Wollongong group seems to have hacked it in."
+ 		socketlib="-lnet"
+ 		d_socket="$define"
+ 		: now check for advanced features
+ 		if $contains setsockopt libc.list >/dev/null 2>&1; then
+ 		    d_oldsock="$undef"
+ 		else
+ 		    echo "...using the old 4.1c interface, rather than 4.2"
+ 		    d_oldsock="$define"
+ 		fi
+ 	    else
+ 		echo "or even in libnet.a, which is peculiar."
+ 		d_socket="$undef"
+ 		d_oldsock="$undef"
+ 	    fi
+ 	else
+ 	    echo "or anywhere else I see."
+ 	    d_socket="$undef"
+ 	    d_oldsock="$undef"
+ 	fi
+     fi
+ fi
+ if $contains socketpair libc.list >/dev/null 2>&1; then
+     d_sockpair="$define"
+ else
+     d_sockpair="$undef"
+ fi
+ 
  : see if this is a pwd system
  echo " "
  if $test -r /usr/include/pwd.h ; then
***************
*** 1850,1910 ****
  set setruid d_setruid
  eval $inlibc
  
- socketlib=''
- : see whether socket exists
- echo " "
- if $contains socket libc.list >/dev/null 2>&1; then
-     echo "Looks like you have Berkeley networking support."
-     d_socket="$define"
-     : now check for advanced features
-     if $contains setsockopt libc.list >/dev/null 2>&1; then
- 	d_oldsock="$undef"
-     else
- 	echo "...but it uses the old 4.1c interface, rather than 4.2"
- 	d_oldsock="$define"
-     fi
- else
-     : hpux, for one, puts all the socket stuff in socklib.o
-     if $contains socklib libc.list >/dev/null 2>&1; then
- 	echo "Looks like you have Berkeley networking support."
- 	d_socket="$define"
- 	: we will have to assume that it supports the 4.2 BSD interface
- 	d_oldsock="$undef"
-     else
- 	echo "Hmmm...you don't have Berkeley networking in libc.a..."
- 	: look for an optional networking library
- 	if test -f /usr/lib/libnet.a; then
- 	    (ar t /usr/lib/libnet.a ||
- 		nm -g /usr/lib/libnet.a) 2>/dev/null >> libc.list
- 	    if $contains socket libc.list >/dev/null 2>&1; then
- 		echo "but the Wollongong group seems to have hacked it in."
- 		socketlib="-lnet"
- 		d_socket="$define"
- 		: now check for advanced features
- 		if $contains setsockopt libc.list >/dev/null 2>&1; then
- 		    d_oldsock="$undef"
- 		else
- 		    echo "...using the old 4.1c interface, rather than 4.2"
- 		    d_oldsock="$define"
- 		fi
- 	    else
- 		echo "or even in libnet.a, which is peculiar."
- 		d_socket="$undef"
- 		d_oldsock="$undef"
- 	    fi
- 	else
- 	    echo "or anywhere else I see."
- 	    d_socket="$undef"
- 	    d_oldsock="$undef"
- 	fi
-     fi
- fi
- if $contains socketpair libc.list >/dev/null 2>&1; then
-     d_sockpair="$define"
- else
-     d_sockpair="$undef"
- fi
- 
  : see if stat knows about block sizes
  echo " "
  if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then
--- 1948,1953 ----
***************
*** 2067,2074 ****
--- 2110,2119 ----
  $cat >try.c <<'EOCP'
  main()
  {
+ 	typedef unsigned short foo_t;
  	char *volatile foo;
  	volatile int bar;
+ 	volatile foo_t blech;
  	foo = foo;
  }
  EOCP
***************
*** 2560,2565 ****
--- 2605,2611 ----
  d_bcmp='$d_bcmp'
  d_bcopy='$d_bcopy'
  d_bzero='$d_bzero'
+ d_castneg='$d_castneg'
  d_charsprf='$d_charsprf'
  d_crypt='$d_crypt'
  cryptlib='$cryptlib'

	Note: some systems will get a rejection on two hunks of MANIFEST.
	That's okay, just ignore it.

Index: MANIFEST
*** MANIFEST.old	Tue Mar 27 16:36:19 1990
--- MANIFEST	Tue Mar 27 16:36:22 1990
***************
*** 16,22 ****
  cmd.c			Command interpreter
  cmd.h			Public declarations for the above
  config.H		Sample config.h
! config.h.SH		Produces config.h
  cons.c			Routines to construct cmd nodes of a parse tree
  consarg.c		Routines to construct arg nodes of a parse tree
  doarg.c			Scalar expression evaluation
--- 16,22 ----
  cmd.c			Command interpreter
  cmd.h			Public declarations for the above
  config.H		Sample config.h
! config_h.SH		Produces config.h
  cons.c			Routines to construct cmd nodes of a parse tree
  consarg.c		Routines to construct arg nodes of a parse tree
  doarg.c			Scalar expression evaluation
***************
*** 41,46 ****
--- 41,47 ----
  eg/myrup		A program to find lightly loaded machines
  eg/nih			Script to insert #! workaround
  eg/rename		A program to rename files
+ eg/relink		A program to change symbolic links
  eg/rmfrom		A program to feed doomed filenames to
  eg/scan/scan_df		Scan for filesystem anomalies
  eg/scan/scan_last	Scan for login anomalies
***************
*** 51,56 ****
--- 52,58 ----
  eg/scan/scan_suid	Scan for setuid anomalies
  eg/scan/scanner		An anomaly reporter
  eg/shmkill		A program to remove unused shared memory
+ eg/travesty		A program to print travesties of its input text
  eg/van/empty		A program to empty the trashcan
  eg/van/unvanish		A program to undo what vanish does
  eg/van/vanexp		A program to expire vanished files
***************
*** 68,73 ****
--- 70,76 ----
  lib/abbrev.pl		An abbreviation table builder
  lib/look.pl		A "look" equivalent
  lib/complete.pl		A command completion subroutine
+ lib/ctime.pl		A ctime workalike
  lib/dumpvar.pl		A variable dumper
  lib/getopt.pl		Perl library supporting option parsing
  lib/getopts.pl		Perl library supporting option parsing
***************
*** 74,79 ****
--- 77,83 ----
  lib/importenv.pl	Perl routine to get environment into variables
  lib/perldb.pl		Perl debugging routines
  lib/stat.pl		Perl library supporting stat function
+ lib/syslog.pl		Perl library supporting syslogging
  lib/termcap.pl		Perl library supporting termcap usage
  lib/validate.pl		Perl library supporting wholesale file mode validation
  makedepend.SH		Precursor to makedepend
***************
*** 80,91 ****
  makedir.SH		Precursor to makedir
  makelib.SH		A thing to turn C .h file into perl .h files
  malloc.c		A version of malloc you might not want
  patchlevel.h		The current patch level of perl
  perl.h			Global declarations
! perl.man.1		The manual page(s), first fourth
! perl.man.2		The manual page(s), second fourth
! perl.man.3		The manual page(s), third fourth
! perl.man.4		The manual page(s), fourth fourth
  perl.y			Yacc grammar for perl
  perlsh			A poor man's perl shell
  perly.c			main()
--- 84,108 ----
  makedir.SH		Precursor to makedir
  makelib.SH		A thing to turn C .h file into perl .h files
  malloc.c		A version of malloc you might not want
+ msdos/Changes.dds	Expanation of MS-DOS patches by Diomidis Spinellis
+ msdos/Makefile		MS-DOS makefile
+ msdos/README.msdos	Compiling and usage information
+ msdos/Wishlist.dds	My wishlist
+ msdos/config.h		Definitions for msdos
+ msdos/dir.h		MS-DOS header for directory access functions
+ msdos/directory.c	MS-DOS directory access functions.
+ msdos/eg/crlf.bat	Convert files from unix to MS-DOS line termination
+ msdos/eg/drives.bat	List the system drives and their characteristics
+ msdos/eg/lf.bat		Convert files from MS-DOS to Unix line termination
+ msdos/glob.c		A command equivalent to csh glob
+ msdos/msdos.c		MS-DOS ioctl, sleep, gete?[gu]if, spawn, aspawn
+ msdos/popen.c		My_popen and my_pclose for MS-DOS
  patchlevel.h		The current patch level of perl
  perl.h			Global declarations
! perl_man.1		The manual page(s), first fourth
! perl_man.2		The manual page(s), second fourth
! perl_man.3		The manual page(s), third fourth
! perl_man.4		The manual page(s), fourth fourth
  perl.y			Yacc grammar for perl
  perlsh			A poor man's perl shell
  perly.c			main()
***************
*** 164,170 ****
  t/op.sprintf		See if sprintf works
  t/op.stat		See if stat works
  t/op.study		See if study works
! t/op.subst		See if substitutions work
  t/op.substr		See if substr works
  t/op.time		See if time functions work
  t/op.undef		See if undef works
--- 181,187 ----
  t/op.sprintf		See if sprintf works
  t/op.stat		See if stat works
  t/op.study		See if study works
! t/op.s			See if substitutions work
  t/op.substr		See if substr works
  t/op.time		See if time functions work
  t/op.undef		See if undef works

Index: msdos/Makefile
*** msdos/Makefile.old	Tue Mar 27 16:40:16 1990
--- msdos/Makefile	Tue Mar 27 16:40:17 1990
***************
*** 0 ****
--- 1,101 ----
+ #
+ # Makefile for compiling Perl under MS-DOS
+ #
+ # Needs a Unix compatible make.
+ # This makefile works for an initial compilation.  It does not
+ # include all dependencies and thus is unsuitable for serious
+ # development work.  But who would do serious development under
+ # MS-DOS?
+ #
+ # By Diomidis Spinellis, March 1990
+ #
+ 
+ # Source files
+ SRC = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c \
+ eval.c form.c hash.c perl.y perly.c regcomp.c regexec.c \
+ stab.c str.c toke.c util.c msdos.c popen.c directory.c
+ 
+ # Object files
+ OBJ = perl.obj array.obj cmd.obj cons.obj consarg.obj doarg.obj doio.obj \
+ dolist.obj dump.obj eval.obj form.obj hash.obj perly.obj regcomp.obj \
+ regexec.obj stab.obj str.obj toke.obj util.obj msdos.obj popen.obj \
+ directory.obj
+ 
+ # Files in the MS-DOS distribution
+ DOSFILES=config.h dir.h director.c glob.c makefile msdos.c popen.c readme.msd \
+ changes.dds wishlist.dds patches manifest
+ 
+ # Yacc flags
+ YFLAGS=-d
+ 
+ # Manual pages
+ MAN=perlman.1 perlman.2 perlman.3 perlman.4
+ 
+ CC=cc
+ # Cflags for the files that break under the optimiser
+ CPLAIN=-AL -DCRIPPLED_CC
+ # Cflags for all the rest
+ CFLAGS=$(CPLAIN) -Ox
+ # Destination directory for executables
+ DESTDIR=\usr\bin
+ 
+ # Deliverables
+ all: perl.exe perl.1 glob.exe
+ 
+ perl.exe: $(OBJ)
+ 	echo array+cmd+cons+consarg+doarg+doio+dolist+dump+ >perl.arp
+ 	echo eval+form+hash+perl+perly+regcomp+regexec+ >>perl.arp
+ 	echo stab+str+toke+util+msdos+popen+directory+\lib\setargv >>perl.arp
+ 	echo perl.exe >>perl.arp
+ 	echo nul >>perl.arp
+ 	echo /stack:32767 /NOE >>perl.arp
+ 	link @perl.arp
+ 
+ glob.exe: glob.c
+ 	$(CC) glob.c \lib\setargv.obj -link /NOE
+ 
+ array.obj: array.c
+ cmd.obj: cmd.c
+ cons.obj: cons.c perly.h
+ consarg.obj: consarg.c
+ 	$(CC) $(CPLAIN) -c consarg.c
+ doarg.obj: doarg.c
+ doio.obj: doio.c
+ dolist.obj: dolist.c
+ dump.obj: dump.c
+ eval.obj: eval.c evalargs.xc
+ form.obj: form.c
+ hash.obj: hash.c
+ perl.obj: perl.y
+ perly.obj: perly.c
+ regcomp.obj: regcomp.c
+ regexec.obj: regexec.c
+ stab.obj: stab.c
+ str.obj: str.c
+ toke.obj: toke.c
+ util.obj: util.c
+ 	$(CC) $(CPLAIN) -c util.c
+ perly.h: perl.obj
+ 	mv ytab.h perly.h
+ directory.obj: directory.c
+ popen.obj: popen.c
+ msdos.obj: msdos.c
+ 
+ perl.1: $(MAN)
+ 	nroff -man $(MAN) >perl.1
+ 
+ install: all
+ 	exepack perl.exe $(DESTDIR)\perl.exe
+ 	exepack glob.exe $(DESTDIR)\glob.exe
+ 
+ clean:
+ 	rm -f *.obj *.exe perl.1 perly.h perl.arp
+ 
+ tags:
+ 	ctags *.c *.h *.xc
+ 
+ dosperl:
+ 	mv $(DOSFILES) ../perl30.new
+ 
+ doskit:
+ 	mv $(DOSFILES) ../msdos

Index: Makefile.SH
Prereq: 3.0.1.5
*** Makefile.SH.old	Tue Mar 27 16:36:27 1990
--- Makefile.SH	Tue Mar 27 16:36:29 1990
***************
*** 25,33 ****
  
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 3.0.1.5 90/03/12 16:15:17 lwall Locked $
  #
  # $Log:	Makefile.SH,v $
  # Revision 3.0.1.5  90/03/12  16:15:17  lwall
  # patch13: some dependencies missing on perly.h
  # patch13: some relief for buggy parallel makes
--- 25,36 ----
  
  echo "Extracting Makefile (with variable substitutions)"
  cat >Makefile <<!GROK!THIS!
! # $Header: Makefile.SH,v 3.0.1.6 90/03/27 15:27:15 lwall Locked $
  #
  # $Log:	Makefile.SH,v $
+ # Revision 3.0.1.6  90/03/27  15:27:15  lwall
+ # patch16: MSDOS support
+ # 
  # Revision 3.0.1.5  90/03/12  16:15:17  lwall
  # patch13: some dependencies missing on perly.h
  # patch13: some relief for buggy parallel makes
***************
*** 276,285 ****
  perl.o: perl.c perly.h $(h)
  	$(CC) -c $(CFLAGS) $(LARGE) perl.c
  
! perl.man: perl.man.1 perl.man.2 perl.man.3 perl.man.4 patchlevel.h perl
  	./perl  -e '($$r,$$p)=$$]=~/(\d+\.\d+).*\n\D*(\d+)/;' \
  		-e 'print ".ds RP Release $$r Patchlevel $$p\n";' >perl.man
! 	cat perl.man.[1-4] >>perl.man
  
  install: all
  # won't work with csh
--- 279,288 ----
  perl.o: perl.c perly.h $(h)
  	$(CC) -c $(CFLAGS) $(LARGE) perl.c
  
! perl.man: perl_man.1 perl_man.2 perl_man.3 perl_man.4 patchlevel.h perl
  	./perl  -e '($$r,$$p)=$$]=~/(\d+\.\d+).*\n\D*(\d+)/;' \
  		-e 'print ".ds RP Release $$r Patchlevel $$p\n";' >perl.man
! 	cat perl_man.[1-4] >>perl.man
  
  install: all
  # won't work with csh

Index: README
*** README.old	Tue Mar 27 16:36:33 1990
--- README	Tue Mar 27 16:36:35 1990
***************
*** 1,7 ****
  
  			Perl Kit, Version 3.0
  
! 		    Copyright (c) 1989, Larry Wall
  
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
--- 1,7 ----
  
  			Perl Kit, Version 3.0
  
! 		 Copyright (c) 1989,1990, Larry Wall
  
      This program is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published by
***************
*** 76,81 ****
--- 76,82 ----
  
      The 3b2 needs to turn off -O.
      AIX/RT may need a -a switch and -DCRIPPLED_CC.
+     SUNOS 4.0.[12] needs #define fputs(str,fp) fprintf(fp,"%s",str) in perl.h
      SGI machines may need -Ddouble="long float".
      Ultrix (2.3) may need to hand assemble teval.s with a -J switch.
      Ultrix on MIPS machines may need -DLANGUAGE_C.

Index: msdos/Wishlist.dds
*** msdos/Wishlist.dds.old	Tue Mar 27 16:40:23 1990
--- msdos/Wishlist.dds	Tue Mar 27 16:40:25 1990
***************
*** 0 ****
--- 1,17 ----
+ Perl in general:
+ Add ftw or find?
+ Add a parsing mechanism (user specifies parse tree, perl parses).
+ Arbitrary precision arithmetic.
+ File calculus (e.g. file1 = file2 + file3, file1 =^ s/foo/bar/g etc.)
+ 
+ MS-DOS version of Perl:
+ Add interface to treat dBase files as associative arrays.
+ Add int86x function.
+ Handle the C preprocessor.
+ Provide real pipes by switching the processes. (difficult)
+ Provide a list of ioctl codes.
+ Check the ioctl errno handling.
+ I can't find an easy way in Perl to pass a number as the first argument
+   to ioctl.  This is needed for some functions of ioctl.  Either hack
+   ioctl, or change perl to ioctl interface.  Another solution would be
+   a perl pseudo array containing the filehandles indexed by fd.

Index: client
*** client.old	Tue Mar 27 16:36:52 1990
--- client	Tue Mar 27 16:36:53 1990
***************
*** 19,25 ****
  select(S); $| = 1; select(stdout);
  
  if ($child = fork) {
!     while (<>) {
  	print S;
      }
      sleep 3;
--- 19,25 ----
  select(S); $| = 1; select(stdout);
  
  if ($child = fork) {
!     while (<STDIN>) {
  	print S;
      }
      sleep 3;

Index: cmd.c
Prereq: 3.0.1.6
*** cmd.c.old	Tue Mar 27 16:37:06 1990
--- cmd.c	Tue Mar 27 16:37:12 1990
***************
*** 1,4 ****
! /* $Header: cmd.c,v 3.0.1.6 90/03/12 16:21:09 lwall Locked $
   *
   *    Copyright (c) 1989, Larry Wall
   *
--- 1,4 ----
! /* $Header: cmd.c,v 3.0.1.7 90/03/27 15:32:37 lwall Locked $
   *
   *    Copyright (c) 1989, Larry Wall
   *
***************
*** 6,11 ****
--- 6,14 ----
   *    as specified in the README file that comes with the perl 3.0 kit.
   *
   * $Log:	cmd.c,v $
+  * Revision 3.0.1.7  90/03/27  15:32:37  lwall
+  * patch16: non-terminal blocks should never have arrays requested of them
+  * 
   * Revision 3.0.1.6  90/03/12  16:21:09  lwall
   * patch13: fixed some backwards VOLATILE declarations
   * patch13: while (s/x//) {} still caused some anomolies
***************
*** 127,133 ****
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
--- 130,136 ----
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
***************
*** 158,164 ****
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
--- 161,167 ----
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
***************
*** 247,253 ****
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
--- 250,256 ----
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
***************
*** 267,273 ****
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_alt,gimme,sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
--- 270,276 ----
  			    grow_dlevel();
  		    }
  #endif
! 		    newsp = cmd_exec(cmd->ucmd.ccmd.cc_alt,gimme && (cmdflags & CF_TERM),sp);
  		    st = stack->ary_array;	/* possibly reallocated */
  		    retstr = st[newsp];
  		}
***************
*** 711,717 ****
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
--- 714,720 ----
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
***************
*** 740,746 ****
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
--- 743,749 ----
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
***************
*** 826,832 ****
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme,sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
--- 829,835 ----
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_true,gimme && (cmdflags & CF_TERM),sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
***************
*** 846,852 ****
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_alt,gimme,sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}
--- 849,855 ----
  		    grow_dlevel();
  	    }
  #endif
! 	    newsp = cmd_exec(cmd->ucmd.ccmd.cc_alt,gimme && (cmdflags & CF_TERM),sp);
  	    st = stack->ary_array;	/* possibly reallocated */
  	    retstr = st[newsp];
  	}

Index: msdos/config.h
*** msdos/config.h.old	Tue Mar 27 16:40:27 1990
--- msdos/config.h	Tue Mar 27 16:40:28 1990
***************
*** 0 ****
--- 1,540 ----
+ /* config.h
+  * This file is hand tailored for compiling under MS-DOS and MSC 5.1.
+  * Diomidis Spinellis, March 1990.
+  */
+ 
+ 
+ /* EUNICE:
+  *	This symbol, if defined, indicates that the program is being compiled
+  *	under the EUNICE package under VMS.  The program will need to handle
+  *	things like files that don't go away the first time you unlink them,
+  *	due to version numbering.  It will also need to compensate for lack
+  *	of a respectable link() command.
+  */
+ /* VMS:
+  *	This symbol, if defined, indicates that the program is running under
+  *	VMS.  It is currently only set in conjunction with the EUNICE symbol.
+  */
+ /*#undef	EUNICE		/**/
+ /*#undef	VMS		/**/
+ 
+ /* BIN:
+  *	This symbol holds the name of the directory in which the user wants
+  *	to put publicly executable images for the package in question.  It
+  *	is most often a local directory such as /usr/local/bin.
+  */
+ #define BIN "/usr/local/bin"             /**/
+ 
+ /* BYTEORDER:
+  *	This symbol contains an encoding of the order of bytes in a long.
+  *	Usual values (in octal) are 01234, 04321, 02143, 03412...
+  */
+ /* CHECK */
+ #define BYTEORDER 0x1234		/**/
+ 
+ /* CPPSTDIN:
+  *	This symbol contains the first part of the string which will invoke
+  *	the C preprocessor on the standard input and produce to standard
+  *	output.	 Typical value of "cc -{" or "/lib/cpp".
+  */
+ /* CPPMINUS:
+  *	This symbol contains the second part of the string which will invoke
+  *	the C preprocessor on the standard input and produce to standard
+  *	output.  This symbol will have the value "-" if CPPSTDIN needs a minus
+  *	to specify standard input, otherwise the value is "".
+  */
+ /* TODO */
+ #define CPPSTDIN "cc -{"
+ #define CPPMINUS ""
+ 
+ /* BCMP:
+  *	This symbol, if defined, indicates that the bcmp routine is available
+  *	to compare blocks of memory.  If undefined, use memcmp.  If that's
+  *	not available, roll your own.
+  */
+ /*#define	BCMP		/**/
+ 
+ /* BCOPY:
+  *	This symbol, if defined, indicates that the bcopy routine is available
+  *	to copy blocks of memory.  Otherwise you should probably use memcpy().
+  */
+ /*#define	BCOPY		/**/
+ 
+ /* CHARSPRINTF:
+  *	This symbol is defined if this system declares "char *sprintf()" in
+  *	stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
+  *	is up to the package author to declare sprintf correctly based on the
+  *	symbol.
+  */
+ /*#define	CHARSPRINTF 	/**/
+ 
+ /* CRYPT:
+  *	This symbol, if defined, indicates that the crypt routine is available
+  *	to encrypt passwords and the like.
+  */
+ /* TODO */
+ /*#define	CRYPT		/**/
+ 
+ /* DOSUID:
+  *	This symbol, if defined, indicates that the C program should
+  *	check the script that it is executing for setuid/setgid bits, and
+  *	attempt to emulate setuid/setgid on systems that have disabled
+  *	setuid #! scripts because the kernel can't do it securely.
+  *	It is up to the package designer to make sure that this emulation
+  *	is done securely.  Among other things, it should do an fstat on
+  *	the script it just opened to make sure it really is a setuid/setgid
+  *	script, it should make sure the arguments passed correspond exactly
+  *	to the argument on the #! line, and it should not trust any
+  *	subprocesses to which it must pass the filename rather than the
+  *	file descriptor of the script to be executed.
+  */
+ /*#define DOSUID		/**/
+ 
+ /* DUP2:
+  *	This symbol, if defined, indicates that the dup2 routine is available
+  *	to dup file descriptors.  Otherwise you should use dup().
+  */
+ #define	DUP2		/**/
+ 
+ /* FCHMOD:
+  *	This symbol, if defined, indicates that the fchmod routine is available
+  *	to change mode of opened files.  If unavailable, use chmod().
+  */
+ /*#define	FCHMOD		/**/
+ 
+ /* FCHOWN:
+  *	This symbol, if defined, indicates that the fchown routine is available
+  *	to change ownership of opened files.  If unavailable, use chown().
+  */
+ /*#define	FCHOWN		/**/
+ 
+ /* FCNTL:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include fcntl.h.
+  */
+ /*#define	FCNTL		/**/
+ 
+ /* FLOCK:
+  *	This symbol, if defined, indicates that the flock() routine is
+  *	available to do file locking.
+  */
+ /*#define	FLOCK		/**/
+ 
+ /* GETGROUPS:
+  *	This symbol, if defined, indicates that the getgroups() routine is
+  *	available to get the list of process groups.  If unavailable, multiple
+  *	groups are probably not supported.
+  */
+ /*#define	GETGROUPS		/**/
+ 
+ /* GETHOSTENT:
+  *	This symbol, if defined, indicates that the gethostent() routine is
+  *	available to lookup host names in some data base or other.
+  */
+ /*#define	GETHOSTENT		/**/
+ 
+ /* GETPGRP:
+  *	This symbol, if defined, indicates that the getpgrp() routine is
+  *	available to get the current process group.
+  */
+ /*#define	GETPGRP		/**/
+ 
+ /* GETPRIORITY:
+  *	This symbol, if defined, indicates that the getpriority() routine is
+  *	available to get a process's priority.
+  */
+ /*#define	GETPRIORITY		/**/
+ 
+ /* HTONS:
+  *	This symbol, if defined, indicates that the htons routine (and friends)
+  *	are available to do network order byte swapping.
+  */
+ /* HTONL:
+  *	This symbol, if defined, indicates that the htonl routine (and friends)
+  *	are available to do network order byte swapping.
+  */
+ /* NTOHS:
+  *	This symbol, if defined, indicates that the ntohs routine (and friends)
+  *	are available to do network order byte swapping.
+  */
+ /* NTOHL:
+  *	This symbol, if defined, indicates that the ntohl routine (and friends)
+  *	are available to do network order byte swapping.
+  */
+ /*#define	HTONS		/**/
+ /*#define	HTONL		/**/
+ /*#define	NTOHS		/**/
+ /*#define	NTOHL		/**/
+ 
+ /* index:
+  *	This preprocessor symbol is defined, along with rindex, if the system
+  *	uses the strchr and strrchr routines instead.
+  */
+ /* rindex:
+  *	This preprocessor symbol is defined, along with index, if the system
+  *	uses the strchr and strrchr routines instead.
+  */
+ #define	index strchr	/* cultural */
+ #define	rindex strrchr	/*  differences? */
+ 
+ /* IOCTL:
+  *	This symbol, if defined, indicates that sys/ioctl.h exists and should
+  *	be included.
+  */
+ /*#define	IOCTL		/**/
+ 
+ /* KILLPG:
+  *	This symbol, if defined, indicates that the killpg routine is available
+  *	to kill process groups.  If unavailable, you probably should use kill
+  *	with a negative process number.
+  */
+ /*#define	KILLPG		/**/
+ 
+ /* MEMCMP:
+  *	This symbol, if defined, indicates that the memcmp routine is available
+  *	to compare blocks of memory.  If undefined, roll your own.
+  */
+ #define	MEMCMP		/**/
+ 
+ /* MEMCPY:
+  *	This symbol, if defined, indicates that the memcpy routine is available
+  *	to copy blocks of memory.  Otherwise you should probably use bcopy().
+  *	If neither is defined, roll your own.
+  */
+ #define	MEMCPY		/**/
+ 
+ /* MKDIR:
+  *	This symbol, if defined, indicates that the mkdir routine is available
+  *	to create directories.  Otherwise you should fork off a new process to
+  *	exec /bin/mkdir.
+  */
+ #define	MKDIR		/**/
+ 
+ /* NDBM:
+  *	This symbol, if defined, indicates that ndbm.h exists and should
+  *	be included.
+  */
+ /*#define	NDBM		/**/
+ 
+ /* ODBM:
+  *	This symbol, if defined, indicates that dbm.h exists and should
+  *	be included.
+  */
+ /*#define	ODBM		/**/
+ 
+ /* READDIR:
+  *	This symbol, if defined, indicates that the readdir routine is available
+  *	from the C library to create directories.
+  */
+ #define	READDIR		/**/
+ 
+ /* RENAME:
+  *	This symbol, if defined, indicates that the rename routine is available
+  *	to rename files.  Otherwise you should do the unlink(), link(), unlink()
+  *	trick.
+  */
+ #define	RENAME		/**/
+ 
+ /* RMDIR:
+  *	This symbol, if defined, indicates that the rmdir routine is available
+  *	to remove directories.  Otherwise you should fork off a new process to
+  *	exec /bin/rmdir.
+  */
+ #define	RMDIR		/**/
+ 
+ /* SETEGID:
+  *	This symbol, if defined, indicates that the setegid routine is available
+  *	to change the effective gid of the current program.
+  */
+ /*#define	SETEGID		/**/
+ 
+ /* SETEUID:
+  *	This symbol, if defined, indicates that the seteuid routine is available
+  *	to change the effective uid of the current program.
+  */
+ /*#define	SETEUID		/**/
+ 
+ /* SETPGRP:
+  *	This symbol, if defined, indicates that the setpgrp() routine is
+  *	available to set the current process group.
+  */
+ /*#define	SETPGRP		/**/
+ 
+ /* SETPRIORITY:
+  *	This symbol, if defined, indicates that the setpriority() routine is
+  *	available to set a process's priority.
+  */
+ /*#define	SETPRIORITY		/**/
+ 
+ /* SETREGID:
+  *	This symbol, if defined, indicates that the setregid routine is available
+  *	to change the real and effective gid of the current program.
+  */
+ /*#define	SETREGID		/**/
+ 
+ /* SETREUID:
+  *	This symbol, if defined, indicates that the setreuid routine is available
+  *	to change the real and effective uid of the current program.
+  */
+ /*#define	SETREUID		/**/
+ 
+ /* SETRGID:
+  *	This symbol, if defined, indicates that the setrgid routine is available
+  *	to change the real gid of the current program.
+  */
+ /*#define	SETRGID		/**/
+ 
+ /* SETRUID:
+  *	This symbol, if defined, indicates that the setruid routine is available
+  *	to change the real uid of the current program.
+  */
+ /*#define	SETRUID		/**/
+ 
+ /* SOCKET:
+  *      This symbol, if defined, indicates that the BSD socket interface is
+  *      supported.
+  */
+ /* SOCKETPAIR:
+  *      This symbol, if defined, indicates that the BSD socketpair call is
+  *      supported.
+  */
+ /* OLDSOCKET:
+  *      This symbol, if defined, indicates that the 4.1c BSD socket interface
+  *      is supported instead of the 4.2/4.3 BSD socket interface.
+  */
+ /*#undef SOCKET          /**/
+ 
+ /*#undef SOCKETPAIR      /**/
+ 
+ /*#undef        OLDSOCKET       /**/
+ 
+ /* STATBLOCKS:
+  *	This symbol is defined if this system has a stat structure declaring
+  *	st_blksize and st_blocks.
+  */
+ /*#define	STATBLOCKS 	/**/
+ 
+ /* STDSTDIO:
+  *	This symbol is defined if this system has a FILE structure declaring
+  *	_ptr and _cnt in stdio.h.
+  */
+ #define	STDSTDIO 	/**/
+ 
+ /* STRUCTCOPY:
+  *	This symbol, if defined, indicates that this C compiler knows how
+  *	to copy structures.  If undefined, you'll need to use a block copy
+  *	routine of some sort instead.
+  */
+ #define	STRUCTCOPY	/**/
+ 
+ /* SYMLINK:
+  *	This symbol, if defined, indicates that the symlink routine is available
+  *	to create symbolic links.
+  */
+ /*#define	SYMLINK		/**/
+ 
+ /* SYSCALL:
+  *	This symbol, if defined, indicates that the syscall routine is available
+  *	to call arbitrary system calls.  If undefined, that's tough.
+  */
+ /*#define	SYSCALL		/**/
+ 
+ /* TMINSYS:
+  *	This symbol is defined if this system declares "struct tm" in
+  *	in <sys/time.h> rather than <time.h>.  We can't just say
+  *	-I/usr/include/sys because some systems have both time files, and
+  *	the -I trick gets the wrong one.
+  */
+ /* I_SYSTIME:
+  *	This symbol is defined if this system has the file <sys/time.h>.
+  */
+ /*
+  * I_TIME:
+  *	This symbol is defined if time this  system has the file <time.h>.
+  */
+ /*#undef	TMINSYS 	/**/
+ /*#define	I_SYSTIME 	/**/
+ #define I_TIME
+ 
+ /* VARARGS:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include varargs.h.
+  */
+ #define	VARARGS		/**/
+ 
+ /* vfork:
+  *	This symbol, if defined, remaps the vfork routine to fork if the
+  *	vfork() routine isn't supported here.
+  */
+ /*#undef	vfork fork	/**/
+ 
+ /* VOIDSIG:
+  *	This symbol is defined if this system declares "void (*signal())()" in
+  *	signal.h.  The old way was to declare it as "int (*signal())()".  It
+  *	is up to the package author to declare things correctly based on the
+  *	symbol.
+  */
+ #define	VOIDSIG 	/**/
+ 
+ /* VPRINTF:
+  *	This symbol, if defined, indicates that the vprintf routine is available
+  *	to printf with a pointer to an argument list.  If unavailable, you
+  *	may need to write your own, probably in terms of _doprnt().
+  */
+ /* CHARVSPRINTF:
+  *	This symbol is defined if this system has vsprintf() returning type
+  *	(char*).  The trend seems to be to declare it as "int vsprintf()".  It
+  *	is up to the package author to declare vsprintf correctly based on the
+  *	symbol.
+  */
+ #define	VPRINTF		/**/
+ /*#undef	CHARVSPRINTF 	/**/
+ 
+ /* GIDTYPE:
+  *	This symbol has a value like gid_t, int, ushort, or whatever type is
+  *	used to declare group ids in the kernel.
+  */
+ /* TODO */
+ #define GIDTYPE int		/**/
+ 
+ /* I_DIRENT:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include dirent.h.
+  */
+ /* DIRNAMLEN:
+  *	This symbol, if defined, indicates to the C program that the length
+  *	of directory entry names is provided by a d_namlen field.  Otherwise
+  *	you need to do strlen() on the d_name field.
+  */
+ /*#undef	I_DIRENT		/**/
+ #define	DIRNAMLEN		/**/
+ 
+ /* I_FCNTL:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include fcntl.h.
+  */
+ #define	I_FCNTL		/**/
+ 
+ /* I_GRP:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include grp.h.
+  */
+ /*#define	I_GRP		/**/
+ 
+ /* I_PWD:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include pwd.h.
+  */
+ /* PWQUOTA:
+  *	This symbol, if defined, indicates to the C program that struct passwd
+  *	contains pw_quota.
+  */
+ /* PWAGE:
+  *	This symbol, if defined, indicates to the C program that struct passwd
+  *	contains pw_age.
+  */
+ /*#define	I_PWD		/**/
+ /*#define	PWQUOTA		/**/
+ /*#undef	PWAGE		/**/
+ 
+ /* I_SYSDIR:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include sys/dir.h.
+  */
+ #define	I_SYSDIR		/**/
+ 
+ /* I_SYSIOCTL:
+  *	This symbol, if defined, indicates that sys/ioctl.h exists and should
+  *	be included.
+  */
+ /*#define	I_SYSIOCTL		/**/
+ 
+ /* I_VARARGS:
+  *	This symbol, if defined, indicates to the C program that it should
+  *	include varargs.h.
+  */
+ #define	I_VARARGS		/**/
+ 
+ /* INTSIZE:
+  *	This symbol contains the size of an int, so that the C preprocessor
+  *	can make decisions based on it.
+  */
+ #define INTSIZE 2		/**/
+ 
+ /* RANDBITS:
+  *	This symbol contains the number of bits of random number the rand()
+  *	function produces.  Usual values are 15, 16, and 31.
+  */
+ #define RANDBITS 31		/**/
+ 
+ /* SIG_NAME:
+  *	This symbol contains an list of signal names in order.
+  */
+ #define SIG_NAME
+  "ZERO","HUP","INT","QUIT","ILL","TRAP","IOT","EMT","FPE","KILL","BUS","SEGV","S
+ YS","PIPE","ALRM","TERM","URG","STOP","TSTP","CONT","CHLD","TTIN","TTOU","IO","X
+ CPU","XFSZ","VTALRM","PROF","WINCH","USR1","USR2"		/**/
+ 
+ /* STDCHAR:
+  *	This symbol is defined to be the type of char used in stdio.h.
+  *	It has the values "unsigned char" or "char".
+  */
+ #define STDCHAR char	/**/
+ 
+ /* UIDTYPE:
+  *	This symbol has a value like uid_t, int, ushort, or whatever type is
+  *	used to declare user ids in the kernel.
+  */
+ #define UIDTYPE int		/**/
+ 
+ /* VOIDFLAGS:
+  *	This symbol indicates how much support of the void type is given by this
+  *	compiler.  What various bits mean:
+  *
+  *	    1 = supports declaration of void
+  *	    2 = supports arrays of pointers to functions returning void
+  *	    4 = supports comparisons between pointers to void functions and
+  *		    addresses of void functions
+  *
+  *	The package designer should define VOIDUSED to indicate the requirements
+  *	of the package.  This can be done either by #defining VOIDUSED before
+  *	including config.h, or by defining defvoidused in Myinit.U.  If the
+  *	latter approach is taken, only those flags will be tested.  If the
+  *	level of void support necessary is not present, defines void to int.
+  */
+ #ifndef VOIDUSED
+ #define VOIDUSED 7
+ #endif
+ #define VOIDFLAGS 7
+ #if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+ #define void int		/* is void to be avoided? */
+ #define M_VOID		/* Xenix strikes again */
+ #endif
+ 
+ /* PRIVLIB:
+  *	This symbol contains the name of the private library for this package.
+  *	The library is private in the sense that it needn't be in anyone's
+  *	execution path, but it should be accessible by the world.  The program
+  *	should be prepared to do ^ expansion.
+  */
+ #define PRIVLIB "/usr/local/lib/perl"		/**/
+ 
+ /*
+  * BUGGY_MSC:
+  *	This symbol is defined if you are the unfortunate owner of a buggy
+  *	Microsoft C compiler and want to use intrinsic functions.  Versions
+  *	up to 5.1 are known conform to this definition.
+  */
+ #define BUGGY_MSC			/**/
+ 
+ /*
+  * BINARY:
+  *	This symbol is defined if you run under an operating system that
+  *	distinguishes between binary and text files.  If so the function
+  *	setmode will be used to set the file into binary mode.
+  */
+ #define BINARY
+ 
+ #define S_ISUID 0
+ #define S_ISGID 0
+ #define CASTNEGFLOAT

*** End of Patch 16 ***