summaryrefslogtreecommitdiff
path: root/U
diff options
context:
space:
mode:
Diffstat (limited to 'U')
-rw-r--r--U/Extensions.U48
-rw-r--r--U/Loc.U260
-rw-r--r--U/Oldconfig.U284
-rw-r--r--U/README.U15
-rw-r--r--U/cc.U119
-rw-r--r--U/ccflags.U241
-rw-r--r--U/d_casti32.U86
-rw-r--r--U/d_isascii.U59
-rw-r--r--U/d_setlocale.U39
-rw-r--r--U/d_strerror.U122
-rw-r--r--U/dlsrc.U66
-rw-r--r--U/gidtype.U60
-rw-r--r--U/groupstype.U58
-rw-r--r--U/i_dlfcn.U37
-rw-r--r--U/libc.U297
-rw-r--r--U/libpth.U83
-rw-r--r--U/libs.U132
-rw-r--r--U/libyacc.U69
-rw-r--r--U/mallocsrc.U101
-rw-r--r--U/prototype.U124
-rw-r--r--U/voidflags.U161
-rw-r--r--U/yacc.U91
22 files changed, 2552 insertions, 0 deletions
diff --git a/U/Extensions.U b/U/Extensions.U
new file mode 100644
index 0000000000..3e10a38f31
--- /dev/null
+++ b/U/Extensions.U
@@ -0,0 +1,48 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: Extensions.U,v$
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: Extensions.U,v $
+?RCS:
+?MAKE:extensions : find package
+?MAKE: -pick add $@ %<
+?S:extensions:
+?S: This variable holds a list of extension files we want to
+?S: include in perl.
+?S:.
+?INIT:: List of extensions we want:
+?INIT:extensions=''
+?X:
+echo " "
+case "$extensions" in
+' '|'') echo "Looking for extensions..."
+ case "$find" in
+ *find*)
+ cd ..
+ dflt="`$find ext -type f -name \*.xs -print`"
+ cd UU
+ ;;
+ *) dflt='ext/dbm/NDBM_File.xs ext/dbm/ODBM_File.xs ext/dbm/GDBM_File.xs ext/dbm/SDBM_File.xs ext/posix/POSIX.xs'
+ ;;
+ esac
+ ;;
+none) dflt='' ;;
+*) dflt="$extensions" ;;
+esac
+rp="What extensions do you wish to include?"
+. ./myread
+extensions="$ans"
+
diff --git a/U/Loc.U b/U/Loc.U
new file mode 100644
index 0000000000..79096ef45f
--- /dev/null
+++ b/U/Loc.U
@@ -0,0 +1,260 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: Loc.U,v 3.0.1.3 1994/01/24 14:01:44 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS: $Log: Loc.U,v $
+?RCS: Revision 3.0.1.3 1994/01/24 14:01:44 ram
+?RCS: patch16: added metalint hint on changed PATH variable
+?RCS:
+?RCS: Revision 3.0.1.2 1993/12/15 08:16:52 ram
+?RCS: patch15: now set _test variable when test is built-in
+?RCS: patch15: fixed rare cases where echo is not needed
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:47:13 ram
+?RCS: patch10: test program not always in /bin/test (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:05 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit produces a shell script "loc" which can be used to find out
+?X: where in a list of directories something is. It then uses loc to
+?X: determine the location of commonly used programs. It leaves loc sitting
+?X: around for other Configure units to use, but arranges for its demise
+?X: at the end of Configure.
+?X:
+?X: To add a new program to find, add it both to the ?MAKE: line and to either
+?X: the loclist or trylist variable.
+?X:
+?X: I put startsh at the end of the dependency list, in order to avoid the
+?X: loading of the spitshell unit before the instructions.
+?X:
+?MAKE:Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp cpio \
+ cpp csh date echo egrep emacs expr find flex gcc grep inews ksh \
+ less line lint ln lp lpr ls mail mailx make mkdir more mv nroff \
+ perl pg pmake pr rm rmail sed sendmail sh shar sleep smail sort \
+ submit tail tar tbl test touch tr troff uname uniq uuname vi \
+ zcat: eunicefix n c Instruct Myread startsh
+?MAKE: -pick weed $@ %<
+?LINT:describe Loc Mcc awk bash bison byacc cat chgrp chmod chown compress \
+ cp cpio cpp csh date echo egrep emacs expr find flex gcc grep \
+ inews ksh less line lint ln lp lpr ls mail mailx make mkdir more \
+ mv nroff perl pg pmake pr rm rmail sed sendmail sh shar sleep \
+ smail sort submit tail tar tbl test touch tr troff uname uniq \
+ uuname vi zcat
+?V::pth loclist trylist
+?T:thing xxx dir file say _test
+?LINT:change PATH
+: find out where common programs are
+echo " "
+echo "Locating common programs..." >&4
+cat <<EOSC >loc
+$startsh
+case \$# in
+0) exit 1;;
+esac
+thing=\$1
+shift
+dflt=\$1
+shift
+for dir in \$*; do
+ case "\$thing" in
+ .)
+ if test -d \$dir/\$thing; then
+ echo \$dir
+ exit 0
+ fi
+ ;;
+ *)
+ if test -f \$dir/\$thing; then
+ echo \$dir/\$thing
+ exit 0
+ elif test -f \$dir/\$thing.exe; then
+ : on Eunice apparently
+ echo \$dir/\$thing
+ exit 0
+ fi
+ ;;
+ esac
+done
+echo \$dflt
+exit 1
+EOSC
+chmod +x loc
+$eunicefix loc
+loclist="
+?awk:awk
+?cat:cat
+?chgrp:chgrp
+?chmod:chmod
+?chown:chown
+?cp:cp
+?echo:echo
+?expr:expr
+?grep:grep
+?ln:ln
+?ls:ls
+?make:make
+?mkdir:mkdir
+?mv:mv
+?rm:rm
+?sed:sed
+?sleep:sleep
+?sort:sort
+?tail:tail
+?touch:touch
+?tr:tr
+?uniq:uniq
+"
+trylist="
+?Mcc:Mcc
+?bash:bash
+?bison:bison
+?byacc:byacc
+?compress:compress
+?cpio:cpio
+?cpp:cpp
+?csh:csh
+?date:date
+?egrep:egrep
+?emacs:emacs
+?find:find
+?flex:flex
+?gcc:gcc
+?inews:inews
+?ksh:ksh
+?less:less
+?line:line
+?lint:lint
+?lp:lp
+?lpr:lpr
+?mail:mail
+?mailx:mailx
+?more:more
+?nroff:nroff
+?perl:perl
+?pg:pg
+?pmake:pmake
+?pr:pr
+?rmail:rmail
+?sendmail:sendmail
+?sh:sh
+?shar:shar
+?smail:smail
+?submit:submit
+?tar:tar
+?tbl:tbl
+?test:test
+?troff:troff
+?uname:uname
+?uuname:uuname
+?vi:vi
+?zcat:zcat
+"
+?LINT:set Loc Mcc awk bash bison byacc cat chgrp chmod chown compress cp cpio cpp \
+ csh date echo egrep emacs expr flex gcc grep inews ksh less line lint ln \
+ lp lpr ls mail mailx make mkdir more mv nroff perl pg pmake pr rm rmail \
+ sed sendmail sh shar sleep smail sort submit tail tar tbl test touch tr \
+ troff uname uniq uuname vi zcat
+pth=`echo $PATH | sed -e 's/:/ /g'`
+pth="$pth /lib /usr/lib"
+for file in $loclist; do
+ xxx=`./loc $file $file $pth`
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't know where $file is. I hope it's in everyone's PATH."
+ ;;
+ esac
+done
+echo " "
+echo "Don't worry if any of the following aren't found..."
+say=offhand
+for file in $trylist; do
+ xxx=`./loc $file $file $pth`
+ eval $file=$xxx
+ eval _$file=$xxx
+ case "$xxx" in
+ /*)
+ echo $file is in $xxx.
+ ;;
+ *)
+ echo "I don't see $file out there, $say."
+ say=either
+ ;;
+ esac
+done
+case "$egrep" in
+egrep)
+ echo "Substituting grep for egrep."
+ egrep=$grep
+ ;;
+esac
+case "$test" in
+test)
+ echo "Hopefully test is built into your sh."
+ ;;
+*)
+ if sh -c "PATH= test true" >/dev/null 2>&1; then
+ echo "Using the test built into your sh."
+?X:
+?X: We need to set both test and _test, since Oldconfig.U will use the _test
+?X: value to systematically restore computed paths, which may be wrong if
+?X: we choose to load an old config.sh generated on another platform.
+?X:
+ test=test
+ _test=test
+ fi
+ ;;
+esac
+?LINT:change n c
+case "$echo" in
+echo)
+ echo "Hopefully echo is built into your sh."
+ ;;
+?X: For those rare cases where we don't need $echo...
+'') ;;
+*)
+ echo " "
+echo "Checking compatibility between $echo and builtin echo (if any)..." >&4
+ $echo $n "hi there$c" >foo1
+ echo $n "hi there$c" >foo2
+ if cmp foo1 foo2 >/dev/null 2>&1; then
+ echo "They are compatible. In fact, they may be identical."
+ else
+ case "$n" in
+ '-n') n='' c='\c';;
+ *) n='-n' c='';;
+ esac
+ cat <<FOO
+They are not compatible! You are probably running ksh on a non-USG system.
+I'll have to use $echo instead of the builtin, since Bourne shell doesn't
+have echo built in and we may have to run some Bourne shell scripts. That
+means I'll have to use '$n$c' to suppress newlines now. Life is ridiculous.
+
+FOO
+ $echo $n "The star should be here-->$c"
+ $echo "*"
+ fi
+ $rm -f foo1 foo2
+ ;;
+esac
+
diff --git a/U/Oldconfig.U b/U/Oldconfig.U
new file mode 100644
index 0000000000..18c2a811b0
--- /dev/null
+++ b/U/Oldconfig.U
@@ -0,0 +1,284 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: Oldconfig.U,v 3.0.1.2 1994/01/24 14:05:02 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: Oldconfig.U,v $
+?RCS: Revision 3.0.1.2 1994/01/24 14:05:02 ram
+?RCS: patch16: added post-processing on myuname for Xenix targets
+?RCS: patch16: message proposing config.sh defaults made consistent
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 15:56:32 ram
+?RCS: patch10: force use of config.sh when -d option is used (WAD)
+?RCS: patch10: complain about non-existent hint files (WAD)
+?RCS: patch10: added Options dependency for fastread variable
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit tries to remember what we did last time we ran Configure, mostly
+?X: for the sake of setting defaults.
+?X:
+?MAKE:Oldconfig hint myuname: Instruct Myread uname sed test cat rm n c \
+ contains Loc Options
+?MAKE: -pick wipe $@ %<
+?S:myuname:
+?S: The output of 'uname -a' if available, otherwise the hostname. On Xenix,
+?S: pseudo variables assignments in the output are stripped, thank you. The
+?S: whole thing is then lower-cased.
+?S:.
+?S:hint:
+?S: Gives the type of hints used for previous answers. May be one of
+?S: "default", "recommended" or "previous".
+?S:.
+?T:tmp file oldmyuname tans _
+?LINT:change n c
+: Try to determine whether config.sh was made on this system
+case "$config_sh" in
+'')
+?X: indentation wrong on purpose--RAM
+?X: Leave a white space between first two '(' for ksh. The sub-shell is needed
+?X: on some machines to avoid the error message when uname is not found; e.g.
+?X: old SUN-OS 3.2 would not execute hostname in (uname -a || hostname). Sigh!
+myuname=`( ($uname -a) 2>/dev/null || hostname) 2>&1`
+?X: Special mention for Xenix, whose 'uname -a' gives us output like this:
+?X: sysname=XENIX
+?X: nodename=whatever
+?X: release=2.3.2 .. etc...
+?X: Therefore, we strip all this variable assignment junk and remove all the
+?X: new lines to keep the myuname variable sane... --RAM
+myuname=`echo $myuname | $sed -e 's/^[^=]*=//' | \
+ tr '[A-Z]' '[a-z]' | tr '\012' ' '`
+dflt=n
+if test "$fastread" = yes; then
+ dflt=y
+elif test -f ../config.sh; then
+?X: The value from config.sh will superseed the one we've just computed
+?X: ... but not if we choose to ignore config.sh, so eval oldmyuname here.
+ oldmyuname=''
+ if $contains myuname= ../config.sh >/dev/null 2>&1; then
+ eval "old`grep myuname= ../config.sh`"
+ fi
+ if test "X$myuname" = "X$oldmyuname"; then
+ dflt=y
+ fi
+fi
+
+@if {test -d ../hints}
+: Get old answers from old config file if Configure was run on the
+: same system, otherwise use the hints.
+hint=default
+cd ..
+if test -f config.sh; then
+ echo " "
+ rp="I see a config.sh file. Shall I use it to set the defaults?"
+ . UU/myread
+ case "$ans" in
+ n*|N*) echo "OK, I'll ignore it."; mv config.sh config.sh.old;;
+ *) echo "Fetching default answers from your old config.sh file..." >&4
+ tmp="$n"
+ tans="$c"
+ . ./config.sh
+ cp config.sh UU
+ n="$tmp"
+ c="$tans"
+ hint=previous
+ ;;
+ esac
+fi
+if test ! -f config.sh; then
+ $cat <<EOM
+
+First time through, eh? I have some defaults handy for the following systems:
+
+EOM
+ cd hints; ls -C *.sh | $sed 's/\.sh/ /g' >&4
+ dflt=''
+ : Half the following guesses are probably wrong... If you have better
+ : tests or hints, please send them to <MAINTLOC>
+ : The metaconfig authors would also appreciate a copy...
+ $test -f /irix && dflt="$dflt sgi"
+ $test -f /xenix && dflt="$dflt sco_xenix"
+ $test -f /dynix && dflt="$dflt dynix"
+ $test -f /dnix && dflt="$dflt dnix"
+ $test -f /bin/mips && /bin/mips && dflt="$dflt mips"
+ $test -d /NextApps && test -f /usr/adm/software_version && dflt="$dflt next"
+ $test -d /usr/include/minix && dflt="$dflt minix"
+?X: If we have uname, we already computed a suitable uname -a output, correctly
+?X: formatted for Xenix, and it lies in $myuname.
+ if $test -f $uname; then
+ set X $myuname
+ shift
+
+ $test -f $5.sh && dflt="$dflt $5"
+
+ case "$5" in
+ fps*) dflt="$dflt fps";;
+ mips*)
+ case "$4" in
+ umips) dflt="$dflt umips";;
+ *) dflt="$dflt mips";;
+ esac;;
+ [23]100) dflt="$dflt mips";;
+ next*) dflt="$dflt next" ;;
+ news*) dflt="$dflt news" ;;
+ i386*) if $test -f /etc/kconfig; then
+ if $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
+ dflt="$dflt isc_3_2_3"
+ elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
+ dflt="$dflt isc_3_2_2"
+ fi
+ : i386.sh hint is wrong for Interactive.
+ dflt=`echo $dflt | $sed 's/i386//'`
+ fi
+ ;;
+ esac
+
+ case "$1" in
+ aix) dflt="$dflt aix_rs" ;;
+ sun[Oo][Ss]) case "$3" in
+ [34]*) vers=`echo $3 | $sed 's/\./_/g'`
+ dflt="$dflt sunos_$vers" ;;
+ 5*) vers=`echo $3 | $sed 's/^5/2/g'`
+ dflt="$dflt solaris_$vers" ;;
+ esac
+ ;;
+ [sS]olaris) case "$3" in
+ 5*) vers=`echo $3 | $sed 's/^5/2/g'`
+ dflt="$dflt solaris_$vers" ;;
+ esac
+ ;;
+ dnix) dflt="$dflt dnix" ;;
+ dgux) dflt="$dflt dgux" ;;
+ genix) dflt="$dflt genix" ;;
+ hp*ux) dflt="$dflt hpux" ;;
+ next) dflt="$dflt next" ;;
+ irix) dflt="$dflt sgi" ;;
+ ultrix) case "$3" in
+ 3*) dflt="$dflt ultrix_3" ;;
+ 4*) dflt="$dflt ultrix_4" ;;
+ esac
+ ;;
+ uts) dflt="$dflt uts" ;;
+ $2) case "$dflt" in
+ *isc*) ;;
+ *) if test -f /etc/systemid; then
+ set `echo $3 | $sed 's/\./ /g'` $4
+ if $test -f sco_$1_$2_$3.sh; then
+ dflt="$dflt sco_$1_$2_$3"
+ elif $test -f sco_$1_$2.sh; then
+ dflt="$dflt sco_$1_$2"
+ elif $test -f sco_$1.sh; then
+ dflt="$dflt sco_$1"
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ else
+?X: Try to identify sony's NEWS-OS (BSD unix)
+ if test -f /vmunix -a -f news_os.sh; then
+ (what /vmunix | tr '[A-Z]' '[a-z]') > ../UU/kernel.what 2>&1
+ if $contains news-os ../UU/kernel.what >/dev/null 2>&1; then
+ dflt="$dflt news_os"
+ fi
+ $rm -f ../UU/kernel.what
+ fi
+ fi
+ set X `echo $dflt | tr ' ' '\012' | sort | uniq`
+ shift
+ dflt=''
+ for file in $*; do
+ if $test -f "$file.sh"; then
+ dflt="$dflt $file"
+ fi
+ done
+ set X $dflt
+ shift
+ dflt=${1+"$@"}
+ case "$dflt" in
+ '') dflt=none;;
+ esac
+ $cat <<EOM
+
+You may give one or more space-separated answers, or "none" if appropriate.
+If your OS version has no hints, DO NOT give a wrong version -- say "none".
+
+EOM
+ rp="Which of these apply, if any?"
+ . ../UU/myread
+ for file in $ans; do
+ if $test -f $file.sh; then
+ . ./$file.sh
+ $cat $file.sh >> ../UU/config.sh
+ elif $test X$ans = X -o X$ans = Xnone ; then
+ : nothing
+ else
+ echo "$file.sh does not exist -- ignored"
+ fi
+ done
+ hint=recommended
+ cd ..
+fi
+cd UU
+@else
+: Get old answers, if there is a config file out there
+hint=default
+if test -f ../config.sh; then
+ echo " "
+ rp="I see a config.sh file. Shall I use it to set the defaults?"
+ . ./myread
+ case "$ans" in
+ n*|N*) echo "OK, I'll ignore it.";;
+ *) echo "Fetching default answers from your old config.sh file..." >&4
+ tmp="$n"
+ tans="$c"
+ . ../config.sh
+ cp ../config.sh .
+ n="$tmp"
+ c="$tans"
+ hint=previous
+ ;;
+ esac
+fi
+@end
+?X: remember, indentation is wrong--RAM
+;;
+*)
+ echo " "
+ echo "Fetching default answers from $config_sh..." >&4
+ tmp="$n"
+ tans="$c"
+ cd ..
+?X: preserve symbolic links, if any
+ cp $config_sh config.sh 2>/dev/null
+ . ./config.sh
+ cd UU
+ cp ../config.sh .
+ n="$tmp"
+ c="$tans"
+ hint=previous
+ ;;
+esac
+
+: Restore computed paths
+for file in $loclist $trylist; do
+ eval $file="\$_$file"
+done
+
diff --git a/U/README.U b/U/README.U
new file mode 100644
index 0000000000..4d4f9645a0
--- /dev/null
+++ b/U/README.U
@@ -0,0 +1,15 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0, or in the perl distribution.
diff --git a/U/cc.U b/U/cc.U
new file mode 100644
index 0000000000..63a621b03b
--- /dev/null
+++ b/U/cc.U
@@ -0,0 +1,119 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: cc.U,v 3.0 1993/08/18 12:05:30 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: cc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:30 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:gccversion cc: cat contains sysman +large cpp \
+ Mcc Myread Guess Oldconfig Loc
+?MAKE: -pick add $@ %<
+?S:cc:
+?S: This variable holds the name of a command to execute a C compiler which
+?S: can resolve multiple global references that happen to have the same
+?S: name. Usual values are "cc", "Mcc", "cc -M", and "gcc".
+?S:.
+?S:gccversion:
+?S: If GNU cc (gcc) is used, this variable holds '1' or '2' to
+?S: indicate whether the compiler is version 1 or 2. This is used in
+?S: setting some of the default cflags.
+?D:cc='cc'
+?INIT:gccversion=''
+?LINT:change cpp
+: see if we need a special compiler
+echo " "
+if usg; then
+ case "$cc" in
+ '') case "$Mcc" in
+ /*) dflt='Mcc';;
+ *) case "$large" in
+ -M*) dflt='cc';;
+ *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
+ if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
+ dflt='cc'
+ else
+ dflt='cc -M'
+ fi
+ else
+ dflt='cc'
+ fi;;
+ esac;;
+ esac;;
+ *) dflt="$cc";;
+ esac
+ $cat <<'EOM'
+On some systems the default C compiler will not resolve multiple global
+references that happen to have the same name. On some such systems the "Mcc"
+command may be used to force these to be resolved. On other systems a "cc -M"
+command is required. (Note that the -M flag on other systems indicates a
+memory model to use!) If you have the Gnu C compiler, you might wish to use
+that instead.
+
+EOM
+ rp="What command will force resolution on this system?"
+ . ./myread
+ cc="$ans"
+else
+ case "$cc" in
+ '') dflt=cc;;
+ *) dflt="$cc";;
+ esac
+ rp="Use which C compiler?"
+ . ./myread
+ cc="$ans"
+fi
+case "$cc" in
+gcc*) echo "Checking out which version of gcc"
+$cat >gccvers.c <<EOM
+#include <stdio.h>
+int main()
+{
+char *v;
+v = "unknown";
+#ifdef __GNUC__
+# ifdef __VERSION__
+ v = __VERSION__;
+# endif
+#endif
+switch((int) v[0])
+ {
+ case '1': printf("1\n"); break;
+ case '2': printf("2\n"); break;
+ case '3': printf("3\n"); break;
+ default: break;
+ }
+#ifdef __GNUC__
+return 0;
+#else
+return 1;
+#endif
+}
+EOM
+ if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then
+ gccversion=`./gccvers`
+ echo "You appear to have version $gccversion."
+ else
+ echo "Doesn't appear to be GNU cc."
+ fi
+ $rm -f gccvers*
+ if $test "$gccversion" = '1'; then
+ cpp=`./loc gcc-cpp $cpp $pth`
+ fi
+ ;;
+esac
diff --git a/U/ccflags.U b/U/ccflags.U
new file mode 100644
index 0000000000..e9e33042e2
--- /dev/null
+++ b/U/ccflags.U
@@ -0,0 +1,241 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: ccflags.U,v 3.0.1.3 1993/09/13 15:58:29 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: ccflags.U,v $
+?RCS: Revision 3.0.1.3 1993/09/13 15:58:29 ram
+?RCS: patch10: explicitely mention -DDEBUG just in case they need it (WAD)
+?RCS: patch10: removed all the "tans" variable usage (WAD)
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/27 14:39:38 ram
+?RCS: patch7: added support for OSF/1 machines
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:00:24 ram
+?RCS: patch6: added defaults for cppflags, ccflags and ldflags
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:05:31 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:ccflags ldflags lkflags cppflags optimize: test cat Myread Guess \
+ Oldconfig cc gccversion mips_type +usrinc package contains
+?MAKE: -pick add $@ %<
+?S:ccflags:
+?S: This variable contains any additional C compiler flags desired by
+?S: the user. It is up to the Makefile to use this.
+?S:.
+?S:cppflags:
+?S: This variable holds the flags that will be passed to the C pre-
+?S: processor. It is up to the Makefile to use it.
+?S:.
+?S:optimize:
+?S: This variable contains any optimizer/debugger flag that should be used.
+?S: It is up to the Makefile to use it.
+?S:.
+?S:ldflags:
+?S: This variable contains any additional C loader flags desired by
+?S: the user. It is up to the Makefile to use this.
+?S:.
+?S:lkflags:
+?S: This variable contains any additional C partial linker flags desired by
+?S: the user. It is up to the Makefile to use this.
+?S:.
+?T:inctest thisincl xxx flag inclwanted
+?D:cppflags=''
+?D:ccflags=''
+?D:ldflags=''
+?INIT:: no include file wanted by default
+?INIT:inclwanted=''
+?INIT:
+: determine optimize, if desired, or use for debug flag also
+case "$optimize" in
+' ') dflt="none";;
+'') dflt="-g";;
+*) dflt="$optimize";;
+esac
+$cat <<EOH
+
+Some C compilers have problems with their optimizers, by default, $package
+compiles with the -O flag to use the optimizer. Alternately, you might want
+to use the symbolic debugger, which uses the -g flag (on traditional Unix
+systems). Either flag can be specified here. To use neither flag, specify
+the word "none".
+
+EOH
+rp="What optimizer/debugger flag should be used?"
+. ./myread
+optimize="$ans"
+case "$optimize" in
+'none') optimize=" ";;
+esac
+
+case "$ccflags" in
+'') case "$cc" in
+ *gcc*) if $test "$gccversion" = "1"; then
+ dflt='-fpcc-struct-return'
+ fi ;;
+ *) dflt='';;
+ esac
+ case "$optimize" in
+ *-g*) dflt="$dflt -DDEBUGGING";;
+ esac
+?X: check for POSIXized ISC
+ case "$cc" in
+ *gcc*) if test -d /etc/conf/kconfig.d &&
+ $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1
+ then
+ dflt="$dflt -posix"
+ fi
+ ;;
+ esac
+ ;;
+*) dflt="$ccflags" ;;
+esac
+
+?X: In USG mode, a MIPS system may need some BSD includes
+case "$mips_type" in
+*BSD*) ;;
+'') ;;
+*) inclwanted="$inclwanted $usrinc/bsd";;
+esac
+for thisincl in $inclwanted; do
+ if $test -d $thisincl; then
+ if $test x$thisincl != x$usrinc; then
+ case "$dflt" in
+ *$thisincl*);;
+ *) dflt="$dflt -I$thisincl";;
+ esac
+ fi
+ fi
+done
+
+?X: Include test function (header, symbol)
+inctest='if $contains $2 $usrinc/$1 >/dev/null 2>&1; then
+ xxx=true;
+elif $contains $2 $usrinc/sys/$1 >/dev/null 2>&1; then
+ xxx=true;
+else
+ xxx=false;
+fi;
+if $xxx; then
+ case "$dflt" in
+ *$2*);;
+ *) dflt="$dflt -D$2";;
+ esac;
+fi'
+
+?X:
+?X: SCO unix uses NO_PROTOTYPE instead of _NO_PROTO
+?X: OSF/1 uses __LANGUAGE_C__ instead of LANGUAGE_C
+?X:
+if ./osf1; then
+ set signal.h __LANGUAGE_C__; eval $inctest
+else
+ set signal.h LANGUAGE_C; eval $inctest
+fi
+set signal.h NO_PROTOTYPE; eval $inctest
+set signal.h _NO_PROTO; eval $inctest
+
+case "$dflt" in
+'') dflt=none;;
+esac
+$cat <<EOH
+
+Your C compiler may want other flags. For this question you should include
+-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
+but you should NOT include libraries or ld flags like -lwhatever. If you
+want $package to honor its debug switch, you should include -DDEBUGGING here.
+To use no flags, specify the word "none".
+
+Your C compiler might also need additional flags, such as -DJMPCLOBBER
+or -DCRIPPLED_CC.
+EOH
+?X: strip leading space
+set X $dflt
+shift
+dflt=${1+"$@"}
+rp="Any additional cc flags?"
+. ./myread
+case "$ans" in
+none) ccflags='';;
+*) ccflags="$ans";;
+esac
+
+: the following weeds options from ccflags that are of no interest to cpp
+cppflags="$ccflags"
+case "$cc" in
+*gcc*) if $test "$gccversion" = "1"; then
+ cppflags="$cppflags -D__GNUC__"
+ fi ;;
+esac
+case "$mips_type" in
+'');;
+*BSD*) cppflags="$cppflags -DSYSTYPE_BSD43";;
+esac
+case "$cppflags" in
+'');;
+*) set X $cppflags
+ cppflags=''
+ for flag
+ do
+ case $flag in
+ -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
+ esac
+ done
+ case "$cppflags" in
+ *-*) echo "(C preprocessor flags: $cppflags)";;
+ esac
+ ;;
+esac
+
+: flags used in final linking phase
+case "$ldflags" in
+'') if venix; then
+ dflt='-i -z'
+ else
+ dflt='none'
+ fi
+ ;;
+*) dflt="$ldflags";;
+esac
+echo " "
+rp="Any additional ld flags (NOT including libraries)?"
+. ./myread
+case "$ans" in
+none) ldflags='';;
+*) ldflags="$ans";;
+esac
+rmlist="$rmlist pdp11"
+
+@if lkflags
+: partial linking may need other flags
+case "$lkflags" in
+'') case "$ldflags" in
+ '') dflt='none';;
+ *) dflt="$ldflags";;
+ esac;;
+*) dflt="$lkflags";;
+esac
+echo " "
+rp="Partial linking flags to be used (NOT including -r)?"
+. ./myread
+case "$ans" in
+none) lkflags='';;
+*) lkflags="$ans";;
+esac
+
+@end
diff --git a/U/d_casti32.U b/U/d_casti32.U
new file mode 100644
index 0000000000..efcfd07a3a
--- /dev/null
+++ b/U/d_casti32.U
@@ -0,0 +1,86 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: d_casti32.U,v 3.0 1993/08/18 12:05:47 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: d_casti32.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Can the compiler cast large floats to 32-bit integers?
+?X:
+?MAKE:d_casti32: cat cc ccflags rm intsize Setvar
+?MAKE: -pick add $@ %<
+?S:d_casti32:
+?S: This variable conditionally defines CASTI32, which indicates
+?S: wether the C compiler can cast large floats to 32-bit ints.
+?S:.
+?T:xxx yyy
+?C:CASTI32:
+?C: This symbol is defined if the C compiler can cast negative
+?C: or large floating point numbers to 32-bit ints.
+?C:.
+?H:#$d_casti32 CASTI32 /**/
+?H:.
+?LINT:set d_casti32
+: check for ability to cast large floats to 32-bit ints.
+echo " "
+echo 'Checking whether your C compiler can cast large floats to int32.' >&4
+if $test "$intsize" -ge 4; then
+ xxx=int
+else
+ xxx=long
+fi
+
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+blech() { exit(3); }
+main()
+{
+ $xxx i32;
+ double f;
+ int result = 0;
+ signal(SIGFPE, blech);
+
+ f = (double) 0x7fffffff;
+ f = 10 * f;
+ i32 = ( $xxx )f;
+
+ if (i32 != ( $xxx )f)
+ result |= 1;
+ exit(result);
+}
+EOCP
+if $cc -o try $ccflags try.c >/dev/null 2>&1; then
+ ./try
+ yyy=$?
+else
+ yyy=1
+fi
+case "$yyy" in
+0) val="$define"
+ echo "Yup, it can."
+ ;;
+*) val="$undef"
+ echo "Nope, it can't."
+ ;;
+esac
+set d_casti32
+eval $setvar
+$rm -f try.*
diff --git a/U/d_isascii.U b/U/d_isascii.U
new file mode 100644
index 0000000000..6a461c39dc
--- /dev/null
+++ b/U/d_isascii.U
@@ -0,0 +1,59 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: d_isascii.U,v 3.0 1993/08/18 12:06:44 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: d_isascii.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_isascii: test cc cat cppflags libs rm Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:d_isascii:
+?S: This variable conditionally defines the HAS_ISASCII manifest constant,
+?S: which indicates to the C program that isascii() is available.
+?S:.
+?C:HAS_ISASCII (ISASCII):
+?C: This manifest constant lets the C program know that the
+?C: isascii is available.
+?C:.
+?H:#$d_isascii HAS_ISASCII /**/
+?H:.
+?LINT:set d_isascii
+: Look for isascii
+echo " "
+$cat >isascii.c <<'EOCP'
+#include <stdio.h>
+#include <ctype.h>
+main() {
+ int c = 'A';
+ if (isascii(c))
+ exit(0);
+ else
+ exit(1);
+}
+EOCP
+if $cc $cppflags -o isascii isascii.c >/dev/null 2>&1 ; then
+ echo "isascii() found."
+ val="$define"
+else
+ echo "isascii() NOT found."
+ val="$undef"
+fi
+set d_isascii
+eval $setvar
+$rm -f isascii*
diff --git a/U/d_setlocale.U b/U/d_setlocale.U
new file mode 100644
index 0000000000..81b2d611fe
--- /dev/null
+++ b/U/d_setlocale.U
@@ -0,0 +1,39 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: d_setlocale.U,v 3.0 1993/08/18 12:07:36 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: d_setlocale.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_setlocale: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_setlocale:
+?S: This variable conditionally defines HAS_SETLOCALE if setlocale() is
+?S: available to handle locale-specific ctype implementations.
+?S:.
+?C:HAS_SETLOCALE:
+?C: This symbol, if defined, indicates that the setlocale routine is
+?C: available to handle locale-specific ctype implementations.
+?C:.
+?H:#$d_setlocale HAS_SETLOCALE /**/
+?H:.
+?LINT:set d_setlocale
+: see if setlocale exists
+set setlocale d_setlocale
+eval $inlibc
diff --git a/U/d_strerror.U b/U/d_strerror.U
new file mode 100644
index 0000000000..4a4a61849f
--- /dev/null
+++ b/U/d_strerror.U
@@ -0,0 +1,122 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: d_strerror.U,v 3.0.1.1 1994/01/24 14:08:56 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: d_strerror.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:08:56 ram
+?RCS: patch16: protected code looking for sys_errnolist[] with @if
+?RCS: patch16: added default value for d_sysernlst
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:35 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_strerror d_syserrlst d_sysernlst d_strerrm: contains Csym Findhdr
+?MAKE: -pick add $@ %<
+?S:d_strerror:
+?S: This variable conditionally defines HAS_STRERROR if strerror() is
+?S: available to translate error numbers to strings.
+?S:.
+?S:d_syserrlst:
+?S: This variable conditionally defines HAS_SYS_ERRLIST if sys_errlist[] is
+?S: available to translate error numbers to strings.
+?S:.
+?S:d_sysernlst:
+?S: This variable conditionally defines HAS_SYS_ERRNOLIST if sys_errnolist[]
+?S: is available to translate error numbers to the symbolic name.
+?S:.
+?S:d_strerrm:
+?S: This variable conditionally defines strerrr as a macro if the
+?S: sys_errlist[] array is defined.
+?S:.
+?C:HAS_STRERROR (STRERROR):
+?C: This symbol, if defined, indicates that the strerror routine is
+?C: available to translate error numbers to strings. See the writeup
+?C: of Strerror() in this file before you try to define your own.
+?C:.
+?C:HAS_SYS_ERRLIST (SYSERRLIST):
+?C: This symbol, if defined, indicates that the sys_errlist array is
+?C: available to translate error numbers to strings. The extern int
+?C: sys_nerr gives the size of that table.
+?C:.
+?C:HAS_SYS_ERRNOLIST (SYSERRNOLIST):
+?C: This symbol, if defined, indicates that the sys_errnolist array is
+?C: available to translate an errno code into its symbolic name (e.g.
+?C: ENOENT). The extern int sys_nerrno gives the size of that table.
+?C:.
+?C:Strerror:
+?C: This preprocessor symbol is defined as a macro if strerror() is
+?C: not available to translate error numbers to strings but sys_errlist[]
+?C: array is there.
+?C:.
+?H:#$d_strerror HAS_STRERROR /**/
+?H:#$d_syserrlst HAS_SYS_ERRLIST /**/
+?H:#$d_sysernlst HAS_SYS_ERRNOLIST /**/
+?H:?%<:#ifdef HAS_STRERROR
+?H:?%<:# define Strerror strerror
+?H:?%<:#else
+?H:#$d_strerrm Strerror(e) ((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e]) /**/
+?H:?%<:#endif
+?H:.
+?D:d_sysernlst=''
+?T:xxx val
+: see if strerror and/or sys_errlist[] exist
+echo " "
+if set strerror val -f d_strerror; eval $csym; $val; then
+ echo 'strerror() found.' >&4
+ d_strerror="$define"
+ d_strerrm="$undef"
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "(You also have sys_errlist[], so we could roll our own strerror.)"
+ d_syserrlst="$define"
+ else
+ echo "(Since you don't have sys_errlist[], sterror() is welcome.)"
+ d_syserrlst="$undef"
+ fi
+elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \
+ $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then
+ echo 'strerror() found in string header.' >&4
+ d_strerror="$define"
+ d_strerrm="$undef"
+ if set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+ echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)"
+ d_syserrlst="$define"
+ else
+ echo "(You don't appear to have any sys_errlist[], how can this be?)"
+ d_syserrlst="$undef"
+ fi
+elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then
+echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4
+ d_strerror="$undef"
+ d_syserrlst="$define"
+ d_strerrm="$define"
+else
+ echo 'strerror() and sys_errlist[] NOT found.' >&4
+ d_strerror="$undef"
+ d_syserrlst="$undef"
+ d_strerrm="$undef"
+fi
+@if d_sysernlst || HAS_SYS_ERRNOLIST
+if set sys_errnolist val -a d_sysernlst; eval $csym; $val; then
+ echo "(Symbolic error codes can be fetched via the sys_errnolist[] array.)"
+ d_sysernlst="$define"
+else
+ echo "(However, I can't extract the symbolic error code out of errno.)"
+ d_sysernlst="$undef"
+fi
+@end
+
diff --git a/U/dlsrc.U b/U/dlsrc.U
new file mode 100644
index 0000000000..e67e1fdce0
--- /dev/null
+++ b/U/dlsrc.U
@@ -0,0 +1,66 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: dlsrc.U,v$
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: dlsrc.U,v $
+?RCS:
+?MAKE:dlsrc dlobj usedl: Myread Oldconfig package \
+ Guess test rm cat i_dlfcn cc ccflags Findhdr
+?MAKE: -pick add $@ %<
+?S:usedl:
+?S: This variable contains indicates if the the system supports dynamic
+?S: loading of some sort. See also dlsrc and dlobj.
+?S:.
+?S:dlsrc:
+?S: This variable contains the name of the dynamic loading file that
+?S: will be used with the package.
+?S:.
+?S:dlobj:
+?S: This variable contains the name of the dynamic loading object
+?S: file that will be used with the package.
+?S:.
+?C:USE_DYNAMIC_LOADING~%<:
+?C: This symbol, if defined, indicates that dynamic loading of
+?C: some sort is available.
+?C:.
+?H:?%<:#$usedl USE_DYNAMIC_LOADING /**/
+?H:.
+?W:%<:dlopen
+?INIT: usedl=''
+?X:
+?X: Can anyone suggest a test for whether this works on a given system?
+?X:
+: determine which dynamic loading, if any, to compile in
+echo " "
+case "$usedl" in
+'')
+ case "$i_dlfcn" in
+ 'define') dflt='y' ;;
+ *) dflt='n' ;;
+ esac
+ ;;
+'define') dflt='y' ;;
+'y') dflt='y'
+ usedl='define' ;;
+*) dflt='n' ;;
+esac
+rp="Do you wish to attempt to use dynamic loading?"
+. ./myread
+usedl="$ans"
+case "$ans" in
+y*) usedl='define'; dlsrc='dl.c'; dlobj='dl.o';;
+*) usedl='undef'; dlsrc=''; dlobj='';;
+esac
diff --git a/U/gidtype.U b/U/gidtype.U
new file mode 100644
index 0000000000..870fce8c83
--- /dev/null
+++ b/U/gidtype.U
@@ -0,0 +1,60 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: gidtype.U,v 3.0 1993/08/18 12:08:11 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: gidtype.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:11 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:gidtype: Myread Oldconfig contains Findhdr
+?MAKE: -pick add $@ %<
+?S:gidtype:
+?S: This variable defines Gid_t to be something like gid_t, int,
+?S: ushort, or whatever type is used to declare the return type
+?S: of getgid(). Typically, it is the type of group ids in the kernel.
+?S:.
+?C:Gid_t (GIDTYPE):
+?C: This symbol holds the return type of getgid() and the type of
+?C: argument to setrgid() and related functions. Typically,
+?C: it is the type of group ids in the kernel.
+?C: It can be int, ushort, uid_t, etc... It may be necessary to include
+?C: <sys/types.h> to get any typedef'ed information.
+?C:.
+?H:#define Gid_t $gidtype /* Type for getgid(), etc... */
+?H:.
+?T:xxx
+: see what type gids are declared as in the kernel
+case "$gidtype" in
+'')
+ if $contains 'gid_t;' `./findhdr sys/types.h` >/dev/null 2>&1 ; then
+ dflt='gid_t';
+ else
+ xxx=`./findhdr sys/user.h`
+ set `grep 'groups\[NGROUPS\];' "$xxx" 2>/dev/null` unsigned short
+ case $1 in
+ unsigned) dflt="$1 $2" ;;
+ *) dflt="$1" ;;
+ esac
+ fi
+ ;;
+*) dflt="$gidtype";;
+esac
+echo " "
+rp="What is the type for group ids returned by getgid()?"
+. ./myread
+gidtype="$ans"
diff --git a/U/groupstype.U b/U/groupstype.U
new file mode 100644
index 0000000000..f8ebab4ad3
--- /dev/null
+++ b/U/groupstype.U
@@ -0,0 +1,58 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: groupstype.U,v$
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: groupstype.U,v $
+?RCS:
+?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig contains Findhdr
+?MAKE: -pick add $@ %<
+?INIT:groupstype=''
+?S:groupstype:
+?S: This variable defines GROUPSTYPE to be something like gid_t, int,
+?S: ushort, or whatever type is used for the second argument to
+?S: getgroups(). Usually, this is the same of gidtype, but
+?S: sometimes it isn't.
+?S:.
+?C:GROUPSTYPE:
+?C: This symbol holds the type used for the second argument to
+?C: getgroups(). Usually, this is the same of gidtype, but
+?C: sometimes it isn't. It can be int, ushort, uid_t, etc...
+?C: It may be necessary to include <sys/types.h> to get any
+?C: typedef'ed information. This is only required if you have
+?C: getgroups().
+?C:.
+?H:?%<:#ifdef HAS_GETGROUPS
+?H:?%<:#define GROUPSTYPE $groupstype /* Type for 2nd arg to getgroups() */
+?H:?%<:#endif
+?H:.
+?W:%<:getgroups HAS_GETGROUPS
+case "$d_getgrps" in
+'define')
+ case "$groupstype" in
+ '') dflt="$gidtype" ;;
+ *) dflt="$groupstype" ;;
+ esac
+ echo " "
+ $cat <<EOM
+What is the type of the second argument to getgroups()? Usually this
+is the same as group ids, "$gidtype", but not always.
+EOM
+ rp="What type is the second arguement to getgroups()?"
+ . ./myread
+ groupstype="$ans"
+ ;;
+*) groupstype="$gidtype";;
+esac
diff --git a/U/i_dlfcn.U b/U/i_dlfcn.U
new file mode 100644
index 0000000000..0f0f9c1592
--- /dev/null
+++ b/U/i_dlfcn.U
@@ -0,0 +1,37 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: i_dlfcn.U,v $
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: i_dlfcn.U,v $
+?RCS:
+?MAKE:i_dlfcn: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_dlfcn:
+?S: This variable conditionally defines the I_DLFCN symbol, which
+?S: indicates to the C program that <dlfcn.h> exists and should
+?S: be included.
+?S:.
+?C:I_DLFCN:
+?C: This symbol, if defined, indicates that <dlfcn.h> exists and should
+?C: be included.
+?C:.
+?H:#$i_dlfcn I_DLFCN /**/
+?H:.
+?LINT:set i_dlfcn
+: see if dlfcn is available
+set dlfcn.h i_dlfcn
+eval $inhdr
+
diff --git a/U/libc.U b/U/libc.U
new file mode 100644
index 0000000000..54879b1112
--- /dev/null
+++ b/U/libc.U
@@ -0,0 +1,297 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: libc.U,v 3.0.1.3 1994/01/24 14:12:17 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: libc.U,v $
+?RCS: Revision 3.0.1.3 1994/01/24 14:12:17 ram
+?RCS: patch16: can now export nm_extract as an internal-use only variable
+?RCS:
+?RCS: Revision 3.0.1.2 1993/09/13 16:09:03 ram
+?RCS: patch10: added special handling for Apollo systems (WAD)
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:40:03 ram
+?RCS: patch7: added entry for /usr/shlib/libc.so (OSF/1 machines)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:08:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libc +nm_extract: echo n c rm test grep Getfile Myread Oldconfig Loc \
+ sed libs incpath libpth runnm nm_opt contains plibpth xlibpth
+?MAKE: -pick add $@ %<
+?S:libc:
+?S: This variable contains the location of the C library.
+?S:.
+?S:nm_extract:
+?S: This variable holds the name of the extraction command used to process
+?S: the output of nm and yield the list of defined symbols. It is used
+?S: internally by Configure.
+?S:.
+?T:thislib try libnames xxx xscan xrun thisname com tans
+?LINT:change libpth nm_opt
+case "$runnm" in
+true)
+?X: indentation is wrong on purpose--RAM
+: get list of predefined functions in a handy place
+echo " "
+case "$libc" in
+'') libc=unknown
+ case "$libs" in
+ *-lc_s*) libc=`./loc libc_s.a $libc $libpth`
+ esac
+ ;;
+esac
+libpth="$plibpth $libpth"
+libnames='';
+case "$libs" in
+'') ;;
+*) for thislib in $libs; do
+ case "$thislib" in
+ -l*)
+ thislib=`expr X$thislib : 'X-l\(.*\)'`
+ try=`./loc lib$thislib.a blurfl/dyick $libpth`
+ if test ! -f $try; then
+ try=`./loc lib$thislib blurfl/dyick $libpth`
+ if test ! -f $try; then
+ try=`./loc lib$thislib.so.'*' blurfl/dyick $libpth`
+ if test ! -f $try; then
+ try=`./loc $thislib blurfl/dyick $libpth`
+ if test ! -f $try; then
+ try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
+ if test ! -f $try; then
+ try=''
+ fi
+ fi
+ fi
+ fi
+ fi
+ libnames="$libnames $try"
+ ;;
+ *) libnames="$libnames $thislib" ;;
+ esac
+ done
+ ;;
+esac
+?X:
+?X: Some systems (e.g. DG/UX) use "environmental" links, which make the test
+?X: -f fail. Ditto for symbolic links. So in order to reliably check the
+?X: existence of a file, we use test -r. It will still fail with DG/UX links
+?X: though, but at least it will detect symbolic links. At some strategic
+?X: points, we make use of (test -h), using a sub-shell in case builtin test
+?X: does not implement the -h check for symbolic links. This makes it
+?X: possible to preset libc in a hint file for instance and have it show up
+?X: as-is in the question.
+?X:
+xxx=normal
+case "$libc" in
+unknown)
+ set /usr/ccs/lib/libc.so
+ $test -r $1 || set /usr/lib/libc.so
+ $test -r $1 || set /usr/shlib/libc.so
+ $test -r $1 || set /usr/lib/libc.so.[0-9]*
+ $test -r $1 || set /lib/libsys_s.a
+ eval set \$$#
+ ;;
+*)
+?X: ensure the test below for the (shared) C library will fail
+ set blurfl
+ ;;
+esac
+if $test -r "$1"; then
+ echo "Your (shared) C library seems to be in $1."
+ libc="$1"
+elif $test -r /lib/libc && $test -r /lib/clib; then
+?X:
+?X: Apollo has its C library in /lib/clib AND /lib/libc
+?X: not to mention its math library in /lib/syslib...
+?X:
+ echo "Your C library seems to be in both /lib/clib and /lib/libc."
+ xxx=apollo
+ libc='/lib/clib /lib/libc'
+ if $test -r /lib/syslib; then
+ echo "(Your math library is in /lib/syslib.)"
+?X: Put syslib in libc -- not quite right, but won't hurt
+ libc="$libc /lib/syslib"
+ fi
+elif $test -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ echo "Your C library seems to be in $libc, as you said before."
+?X: For mips, and...
+elif $test -r $incpath/usr/lib/libc.a; then
+ libc=$incpath/usr/lib/libc.a;
+ echo "Your C library seems to be in $libc. That's fine."
+elif $test -r /lib/libc.a; then
+ libc=/lib/libc.a;
+ echo "Your C library seems to be in $libc. You're normal."
+else
+ if tans=`./loc libc.a blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc libc blurfl/dyick $libpth`; $test -r "$tans"; then
+ libnames="$libnames "`./loc clib blurfl/dyick $libpth`
+ elif tans=`./loc clib blurfl/dyick $libpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Slibc.a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ elif tans=`./loc Mlibc.a blurfl/dyick $xlibpth`; $test -r "$tans"; then
+ :
+ else
+ tans=`./loc Llibc.a blurfl/dyick $xlibpth`
+ fi
+ if $test -r "$tans"; then
+ echo "Your C library seems to be in $tans, of all places."
+ libc=$tans
+ else
+ libc='blurfl'
+ fi
+fi
+if $test $xxx = apollo -o -r "$libc" || (test -h "$libc") >/dev/null 2>&1; then
+ dflt="$libc"
+ cat <<EOM
+
+If the guess above is wrong (which it might be if you're using a strange
+compiler, or your machine supports multiple models), you can override it here.
+
+EOM
+else
+ dflt=''
+ echo $libpth | tr ' ' '\012' | sort | uniq > libpath
+ cat >&4 <<EOM
+I can't seem to find your C library. I've looked in the following places:
+
+EOM
+ $sed 's/^/ /' libpath
+ cat <<EOM
+
+None of these seems to contain your C library. I need to get its name...
+
+EOM
+fi
+fn=f
+rp='Where is your C library?'
+. ./getfile
+libc="$ans"
+
+echo " "
+echo $libc $libnames | tr ' ' '\012' | sort | uniq > libnames
+set X `cat libnames`
+shift
+xxx=files
+case $# in 1) xxx=file; esac
+echo "Extracting names from the following $xxx for later perusal:" >&4
+echo " "
+$sed 's/^/ /' libnames >&4
+echo " "
+$echo $n "This may take a while...$c" >&4
+
+nm $nm_opt $* 2>/dev/null >libc.tmp
+$echo $n ".$c"
+?X:
+?X: To accelerate processing, we look at the correct 'sed' command
+?X: by using a small subset of libc.tmp, i.e. fprintf function.
+?X: When we know which sed command to use, do the name extraction
+?X:
+$grep fprintf libc.tmp > libc.ptf
+?X:
+?X: In order to ehance readability and save some space, we define
+?X: some variables that will be "eval"ed.
+?X:
+xscan='eval "<libc.ptf $com >libc.list"; $echo $n ".$c" >&4'
+xrun='eval "<libc.tmp $com >libc.list"; echo "done" >&4'
+?X: BSD-like output
+if com="$sed -n -e 's/^.* [ADTS] *_[_.]*//p' -e 's/^.* [ADTS] //p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: SYSV-like output
+elif com="$sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e '/|UNDEF/d' -e '/FUNC..GL/s/^.*|__*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.* D __*//p' -e 's/^.* D //p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^_//' -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$grep '|' | $sed -n -e '/|COMMON/d' -e '/|DATA/d' \
+ -e '/ file/d' -e 's/^\([^ ]*\).*/\1/p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+elif com="$sed -n -e 's/^.*|FUNC |GLOB .*|//p' -e 's/^.*|FUNC |WEAK .*|//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+?X: mips nm output (sysV)
+elif com="$sed -n -e 's/^__//' -e '/|Undef/d' -e '/|Proc/s/ .*//p'";\
+ eval $xscan;\
+ $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ eval $xrun
+else
+ nm -p $* 2>/dev/null >libc.tmp
+ com="$sed -n -e 's/^.* [ADTS] *_[_.]*//p' -e 's/^.* [ADTS] //p'";\
+ eval "<libc.tmp $com >libc.list"
+ if $contains '^fprintf$' libc.list >/dev/null 2>&1; then
+ nm_opt='-p'
+ echo "done" >&4
+ else
+ echo " "
+ echo "nm didn't seem to work right. Trying ar instead..." >&4
+ com=''
+ if ar t $libc > libc.tmp; then
+ for thisname in $libnames; do
+ ar t $thisname >>libc.tmp
+ done
+ $sed -e 's/\.o$//' < libc.tmp > libc.list
+ echo "Ok." >&4
+ else
+ echo "ar didn't seem to work right." >&4
+ echo "Maybe this is a Cray...trying bld instead..." >&4
+ if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then
+ for thisname in $libnames; do
+ bld t $libnames | \
+ $sed -e 's/.*\///' -e 's/\.o:.*$//' >>libc.list
+ ar t $thisname >>libc.tmp
+ done
+ echo "Ok." >&4
+ else
+ echo "That didn't work either. Giving up." >&4
+ exit 1
+ fi
+ fi
+ fi
+fi
+nm_extract="$com"
+if $test -f /lib/syscalls.exp; then
+ echo " "
+ echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
+ $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
+fi
+?X: remember, indentation is wrong on purpose--RAM
+;;
+esac
+$rm -f libnames libpath
+
diff --git a/U/libpth.U b/U/libpth.U
new file mode 100644
index 0000000000..99cf22ccf5
--- /dev/null
+++ b/U/libpth.U
@@ -0,0 +1,83 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: libpth.U,v 3.0 1993/08/18 12:09:02 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: libpth.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:02 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit initializes the path for C library lookup.
+?X:
+?MAKE:libpth xlibpth plibpth: mips incpath test cat Myread
+?MAKE: -pick add $@ %<
+?S:libpth:
+?S: This variable holds the general path used to find libraries. It is
+?S: intended to be used by other units.
+?S:.
+?S:plibpth:
+?S: Holds the private path used by Configure to find out the libraries.
+?S: Its value is prepend to libpth. This variable takes care of special
+?S: machines, like the mips. Usually, it should be empty.
+?S:.
+?T: xxx yyy
+?INIT:: change the next line if compiling for Xenix/286 on Xenix/386
+?INIT:xlibpth='/usr/lib/386 /lib/386'
+?INIT:
+?INIT:: general looking path for locating libraries
+?INIT:libpth="/usr/lib/large /lib /usr/lib $xlibpth /lib/large"
+?INIT:libpth="$libpth /usr/lib/small /lib/small"
+?INIT:libpth="$libpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+?INIT:
+?INIT:: Private path used by Configure to find libraries. Its value
+?INIT:: is prepend to libpth. This variable takes care of special
+?INIT:: machines, like the mips. Usually, it should be empty.
+?INIT:plibpth=''
+?INIT:
+?LINT:describe xlibpth
+?LINT:use mips
+: Set private lib path
+case "$plibpth" in
+'') if mips; then
+?X: on mips, we DO NOT want /lib, and we want $incpath/usr/lib
+ plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ fi;;
+esac
+libpth="$plibpth $libpth"
+: Now check and see which directories actually exist.
+xxx=''
+for yyy in $libpth
+do
+ if $test -d $yyy; then
+ xxx="$xxx $yyy"
+ fi
+done
+libpth="$xxx"
+$cat <<EOM
+Some systems have incompatible or broken versions of libraries. Where
+should I look for libraries?
+EOM
+
+dflt="$libpth"
+echo " "
+rp="Directories to use for library searches?"
+. ./myread
+case "$ans" in
+none) libpth=' ';;
+*) libpth="$ans";;
+esac
diff --git a/U/libs.U b/U/libs.U
new file mode 100644
index 0000000000..c1f951abb0
--- /dev/null
+++ b/U/libs.U
@@ -0,0 +1,132 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: libs.U,v 3.0.1.1 1993/08/25 14:02:31 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: libs.U,v $
+?RCS: Revision 3.0.1.1 1993/08/25 14:02:31 ram
+?RCS: patch6: added default for libs
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libs: test cat Myread Oldconfig Loc libpth package xlibpth
+?MAKE: -pick add $@ %<
+?S:libs:
+?S: This variable holds the additional libraries we want to use.
+?S: It is up to the Makefile to deal with it.
+?S:.
+?T:xxx yyy zzz thislib thatlib libswanted
+?D:libs=''
+?X:
+?X: This order is chosen so that libraries -lndir, -ldir, -lucb, -lbsd,
+?X: -lBSD, -lPW, and -lx only get used if there are unresolved
+?X: routines at link time. Usually, these are backwards compatability
+?X: libraries, and may not be as reliable as the standard c library.
+?X: The ordering of c_s, posix, and cposix is a guess and almost
+?X: certainly wrong on about half of all systems.
+?INIT:libswanted="net socket nsl inet nm sdbm gdbm ndbm dbm malloc dl dld sun m c_s posix cposix ndir dir ucb bsd BSD PW x"
+?INIT:
+: Looking for optional libraries
+echo " "
+echo "Checking for optional libraries..." >&4
+case "$libs" in
+' '|'') dflt='';;
+*) dflt="$libs";;
+esac
+case "$libswanted" in
+'') libswanted='c_s';;
+esac
+for thislib in $libswanted; do
+ case "$thislib" in
+ dbm) thatlib=ndbm;;
+ *_s) thatlib=NONE;;
+ *) thatlib="${thislib}_s";;
+ esac
+ xxx=`./loc lib$thislib.a X $libpth`
+ yyy=`./loc lib$thatlib.a X $libpth`
+ zzz=`./loc lib$thislib.so.[0-9]'*' $libpth`
+ if $test -f $xxx; then
+ echo "Found -l$thislib."
+ case "$dflt" in
+ "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif $test -f $yyy; then
+ echo "Found -l$thatlib."
+ case "$dflt" in
+ "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *) dflt="$dflt -l$thatlib";;
+ esac
+ elif $test -f $zzz; then
+ echo "Found -$thislib."
+ case "$dflt" in
+ "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ else
+ xxx=`./loc Slib$thislib.a X $xlibpth`
+ yyy=`./loc Slib$thatlib.a X $xlibpth`
+ if $test -f $xxx; then
+ echo "Found -l$thislib."
+ case "$dflt" in
+ "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *) dflt="$dflt -l$thislib";;
+ esac
+ elif $test -f $yyy; then
+ echo "Found -l$thatlib."
+ case "$dflt" in
+ "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *) dflt="$dflt -l$thatlib";;
+ esac
+ else
+ echo "No -l$thislib."
+ fi
+ fi
+done
+set X $dflt
+shift
+dflt="$*"
+case "$libs" in
+'') dflt="$dflt";;
+*) dflt="$libs";;
+esac
+case "$dflt" in
+' '|'') dflt='none';;
+esac
+
+$cat <<EOM
+
+Some versions of Unix support shared libraries, which make executables smaller
+but make load time slightly longer.
+
+On some systems, mostly newer Unix System V's, the shared library is included
+by putting the option "-lc_s" as the last thing on the cc command line when
+linking. Other systems use shared libraries by default. There may be other
+libraries needed to compile $package on your machine as well. If your system
+needs the "-lc_s" option, include it here. Include any other special libraries
+here as well. Say "none" for none.
+EOM
+
+echo " "
+rp="Any additional libraries?"
+. ./myread
+case "$ans" in
+none) libs=' ';;
+*) libs="$ans";;
+esac
+
diff --git a/U/libyacc.U b/U/libyacc.U
new file mode 100644
index 0000000000..cfee077823
--- /dev/null
+++ b/U/libyacc.U
@@ -0,0 +1,69 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: libyacc.U,v 3.0.1.1 1994/01/24 14:13:49 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: libyacc.U,v $
+?RCS: Revision 3.0.1.1 1994/01/24 14:13:49 ram
+?RCS: patch16: un-obsoleted this unit for smooth yacc compilations
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:04 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:libyacc: Loc yacc libpth test
+?MAKE: -pick add $@ %<
+?S:libyacc:
+?S: This variable contains the argument to pass to the loader in order
+?S: to get the yacc library routines. If there is no yacc or yacc
+?S: library, it is null.
+?S:.
+?T:xxx
+: see if we should include -ly
+echo " "
+case "$yacc" in
+*byacc*)
+ echo "You are using byacc, so I won't look for a yacc library." >&4
+ libyacc=''
+ ;;
+*yacc)
+ if $test -r /usr/lib/liby.a || $test -r /usr/local/lib/liby.a ; then
+ echo "-ly found." >&4
+ libyacc='-ly'
+ else
+ xxx=`./loc liby.a x $libpth`
+ case "$xxx" in
+ x)
+ echo "No yacc library found." >&4
+ libyacc=''
+ ;;
+ *)
+ echo "yacc library found in $xxx." >&4
+ libyacc="$xxx"
+ ;;
+ esac
+ fi
+ ;;
+*bison*)
+ echo "You are using bison, so I won't look for a yacc library." >&4
+ libyacc=''
+ ;;
+*)
+echo "You don't seem to have yacc, so I won't look for the yacc library." >&4
+ libyacc=''
+ ;;
+esac
+
diff --git a/U/mallocsrc.U b/U/mallocsrc.U
new file mode 100644
index 0000000000..3fc4ee7c6e
--- /dev/null
+++ b/U/mallocsrc.U
@@ -0,0 +1,101 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: mallocsrc.U,v 3.0 1993/08/18 12:09:12 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: mallocsrc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:12 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:mallocsrc mallocobj usemymalloc malloctype: Myread Oldconfig package \
+ Guess test rm cat +cc +ccflags Findhdr
+?MAKE: -pick add $@ %<
+?S:usemymalloc:
+?S: This variable contains y if the malloc that comes with this package
+?S: is desired over the system's version of malloc. People often include
+?S: special versions of malloc for effiency, but such versions are often
+?S: less portable. See also mallocsrc and mallocobj.
+?S:.
+?S:mallocsrc:
+?S: This variable contains the name of the malloc.c that comes with
+?S: the package, if that malloc.c is preferred over the system malloc.
+?S: Otherwise the value is null. This variable is intended for generating
+?S: Makefiles.
+?S:.
+?S:mallocobj:
+?S: This variable contains the name of the malloc.o that this package
+?S: generates, if that malloc.o is preferred over the system malloc.
+?S: Otherwise the value is null. This variable is intended for generating
+?S: Makefiles. See mallocsrc.
+?S:.
+?S:malloctype:
+?S: This variable contains the kind of ptr returned by malloc and realloc.
+?S:.
+?C:Malloc_t (MALLOCPTRTYPE):
+?C: This symbol is the type of pointer returned by malloc and realloc.
+?C:.
+?H:#define Malloc_t $malloctype /**/
+?H:.
+?X: Cannot test for mallocsrc; it is the unit's name and there is a bug in
+?X: the interpreter which defines all the names, even though they are not used.
+@if mallocobj
+: determine which malloc to compile in
+: Old versions had dflt='y' only for bsd or v7.
+echo " "
+case "$usemymalloc" in
+'')
+ if bsd || v7; then
+ dflt='y'
+ else
+ dflt='y'
+ fi
+ ;;
+*) dflt="$usemymalloc"
+ ;;
+esac
+rp="Do you wish to attempt to use the malloc that comes with $package?"
+. ./myread
+usemymalloc="$ans"
+case "$ans" in
+y*) mallocsrc='malloc.c'; mallocobj='malloc.o';;
+*) mallocsrc=''; mallocobj='';;
+esac
+
+@end
+@if MALLOCPTRTYPE || Malloc_t
+: compute the type returned by malloc
+echo " "
+case "$malloctype" in
+'')
+ if $test `./findhdr malloc.h`; then
+ echo "#include <malloc.h>" > malloc.c
+ fi
+#include <malloc.h>
+ $cat >>malloc.c <<'END'
+void *malloc();
+END
+ if $cc $ccflags -c malloc.c >/dev/null 2>&1; then
+ malloctype='void *'
+ else
+ malloctype='char *'
+ fi
+ $rm -f malloc.[co]
+ ;;
+esac
+echo "Your system wants malloc to return '$malloctype', it would seem." >&4
+
+@end
diff --git a/U/prototype.U b/U/prototype.U
new file mode 100644
index 0000000000..8fa80e8852
--- /dev/null
+++ b/U/prototype.U
@@ -0,0 +1,124 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: prototype.U,v 3.0.1.2 1994/01/24 14:15:36 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: prototype.U,v $
+?RCS: Revision 3.0.1.2 1994/01/24 14:15:36 ram
+?RCS: patch16: prototype handling macros now appear only when needed
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/25 14:03:12 ram
+?RCS: patch6: defines were referring to non-existent VOID symbol
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:09:36 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:prototype: Myread Oldconfig cat +cc rm Setvar
+?MAKE: -pick add $@ %<
+?S:prototype:
+?S: This variable holds the eventual value of CAN_PROTOTYPE, which
+?S: indicates the C compiler can handle funciton prototypes.
+?S:.
+?C:CAN_PROTOTYPE ~ %<:
+?C: If defined, this macro indicates that the C compiler can handle
+?C: function prototypes.
+?C:.
+?C:DOTS:
+?C: This macro is used to specify the ... in function prototypes which
+?C: have arbitrary additional arguments.
+?C:.
+?C:NXT_ARG:
+?C: This macro is used to separate arguments in the declared argument list.
+?C:.
+?C:P_FUNC:
+?C: This macro is used to declare "private" (static) functions.
+?C: It takes three arguments: the function type and name, a parenthesized
+?C: traditional (comma separated) argument list, and the declared argument
+?C: list (in which arguments are separated with NXT_ARG, and additional
+?C: arbitrary arguments are specified with DOTS). For example:
+?C:
+?C: P_FUNC(int foo, (bar, baz), int bar NXT_ARG char *baz[])
+?C:.
+?C:P_FUNC_VOID:
+?C: This macro is used to declare "private" (static) functions that have
+?C: no arguments. The macro takes one argument: the function type and name.
+?C: For example:
+?C:
+?C: P_FUNC_VOID(int subr)
+?C:.
+?C:V_FUNC:
+?C: This macro is used to declare "public" (non-static) functions.
+?C: It takes three arguments: the function type and name, a parenthesized
+?C: traditional (comma separated) argument list, and the declared argument
+?C: list (in which arguments are separated with NXT_ARG, and additional
+?C: arbitrary arguments are specified with DOTS). For example:
+?C:
+?C: V_FUNC(int main, (argc, argv), int argc NXT_ARG char *argv[])
+?C:.
+?C:V_FUNC_VOID:
+?C: This macro is used to declare "public" (non-static) functions that have
+?C: no arguments. The macro takes one argument: the function type and name.
+?C: For example:
+?C:
+?C: V_FUNC_VOID(int fork)
+?C:.
+?C:P:
+?C: This macro is used to declare function parameters for folks who want
+?C: to make declarations with prototypes using a different style than
+?C: the above macros. Use double parentheses. For example:
+?C:
+?C: int main P((int argc, char *argv[]));
+?C:.
+?H:?%<:#$prototype CAN_PROTOTYPE /**/
+?H:?%<:#ifdef CAN_PROTOTYPE
+?H:?NXT_ARG:#define NXT_ARG ,
+?H:?DOTS:#define DOTS , ...
+?H:?V_FUNC:#define V_FUNC(name, arglist, args)name(args)
+?H:?P_FUNC:#define P_FUNC(name, arglist, args)static name(args)
+?H:?V_FUNC_VOID:#define V_FUNC_VOID(name)name(void)
+?H:?P_FUNC_VOID:#define P_FUNC_VOID(name)static name(void)
+?H:?P:#define P(args) args
+?H:?%<:#else
+?H:?NXT_ARG:#define NXT_ARG ;
+?H:?DOTS:#define DOTS
+?H:?V_FUNC:#define V_FUNC(name, arglist, args)name arglist args;
+?H:?P_FUNC:#define P_FUNC(name, arglist, args)static name arglist args;
+?H:?V_FUNC_VOID:#define V_FUNC_VOID(name)name()
+?H:?P_FUNC_VOID:#define P_FUNC_VOID(name)static name()
+?H:?P:#define P(args) ()
+?H:?%<:#endif
+?H:.
+?W:%<:NXT_ARG DOTS V_FUNC P_FUNC V_FUNC_VOID P_FUNC_VOID _
+?LINT:set prototype
+: Cruising for prototypes
+echo " "
+echo "Checking out function prototypes..." >&4
+$cat >prototype.c <<'EOCP'
+main(int argc, char *argv[]) {
+ exit(0);}
+EOCP
+if $cc -c prototype.c >prototype.out 2>&1 ; then
+ echo "Your C compiler appears to support function prototypes."
+ val="$define"
+else
+ echo "Your C compiler doesn't seem to understand function prototypes."
+ val="$undef"
+fi
+set prototype
+eval $setvar
+$rm -f prototype*
+
diff --git a/U/voidflags.U b/U/voidflags.U
new file mode 100644
index 0000000000..50b5d9285b
--- /dev/null
+++ b/U/voidflags.U
@@ -0,0 +1,161 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: voidflags.U,v 3.0 1993/08/18 12:10:01 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: voidflags.U,v $
+?RCS: Revision 3.0 1993/08/18 12:10:01 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:voidflags defvoidused: cat rm contains cc package Oldconfig Myread
+?MAKE: -pick add $@ %<
+?S:voidflags:
+?S: This variable contains the eventual value of the VOIDFLAGS symbol,
+?S: which indicates how much support of the void type is given by this
+?S: compiler. See VOIDFLAGS for more info.
+?S:.
+?X: Exceptionally, we have to explicitely alias the symbol name for
+?X: config_h.SH, otherwise the comment would not appear.
+?C:VOIDFLAGS ~ %<:
+?C: This symbol indicates how much support of the void type is given by this
+?C: compiler. What various bits mean:
+?C:
+?C: 1 = supports declaration of void
+?C: 2 = supports arrays of pointers to functions returning void
+?C: 4 = supports comparisons between pointers to void functions and
+?C: addresses of void functions
+?C: 8 = suports declaration of generic void pointers
+?C:
+?C: The package designer should define VOIDUSED to indicate the requirements
+?C: of the package. This can be done either by #defining VOIDUSED before
+?C: including config.h, or by defining defvoidused in Myinit.U. If the
+?C: latter approach is taken, only those flags will be tested. If the
+?C: level of void support necessary is not present, defines void to int.
+?C:.
+?H:?%<:#ifndef VOIDUSED
+?H:?%<:# ifdef VOIDWANT
+?H:?%<:# define VOIDUSED VOIDWANT
+?H:?%<:# else
+?H:?%<:# define VOIDUSED $defvoidused
+?H:?%<:# endif
+?H:?%<:#endif
+?H:?%<:#define VOIDFLAGS $voidflags
+?H:?%<:#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
+?H:?%<:# define void int /* is void to be avoided? */
+?H:?%<:# define M_VOID /* Xenix strikes again */
+?H:?%<:# define VOID
+?H:?%<:#else
+?H:?%<:# define VOID void
+?H:?%<:#endif
+?H:.
+?W:%<:void VOID VOIDWANT
+?INIT:: full support for void wanted by default
+?INIT:defvoidused=15
+?INIT:
+?LINT:describe defvoidused
+?LINT:known void M_VOID VOIDUSED
+: check for void type
+echo " "
+$cat >&4 <<EOM
+Checking to see how well your C compiler groks the void type...
+
+ Support flag bits are:
+ 1: basic void declarations.
+ 2: arrays of pointers to functions returning void.
+ 4: operations between pointers to and addresses of void functions.
+ 8: generic void pointers.
+
+EOM
+case "$voidflags" in
+'')
+ $cat >try.c <<'EOCP'
+#if TRY & 1
+void main() {
+#else
+main() {
+#endif
+ extern void moo(); /* function returning void */
+ void (*goo)(); /* ptr to func returning void */
+#if TRY & 8
+ void *hue; /* generic ptr */
+#endif
+#if TRY & 2
+ void (*foo[10])();
+#endif
+
+#if TRY & 4
+ if(goo == moo) {
+ exit(0);
+ }
+#endif
+ exit(0);
+}
+EOCP
+?X: This unit used to use cc -S in those tests to try to speed up things, but
+?X: unfortunately, AIX 3.2 does not support this option.
+ if $cc -c -DTRY=$defvoidused try.c >.out 2>&1 ; then
+ voidflags=$defvoidused
+ echo "It appears to support void to the level $package wants ($defvoidused)."
+ if $contains warning .out >/dev/null 2>&1; then
+ echo "However, you might get some warnings that look like this:"
+ $cat .out
+ fi
+ else
+echo "Hmm, your compiler has some difficulty with void. Checking further..." >&4
+ if $cc -c -DTRY=1 try.c >/dev/null 2>&1 ; then
+ echo "It supports 1..."
+ if $cc -c -DTRY=3 try.c >/dev/null 2>&1 ; then
+ echo "It also supports 2..."
+ if $cc -c -DTRY=7 try.c >/dev/null 2>&1 ; then
+ voidflags=7
+ echo "And it supports 4 but not 8 definitely."
+ else
+ echo "It doesn't support 4..."
+ if $cc -c -DTRY=11 try.c >/dev/null 2>&1 ; then
+ voidflags=11
+ echo "But it supports 8."
+ else
+ voidflags=3
+ echo "Neither does it support 8."
+ fi
+ fi
+ else
+ echo "It does not support 2..."
+ if $cc -c -DTRY=13 try.c >/dev/null 2>&1 ; then
+ voidflags=13
+ echo "But it supports 4 and 8."
+ else
+ if $cc -c -DTRY=5 try.c >/dev/null 2>&1 ; then
+ voidflags=5
+ echo "And it supports 4 but has not heard about 8."
+ else
+ echo "However it supports 8 but not 4."
+ fi
+ fi
+ fi
+ else
+ echo "There is no support at all for void."
+ voidflags=0
+ fi
+ fi
+esac
+dflt="$voidflags";
+rp="Your void support flags add up to what?"
+. ./myread
+voidflags="$ans"
+$rm -f try.* .out
+
diff --git a/U/yacc.U b/U/yacc.U
new file mode 100644
index 0000000000..0b777a780f
--- /dev/null
+++ b/U/yacc.U
@@ -0,0 +1,91 @@
+?X: These units are based on the ones supplied with dist-3.0
+?X: patchlevel 22. They have been changed or enhanced to work with
+?X: perl5alpha. I would appreciate hearing about any changes,
+?X: corrections, or enhancements.
+?X: Andy Dougherty doughera@lafcol.lafayette.edu
+?X: Dept. of Physics
+?X: Lafayette College
+?X: Easton, PA 18042-1782
+?X: Sat Apr 2 15:45:17 EST 1994
+?RCS: $Id: yacc.U,v 3.0 1993/08/18 12:10:03 ram Exp $
+?RCS:
+?RCS: Copyright (c) 1991-1993, Raphael Manfredi
+?RCS:
+?RCS: You may redistribute only under the terms of the Artistic Licence,
+?RCS: as specified in the README file that comes with the distribution.
+?RCS: You may reuse parts of this distribution only within the terms of
+?RCS: that same Artistic Licence; a copy of which may be found at the root
+?RCS: of the source tree for dist 3.0.
+?RCS:
+?RCS: $Log: yacc.U,v $
+?RCS: Revision 3.0 1993/08/18 12:10:03 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test
+?MAKE: -pick add $@ %<
+?S:yacc:
+?S: This variable holds the name of the compiler compiler we
+?S: want to use in the Makefile. It can be yacc, byacc, or bison -y.
+?S:.
+?S:yaccflags:
+?S: This variable contains any additional yacc flags desired by the
+?S: user. It is up to the Makefile to use this.
+?S:.
+: determine compiler compiler
+case "$yacc" in
+'')
+ dflt=yacc;;
+*)
+ dflt="$yacc";;
+esac
+echo " "
+rp="yacc"
+if $test -f "$byacc"; then
+ dflt="$byacc"
+ rp="byacc or $rp"
+fi
+if $test -f "$bison"; then
+ rp="$rp or bison -y"
+fi
+$cat <<EOM
+$package no longer requires a compiler compiler, so the following is
+optional.
+EOM
+rp="Which compiler compiler ($rp) shall I use?"
+. ./myread
+yacc="$ans"
+case "$yacc" in
+*bis*)
+ case "$yacc" in
+ *-y*) ;;
+ *)
+ yacc="$yacc -y"
+ echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
+ ;;
+ esac
+ ;;
+esac
+
+@if yaccflags
+: see if we need extra yacc flags
+dflt="$yaccflags"
+case "$dflt" in
+'') dflt=none;;
+esac
+$cat <<EOH
+
+Your yacc program may need extra flags to normally process the parser sources.
+Do NOT specify any -d or -v flags here, since those are explicitely known
+by the various Makefiles. However, if your machine has strange/undocumented
+options (like -Sr# on SCO to specify the maximum number of grammar rules), then
+please add them here. To use no flags, specify the word "none".
+
+EOH
+rp="Any additional yacc flags?"
+. ./myread
+case "$ans" in
+none) yaccflags='';;
+*) yaccflags="$ans";;
+esac
+
+@end