summaryrefslogtreecommitdiff
path: root/U
diff options
context:
space:
mode:
Diffstat (limited to 'U')
-rw-r--r--U/Extensions.U53
-rw-r--r--U/Guess.U153
-rw-r--r--U/Loc.U20
-rw-r--r--U/Oldconfig.U223
-rw-r--r--U/alignbytes.U57
-rw-r--r--U/cc.U14
-rw-r--r--U/ccflags.U29
-rw-r--r--U/d_casti32.U15
-rw-r--r--U/d_htonl.U76
-rw-r--r--U/d_isascii.U11
-rw-r--r--U/d_readdir.U70
-rw-r--r--U/d_safebcpy.U81
-rw-r--r--U/d_safemcpy.U82
-rw-r--r--U/d_setlocale.U9
-rw-r--r--U/d_shmat.U54
-rw-r--r--U/d_strerror.U9
-rw-r--r--U/d_vfork.U56
-rw-r--r--U/dlsrc.U224
-rw-r--r--U/gidtype.U18
-rw-r--r--U/groupstype.U19
-rw-r--r--U/i_dlfcn.U10
-rw-r--r--U/i_net_errno.U50
-rw-r--r--U/i_pwd.U134
-rw-r--r--U/i_sdbm.U37
-rw-r--r--U/i_sgtty.U128
-rw-r--r--U/i_termio.U117
-rw-r--r--U/i_termios.U64
-rw-r--r--U/i_vfork.U34
-rw-r--r--U/libc.U9
-rw-r--r--U/libpth.U11
-rw-r--r--U/libs.U33
-rw-r--r--U/libyacc.U9
-rw-r--r--U/lns.U21
-rw-r--r--U/loc_sed.U10
-rw-r--r--U/mallocsrc.U35
-rw-r--r--U/prototype.U9
-rw-r--r--U/sig_name.U86
-rw-r--r--U/voidflags.U17
-rw-r--r--U/yacc.U14
39 files changed, 1775 insertions, 326 deletions
diff --git a/U/Extensions.U b/U/Extensions.U
index 3e10a38f31..ec14205ac1 100644
--- a/U/Extensions.U
+++ b/U/Extensions.U
@@ -1,12 +1,3 @@
-?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,
@@ -17,31 +8,63 @@
?RCS:
?RCS: $Log: Extensions.U,v $
?RCS:
-?MAKE:extensions : find package
+?MAKE:extensions : find Myread i_dbm i_ndbm i_gdbm i_sdbm
?MAKE: -pick add $@ %<
?S:extensions:
?S: This variable holds a list of extension files we want to
?S: include in perl.
?S:.
+?T:xxx
?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`"
+ extensions=`$find ext -type f -name \*.xs -print`
+ set X $extensions
+ shift
+ extensions="$*"
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'
+ *) extensions='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" ;;
+none) extensions='' ;;
+*) ;;
esac
+: Now see which are supported on this system.
+dflt=""
+for xxx in $extensions ; do
+ case "$xxx" in
+ *ODBM*) case "$i_dbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *NDBM*) case "$i_ndbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *GDBM*) case "$i_gdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *SDBM*) case "$i_sdbm" in
+ define) dflt="$dflt $xxx" ;;
+ *) ;;
+ esac
+ ;;
+ *) dflt="$dflt $xxx"
+ ;;
+ esac
+done
+
rp="What extensions do you wish to include?"
. ./myread
extensions="$ans"
diff --git a/U/Guess.U b/U/Guess.U
new file mode 100644
index 0000000000..c7566db87b
--- /dev/null
+++ b/U/Guess.U
@@ -0,0 +1,153 @@
+?RCS: $Id: Guess.U,v 3.0.1.3 1993/12/15 08:14:35 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: Guess.U,v $
+?RCS: Revision 3.0.1.3 1993/12/15 08:14:35 ram
+?RCS: patch15: variable d_bsd was not always set properly
+?RCS:
+?RCS: Revision 3.0.1.2 1993/08/30 08:57:14 ram
+?RCS: patch8: fixed comment which wrongly attributed the usrinc symbol
+?RCS: patch8: no more ugly messages when no /usr/include/ctype.h
+?RCS:
+?RCS: Revision 3.0.1.1 1993/08/27 14:37:37 ram
+?RCS: patch7: added support for OSF/1 machines
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:04:57 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit hazards some guesses as to what the general nature of the system
+?X: is. The information it collects here is used primarily to establish default
+?X: answers to other questions.
+?X:
+?MAKE:Guess d_eunice d_xenix: cat test echo n c contains rm Loc eunicefix
+?MAKE: -pick add $@ %<
+?S:d_eunice:
+?S: This variable conditionally defines the symbols EUNICE and VAX, which
+?S: alerts the C program that it must deal with ideosyncracies of VMS.
+?S:.
+?S:d_xenix:
+?S: This variable conditionally defines the symbol XENIX, which alerts
+?S: the C program that it runs under Xenix.
+?S:.
+?X:We don't use BSD in the source. It's too vague, and often defined
+?X:in header files anyway (e.g. NetBSD).
+?X:?S:d_bsd:
+?X:?S: This symbol conditionally defines the symbol BSD when running on a
+?X:?S: BSD system.
+?X:?S:.
+?C:EUNICE:
+?C: This symbol, if defined, indicates that the program is being compiled
+?C: under the EUNICE package under VMS. The program will need to handle
+?C: things like files that don't go away the first time you unlink them,
+?C: due to version numbering. It will also need to compensate for lack
+?C: of a respectable link() command.
+?C:.
+?C:VMS:
+?C: This symbol, if defined, indicates that the program is running under
+?C: VMS. It is currently only set in conjunction with the EUNICE symbol.
+?C:.
+?C:XENIX:
+?C: This symbol, if defined, indicates thet the program is running under
+?C: Xenix (at least 3.0 ?).
+?C:.
+?X:We don't use BSD in the source. It's too vague.
+?X:?C:BSD:
+?X:?C: This symbol, if defined, indicates that the program is running under
+?X:?C: a BSD system.
+?X:?C:.
+?H:#$d_eunice EUNICE /**/
+?H:#$d_eunice VMS /**/
+?H:#$d_xenix XENIX /**/
+?X:?H:#$d_bsd BSD /**/
+?H:.
+?T:xxx
+: make some quick guesses about what we are up against
+echo " "
+$echo $n "Hmm... $c"
+echo exit 1 >bsd
+echo exit 1 >usg
+echo exit 1 >v7
+echo exit 1 >osf1
+echo exit 1 >eunice
+echo exit 1 >xenix
+echo exit 1 >venix
+?X:
+?X: Do not use 'usrinc', or we get a circular dependency. because
+?X: usrinc is defined in usrinc.U, which relies on us...
+?X:
+$cat /usr/include/signal.h /usr/include/sys/signal.h >foo 2>/dev/null
+if test -f /osf_boot || $contains 'OSF/1' /usr/include/ctype.h >/dev/null 2>&1
+then
+ echo "Looks kind of like an OSF/1 system, but we'll see..."
+ echo exit 0 >osf1
+elif test `echo abc | tr a-z A-Z` = Abc ; then
+ xxx=`./loc addbib blurfl $pth`
+ if $test -f $xxx; then
+ echo "Looks kind of like a USG system with BSD features, but we'll see..."
+ echo exit 0 >bsd
+ echo exit 0 >usg
+ else
+ if $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like an extended USG system, but we'll see..."
+ else
+ echo "Looks kind of like a USG system, but we'll see..."
+ fi
+ echo exit 0 >usg
+ fi
+elif $contains SIGTSTP foo >/dev/null 2>&1 ; then
+ echo "Looks kind of like a BSD system, but we'll see..."
+ echo exit 0 >bsd
+else
+ echo "Looks kind of like a Version 7 system, but we'll see..."
+ echo exit 0 >v7
+fi
+case "$eunicefix" in
+*unixtovms*)
+ $cat <<'EOI'
+There is, however, a strange, musty smell in the air that reminds me of
+something...hmm...yes...I've got it...there's a VMS nearby, or I'm a Blit.
+EOI
+ echo exit 0 >eunice
+ d_eunice="$define"
+: it so happens the Eunice I know will not run shell scripts in Unix format
+ ;;
+*)
+ echo " "
+ echo "Congratulations. You aren't running Eunice."
+ d_eunice="$undef"
+ ;;
+esac
+if test -f /xenix; then
+ echo "Actually, this looks more like a XENIX system..."
+ echo exit 0 >xenix
+ d_xenix="$define"
+else
+ echo " "
+ echo "It's not Xenix..."
+ d_xenix="$undef"
+fi
+chmod +x xenix
+$eunicefix xenix
+if test -f /venix; then
+ echo "Actually, this looks more like a VENIX system..."
+ echo exit 0 >venix
+else
+ echo " "
+ if xenix; then
+ : null
+ else
+ echo "Nor is it Venix..."
+ fi
+fi
+chmod +x bsd usg v7 osf1 eunice xenix venix
+$eunicefix bsd usg v7 osf1 eunice xenix venix
+$rm -f foo
+
diff --git a/U/Loc.U b/U/Loc.U
index 79096ef45f..fcb7a64403 100644
--- a/U/Loc.U
+++ b/U/Loc.U
@@ -1,12 +1,3 @@
-?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
@@ -165,11 +156,12 @@ trylist="
?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
+?LINT:set 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
pth=`echo $PATH | sed -e 's/:/ /g'`
pth="$pth /lib /usr/lib"
for file in $loclist; do
diff --git a/U/Oldconfig.U b/U/Oldconfig.U
index 18c2a811b0..2b6d3a0157 100644
--- a/U/Oldconfig.U
+++ b/U/Oldconfig.U
@@ -1,12 +1,3 @@
-?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
@@ -34,8 +25,8 @@
?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:Oldconfig hint myuname osname osvers: 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,
@@ -46,7 +37,18 @@
?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 _
+?S:osname:
+?S: This variable contains the operating system name (e.g. sunos,
+?S: solaris, hpux, etc.). It can be useful later on for setting
+?S: defaults. It is set to '' if we can't figure it out.
+?S:.
+?S:osvers:
+?S: This variable contains the operating system version (e.g.
+?S: 4.1.3, 5.2, etc.). It is primarily used for helping select
+?S: an appropriate hints file, but might be useful elsewhere for
+?S: setting defaults. It is set to '' if we can't figure it out.
+?S:.
+?T:tmp file oldmyuname hintfile tans _
?LINT:change n c
: Try to determine whether config.sh was made on this system
case "$config_sh" in
@@ -112,13 +114,13 @@ EOM
: 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"
+ $test -f /irix && osname=sgi
+ $test -f /xenix && osname=sco_xenix
+ $test -f /dynix && osname=dynix
+ $test -f /dnix && osname=dnix
+ $test -f /bin/mips && /bin/mips && osname=mips
+ $test -d /NextApps && test -f /usr/adm/software_version && osname=next
+ $test -d /usr/include/minix && osname=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
@@ -128,63 +130,80 @@ EOM
$test -f $5.sh && dflt="$dflt $5"
case "$5" in
- fps*) dflt="$dflt fps";;
+ fps*) osname=fps ;;
mips*)
case "$4" in
- umips) dflt="$dflt umips";;
- *) dflt="$dflt mips";;
+ umips) osname=umips ;;
+ *) osname=mips ;;
esac;;
- [23]100) dflt="$dflt mips";;
- next*) dflt="$dflt next" ;;
- news*) dflt="$dflt news" ;;
+ [23]100) osname=mips ;;
+ next*) osname=next ;;
+ news*) osname=news ;;
i386*) if $test -f /etc/kconfig; then
+ osname=isc
if $contains _SYSV3 /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_3"
+ osvers=3.2.3
elif $contains _POSIX_SOURCE /usr/include/stdio.h > /dev/null 2>&1 ; then
- dflt="$dflt isc_3_2_2"
+ osvers=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" ;;
+ aix) osname=aix_rs ;;
+ sunos) osname=sunos
+ case "$3" in
+ [34]*) osvers=$3 ;;
+ 5*) osname=solaris
+ osvers=`echo $3 | $sed 's/^5/2/g'` ;;
+ esac
+ ;;
+ solaris) osname=solaris
+ case "$3" in
+ 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;;
esac
;;
- [sS]olaris) case "$3" in
- 5*) vers=`echo $3 | $sed 's/^5/2/g'`
- dflt="$dflt solaris_$vers" ;;
+ dnix) osname=dnix ;;
+ dgux) osname=dgux ;;
+ genix) osname=genix ;;
+ hp*ux) osname=hpux ;;
+ next) osname=next ;;
+ irix) osname=sgi ;;
+ ultrix) osname=ultrix
+ case "$3" in
+ 1*) osvers=1 ;;
+ 2*) osvers=2 ;;
+ 3*) osvers=3 ;;
+ 4*) osvers=4 ;;
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" ;;
+ osf1) case "$5" in
+ alpha) osname=dec_osf
+ case "$3" in
+ [vt]1\.*) osvers=1 ;;
+ [vt]2\.*) osvers=2 ;;
+ [vt]3\.*) osvers=3 ;;
+ esac
+ ;;
+ hp*) osname=hp_osf1 ;; # TR
+ mips) osname=mips_osf1 ;; # TR
+ # TR = Technology Releases: (un^N)supported
esac
;;
- uts) dflt="$dflt uts" ;;
- $2) case "$dflt" in
+ uts) osname=uts ;;
+ $2) case "$osname" in
*isc*) ;;
*) if test -f /etc/systemid; then
+ osname=sco
+ : Does anyone know if these next gyrations are needed
set `echo $3 | $sed 's/\./ /g'` $4
if $test -f sco_$1_$2_$3.sh; then
- dflt="$dflt sco_$1_$2_$3"
+ osvers=$1.$2.$3
elif $test -f sco_$1_$2.sh; then
- dflt="$dflt sco_$1_$2"
+ osvers=$1.$2
elif $test -f sco_$1.sh; then
- dflt="$dflt sco_$1"
+ osvers=$1
fi
fi
;;
@@ -196,25 +215,31 @@ EOM
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"
+ osname=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;;
+
+ : Now look for a hint file osname_osvers
+ file=`echo "${osname}_${osvers}" | sed -e 's@\.@_@g' -e 's@_$@@'`
+ case "$file" in
+ '') dflt=none ;;
+ *) case "$osvers" in
+ '') dflt=$file
+ ;;
+ *) if $test -f $file.sh ; then
+ dflt=$file
+ elif $test -f "${osname}.sh" ; then
+ dflt="${osname}"
+ else
+ dflt=none
+ fi
+ ;;
+ esac
+ ;;
esac
+
$cat <<EOM
You may give one or more space-separated answers, or "none" if appropriate.
@@ -223,17 +248,40 @@ 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
+ tans=$ans
+ for file in $tans; 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
+ elif $test X$tans = X -o X$tans = Xnone ; then
: nothing
else
- echo "$file.sh does not exist -- ignored"
+ : Give one chance to correct a possible typo.
+ echo "$file.sh does not exist"
+ dflt=$file
+ rp="hint to use instead?"
+ . ../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
fi
done
+
hint=recommended
+ : Remember our hint file for later.
+ if $test -f "$file.sh" ; then
+ hintfile="$file.sh"
+ else
+ hintfile=none
+ fi
+
cd ..
fi
cd UU
@@ -282,3 +330,40 @@ for file in $loclist $trylist; do
eval $file="\$_$file"
done
+cat << EOM
+Configure uses the operating system name and version to set some defaults.
+Say "none" to leave it blank.
+EOM
+
+case "$osname" in
+ ''|' ')
+ case "$hintfile" in
+ none) dflt=none ;;
+ *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/_.*$//'` ;;
+ esac
+ ;;
+ *) dflt="$osname" ;;
+esac
+rp="Operating system name?"
+. ./myread
+case "$ans" in
+ none) osname='' ;;
+ *) osname="$ans" ;;
+esac
+
+case "$osvers" in
+ ''|' ')
+ case "$hintfile" in
+ none) dflt=none ;;
+ *) dflt=`echo $hintfile | sed -e 's/\.sh$//' -e 's/^[^_]*//'`
+ dflt=`echo $dflt | sed -e 's/^_//' -e 's/_/./g'` ;;
+ esac
+ ;;
+ *) dflt="$osvers" ;;
+esac
+rp="Operating system version?"
+. ./myread
+case "$ans" in
+ none) osvers='' ;;
+ *) osvers="$ans" ;;
+esac
diff --git a/U/alignbytes.U b/U/alignbytes.U
new file mode 100644
index 0000000000..38526465a0
--- /dev/null
+++ b/U/alignbytes.U
@@ -0,0 +1,57 @@
+?RCS: $Id: alignbytes.U,v 3.0 1993/08/18 12:05:23 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: alignbytes.U,v $
+?RCS: Revision 3.0 1993/08/18 12:05:23 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:memalignbytes: Myread cat cc ccflags rm
+?MAKE: -pick add $@ %<
+?S:memalignbytes:
+?S: This variable holds the number of bytes required to align a
+?S: double. Usual values are 2, 4 and 8.
+?S:.
+?X: This used to be called ALIGNBYTES, but that conflicts with
+?X: <machines/param.h> in NetBSD.
+?C:MEM_ALIGNBYTES (ALIGNBYTES):
+?C: This symbol contains the number of bytes required to align a
+?C: double. Usual values are 2, 4 and 8.
+?C:.
+?H:#define MEM_ALIGNBYTES $memalignbytes /**/
+?H:.
+: check for alignment requirements
+echo " "
+case "$memalignbytes" in
+'') echo "Checking alignment constraints..." >&4
+ $cat >try.c <<'EOCP'
+struct foobar {
+ char foo;
+ double bar;
+} try;
+main()
+{
+ printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+}
+EOCP
+ if $cc $ccflags try.c -o try >/dev/null 2>&1; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo"(I can't seem to compile the test program...)"
+ fi
+ ;;
+*) dflt="$memalignbytes"
+ ;;
+esac
+rp="Doubles must be aligned on a how-many-byte boundary?"
+. ./myread
+memalignbytes="$ans"
+$rm -f try.c try
+
diff --git a/U/cc.U b/U/cc.U
index 63a621b03b..04950176c0 100644
--- a/U/cc.U
+++ b/U/cc.U
@@ -1,12 +1,3 @@
-?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
@@ -21,7 +12,7 @@
?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 \
+?MAKE:gccversion cc: cat contains sysman +large cpp rm test \
Mcc Myread Guess Oldconfig Loc
?MAKE: -pick add $@ %<
?S:cc:
@@ -33,6 +24,7 @@
?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.
+?S:.
?D:cc='cc'
?INIT:gccversion=''
?LINT:change cpp
@@ -105,7 +97,7 @@ return 1;
#endif
}
EOM
- if $cc -o gccvers $ccflags gccvers.c >/dev/null 2>&1; then
+ if $cc -o gccvers gccvers.c >/dev/null 2>&1; then
gccversion=`./gccvers`
echo "You appear to have version $gccversion."
else
diff --git a/U/ccflags.U b/U/ccflags.U
index e9e33042e2..1b9bf39829 100644
--- a/U/ccflags.U
+++ b/U/ccflags.U
@@ -1,12 +1,3 @@
-?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
@@ -83,12 +74,12 @@ case "$optimize" in
'none') optimize=" ";;
esac
+dflt=''
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";;
@@ -103,7 +94,6 @@ case "$ccflags" in
;;
esac
;;
-*) dflt="$ccflags" ;;
esac
?X: In USG mode, a MIPS system may need some BSD includes
@@ -153,6 +143,10 @@ set signal.h _NO_PROTO; eval $inctest
case "$dflt" in
'') dflt=none;;
esac
+case "$ccflags" in
+'') ;;
+*) dflt="$ccflags";;
+esac
$cat <<EOH
Your C compiler may want other flags. For this question you should include
@@ -161,8 +155,8 @@ 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.
+Your C compiler might also need additional flags, such as -DJMPCLOBBER,
+-DHIDEMYMALLOC or -DCRIPPLED_CC.
EOH
?X: strip leading space
set X $dflt
@@ -178,9 +172,10 @@ 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 ;;
+*gcc*) case "$gccversion" in
+ 1) cppflags="$cppflags -D__GNUC__" ;;
+ esac
+ ;;
esac
case "$mips_type" in
'');;
@@ -193,7 +188,7 @@ case "$cppflags" in
for flag
do
case $flag in
- -D*|-I*|-traditional|-ansi|-nostdinc) cppflags="$cppflags $flag";;
+ -D*|-I*|-traditional|-ansi|-nostdinc|-posix|-Xp) cppflags="$cppflags $flag";;
esac
done
case "$cppflags" in
diff --git a/U/d_casti32.U b/U/d_casti32.U
index efcfd07a3a..f33b5f811f 100644
--- a/U/d_casti32.U
+++ b/U/d_casti32.U
@@ -1,12 +1,3 @@
-?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
@@ -24,7 +15,7 @@
?X:
?X: Can the compiler cast large floats to 32-bit integers?
?X:
-?MAKE:d_casti32: cat cc ccflags rm intsize Setvar
+?MAKE:d_casti32: cat cc ccflags rm intsize Setvar test
?MAKE: -pick add $@ %<
?S:d_casti32:
?S: This variable conditionally defines CASTI32, which indicates
@@ -41,7 +32,7 @@
: 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
+if $test "$intsize" -eq 4; then
xxx=int
else
xxx=long
@@ -83,4 +74,4 @@ case "$yyy" in
esac
set d_casti32
eval $setvar
-$rm -f try.*
+$rm -f try try.*
diff --git a/U/d_htonl.U b/U/d_htonl.U
new file mode 100644
index 0000000000..0cb16479d4
--- /dev/null
+++ b/U/d_htonl.U
@@ -0,0 +1,76 @@
+?RCS: $Id: d_htonl.U,v 3.0 1993/08/18 12:06:22 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_htonl.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:22 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_htonl: cc ccflags Inlibc i_niin i_sysin rm
+?MAKE: -pick add $@ %<
+?S:d_htonl:
+?S: This variable conditionally defines HAS_HTONL if htonl() and its
+?S: friends are available to do network order byte swapping.
+?S:.
+?C:HAS_HTONL (HTONL):
+?C: This symbol, if defined, indicates that the htonl() routine (and
+?C: friends htons() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_HTONS (HTONS):
+?C: This symbol, if defined, indicates that the htons() routine (and
+?C: friends htonl() ntohl() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHL (NTOHL):
+?C: This symbol, if defined, indicates that the ntohl() routine (and
+?C: friends htonl() htons() ntohs()) are available to do network
+?C: order byte swapping.
+?C:.
+?C:HAS_NTOHS (NTOHS):
+?C: This symbol, if defined, indicates that the ntohs() routine (and
+?C: friends htonl() htons() ntohl()) are available to do network
+?C: order byte swapping.
+?C:.
+?H:#$d_htonl HAS_HTONL /**/
+?H:#$d_htonl HAS_HTONS /**/
+?H:#$d_htonl HAS_NTOHL /**/
+?H:#$d_htonl HAS_NTOHS /**/
+?H:.
+?LINT:set d_htonl
+: see if htonl --and friends-- exists
+set htonl d_htonl
+eval $inlibc
+: Maybe they are macros.
+case "$d_htonl" in
+'define') ;;
+*) cat > try.c <<EOM
+#include <stdio.h>
+#include <sys/types.h>
+#$i_niin I_NETINET_IN
+#$i_sysin I_SYS_IN
+#ifdef I_NETINET_IN
+# include <netinet/in.h>
+#endif
+#ifdef I_SYS_IN
+# include <sys/in.h>
+#endif
+int main()
+{
+ int x;
+ printf("x = ", htonl(7));
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ d_htonl="$define"
+ echo "But it seems to be defined as a macro."
+ fi
+ $rm -f try.* try
+ ;;
+esac
diff --git a/U/d_isascii.U b/U/d_isascii.U
index 6a461c39dc..70fba1998a 100644
--- a/U/d_isascii.U
+++ b/U/d_isascii.U
@@ -1,12 +1,3 @@
-?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
@@ -21,7 +12,7 @@
?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:d_isascii: cc cat cppflags rm Setvar Findhdr
?MAKE: -pick add $@ %<
?S:d_isascii:
?S: This variable conditionally defines the HAS_ISASCII manifest constant,
diff --git a/U/d_readdir.U b/U/d_readdir.U
new file mode 100644
index 0000000000..e9364b4121
--- /dev/null
+++ b/U/d_readdir.U
@@ -0,0 +1,70 @@
+?RCS: $Id: d_readdir.U,v 3.0 1993/08/18 12:06:52 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_readdir.U,v $
+?RCS: Revision 3.0 1993/08/18 12:06:52 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X: Force checking for <dirent.h> inclusion
+?X:INC: i_dirent
+?MAKE:d_readdir d_seekdir d_telldir d_rewinddir: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_readdir:
+?S: This variable conditionally defines HAS_READDIR if readdir() is
+?S: available to read directory entries.
+?S:.
+?C:HAS_READDIR (READDIR):
+?C: This symbol, if defined, indicates that the readdir routine is
+?C: available to read directory entries. You may have to include
+?C: <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_readdir HAS_READDIR /**/
+?H:.
+?S:d_seekdir:
+?S: This variable conditionally defines HAS_SEEKDIR if seekdir() is
+?S: available.
+?S:.
+?C:HAS_SEEKDIR:
+?C: This symbol, if defined, indicates that the seekdir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_seekdir HAS_SEEKDIR /**/
+?H:.
+?S:d_telldir:
+?S: This variable conditionally defines HAS_TELLDIR if telldir() is
+?S: available.
+?S:.
+?C:HAS_TELLDIR:
+?C: This symbol, if defined, indicates that the telldir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_telldir HAS_TELLDIR /**/
+?H:.
+?S:d_rewinddir:
+?S: This variable conditionally defines HAS_REWINDDIR if rewinddir() is
+?S: available.
+?S:.
+?C:HAS_REWINDDIR:
+?C: This symbol, if defined, indicates that the rewinddir routine is
+?C: available. You may have to include <dirent.h>. See I_DIRENT.
+?C:.
+?H:#$d_rewinddir HAS_REWINDDIR /**/
+?H:.
+?LINT:set d_readdir d_seekdir d_telldir d_rewinddir
+: see if readdir and friends exist
+set readdir d_readdir
+eval $inlibc
+set seekdir d_seekdir
+eval $inlibc
+set telldir d_telldir
+eval $inlibc
+set rewinddir d_rewinddir
+eval $inlibc
+
diff --git a/U/d_safebcpy.U b/U/d_safebcpy.U
new file mode 100644
index 0000000000..b7373a0791
--- /dev/null
+++ b/U/d_safebcpy.U
@@ -0,0 +1,81 @@
+?RCS: $Id: d_safebcpy.U,v 3.0 1993/08/18 12:06:58 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_safebcpy.U,v $
+?RCS:
+?RCS: Copy "abcde..." string to char abc[] so that gcc doesn't
+?RCS: try to store the string in read-only memory.
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_safebcpy: cat d_bcopy +cc +ccflags +libs rm Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_safebcpy:
+?S: This variable conditionally defines the HAS_SAFE_BCOPY symbol if
+?S: the bcopy() routine can do overlapping copies.
+?S:.
+?C:HAS_SAFE_BCOPY (SAFE_BCOPY):
+?C: This symbol, if defined, indicates that the bcopy routine is available
+?C: to copy potentially overlapping memory blocks. Otherwise you should
+?C: probably use memmove() or memcpy(). If neither is defined, roll your
+?C: own version.
+?C:.
+?H:#$d_safebcpy HAS_SAFE_BCOPY /**/
+?H:.
+?LINT: set d_safebcpy
+: can bcopy handle overlapping blocks?
+?X: assume the worst
+val="$undef"
+case "$d_bcopy" in
+"$define")
+ echo " "
+ echo "Checking to see if your bcopy() can do overlapping copies..." >&4
+ $cat >foo.c <<'EOCP'
+main()
+{
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
+
+for (align = 7; align >= 0; align--) {
+ for (len = 36; len; len--) {
+ b = buf+align;
+ bcopy(abc, b, len);
+ for (off = 1; off <= len; off++) {
+ bcopy(b, b+off, len);
+ bcopy(b+off, b, len);
+ if (bcmp(b, abc, len))
+ exit(1);
+ }
+ }
+}
+exit(0);
+}
+EOCP
+ if $cc foo.c -o safebcpy $ccflags $libs >/dev/null 2>&1 ; then
+ if ./safebcpy 2>/dev/null; then
+ echo "Yes, it can."
+ val="$define"
+ else
+ echo "It can't, sorry."
+ fi
+ else
+ echo "(I can't compile the test program, so we'll assume not...)"
+ fi
+ ;;
+esac
+$rm -f foo.* safebcpy core
+set d_safebcpy
+eval $setvar
+
diff --git a/U/d_safemcpy.U b/U/d_safemcpy.U
new file mode 100644
index 0000000000..2f32680709
--- /dev/null
+++ b/U/d_safemcpy.U
@@ -0,0 +1,82 @@
+?RCS: $Id: d_safemcpy.U,v 3.0 1993/08/18 12:06:58 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_safemcpy.U,v $
+?RCS:
+?RCS: Copy "abcde..." string to char abc[] so that
+?RCS: gcc doesn't try to store the string in read-only memory.
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:06:58 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_safemcpy: cat d_memcpy +cc +ccflags +libs rm Oldconfig Setvar
+?MAKE: -pick add $@ %<
+?S:d_safemcpy:
+?S: This variable conditionally defines the HAS_SAFE_MEMCPY symbol if
+?S: the memcpy() routine can do overlapping copies.
+?S:.
+?C:HAS_SAFE_MEMCPY (SAFE_MEMCPY):
+?C: This symbol, if defined, indicates that the memcpy routine is available
+?C: to copy potentially overlapping memory blocks. Otherwise you should
+?C: probably use memmove() or memcpy(). If neither is defined, roll your
+?C: own version.
+?C:.
+?H:#$d_safemcpy HAS_SAFE_MEMCPY /**/
+?H:.
+?LINT: set d_safemcpy
+: can memcpy handle overlapping blocks?
+?X: assume the worst
+val="$undef"
+case "$d_memcpy" in
+"$define")
+ echo " "
+ echo "Checking to see if your memcpy() can do overlapping copies..." >&4
+ $cat >foo.c <<'EOCP'
+main()
+{
+char buf[128], abc[128];
+char *b;
+int len;
+int off;
+int align;
+
+memcpy(abc, "abcdefghijklmnopqrstuvwxyz0123456789", 36);
+
+for (align = 7; align >= 0; align--) {
+ for (len = 36; len; len--) {
+ b = buf+align;
+ memcpy(abc, b, len);
+ for (off = 1; off <= len; off++) {
+ memcpy(b, b+off, len);
+ memcpy(b+off, b, len);
+ if (memcmp(b, abc, len))
+ exit(1);
+ }
+ }
+}
+exit(0);
+}
+EOCP
+ if $cc foo.c -o safemcpy $ccflags $libs >/dev/null 2>&1 ; then
+ if ./safemcpy 2>/dev/null; then
+ echo "Yes, it can."
+ val="$define"
+ else
+ echo "It can't, sorry."
+ fi
+ else
+ echo "(I can't compile the test program, so we'll assume not...)"
+ fi
+ ;;
+esac
+$rm -f foo.* safemcpy core
+set d_safemcpy
+eval $setvar
+
diff --git a/U/d_setlocale.U b/U/d_setlocale.U
index 81b2d611fe..14ce63890e 100644
--- a/U/d_setlocale.U
+++ b/U/d_setlocale.U
@@ -1,12 +1,3 @@
-?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
diff --git a/U/d_shmat.U b/U/d_shmat.U
new file mode 100644
index 0000000000..e3f8097a0d
--- /dev/null
+++ b/U/d_shmat.U
@@ -0,0 +1,54 @@
+?RCS: $Id: d_shmat.U,v 3.0 1993/08/18 12:07:18 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_shmat.U,v $
+?RCS: Revision 3.0 1993/08/18 12:07:18 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_shmat d_voidshmat: Inlibc cppstdin cppflags cppminus usrinc \
+ contains
+?MAKE: -pick add $@ %<
+?S:d_shmat:
+?S: This variable conditionally defines the HAS_SHMAT symbol, which
+?S: indicates to the C program that the shmat() routine is available.
+?S:.
+?S:d_voidshmat:
+?S: This symbol, if defined, indicates that the shmat() routine
+?S: returns a pointer of type void*. Otherwise, char* is assumed.
+?S:.
+?C:HAS_SHMAT:
+?C: This symbol, if defined, indicates that the shmat() routine is
+?C: available to attach a shared memory segment to the process space.
+?C:.
+?H:#$d_shmat HAS_SHMAT /**/
+?H:.
+?C:VOIDSHMAT:
+?C: This symbol, if defined, indicates that the shmat() routine
+?C: returns a pointer of type void*. Otherwise, char* is assumed.
+?C:.
+?H:#$d_voidshmat VOIDSHMAT /**/
+?H:.
+?LINT:set d_shmat d_voidshmat
+: see if shmat exists
+set shmat d_shmat
+eval $inlibc
+: see what shmat returns
+d_voidshmat="$undef"
+case "$d_shmat" in
+define)
+ $cppstdin $cppflags $cppminus < $usrinc/sys/shm.h >voidshmat.txt 2>/dev/null
+ if $contains "void.*shmat" voidshmat.txt >/dev/null 2>&1; then
+ echo "and shmat returns (void*)"
+ d_voidshmat="$define"
+ else
+ echo "and shmat returns (char*)"
+ fi
+ ;;
+esac
diff --git a/U/d_strerror.U b/U/d_strerror.U
index 4a4a61849f..252d9df296 100644
--- a/U/d_strerror.U
+++ b/U/d_strerror.U
@@ -1,12 +1,3 @@
-?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
diff --git a/U/d_vfork.U b/U/d_vfork.U
new file mode 100644
index 0000000000..fb674340e2
--- /dev/null
+++ b/U/d_vfork.U
@@ -0,0 +1,56 @@
+?RCS: $Id: d_vfork.U,v 3.0.1.2 1993/10/16 13:49:39 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_vfork.U,v $
+?RCS: Revision 3.0.1.2 1993/10/16 13:49:39 ram
+?RCS: patch12: added magic for vfork()
+?RCS:
+?RCS: Revision 3.0.1.1 1993/09/13 16:06:57 ram
+?RCS: patch10: removed automatic remapping of vfork on fork (WAD)
+?RCS: patch10: added compatibility code for older config.sh (WAD)
+?RCS:
+?RCS: Revision 3.0 1993/08/18 12:07:55 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:d_vfork: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_vfork:
+?S: This variable conditionally defines the HAS_VFORK symbol, which
+?S: indicates the vfork() routine is available.
+?S:.
+?C:HAS_VFORK (VFORK):
+?C: This symbol, if defined, indicates that vfork() exists.
+?C:.
+?H:#$d_vfork HAS_VFORK /**/
+?H:.
+?M:vfork: HAS_VFORK
+?M:#ifndef HAS_VFORK
+?M:#define vfork fork
+?M:#endif
+?M:.
+?LINT:set d_vfork
+: see if there is a vfork
+set vfork d_vfork
+eval $inlibc
+: But do we want to use it. vfork is reportedly unreliable in
+: perl in Solaris 2.x, and probably elsewhere.
+case "$d_vfork" in
+define)
+ dflt='n'
+ rp="Some systems have problems with vork. Do you want to use it?"
+ . ./myread
+ case "$ans" in
+ y|Y) ;;
+ *) echo "Ok, we won't use vfork."
+ d_vfork="$undef"
+ ;;
+ esac
+ ;;
+esac
diff --git a/U/dlsrc.U b/U/dlsrc.U
index e67e1fdce0..616818d346 100644
--- a/U/dlsrc.U
+++ b/U/dlsrc.U
@@ -1,12 +1,3 @@
-?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,
@@ -17,50 +8,223 @@
?RCS:
?RCS: $Log: dlsrc.U,v $
?RCS:
-?MAKE:dlsrc dlobj usedl: Myread Oldconfig package \
- Guess test rm cat i_dlfcn cc ccflags Findhdr
+?X: hpux support thanks to Jeff Okamoto <okamoto@hpcc101.corp.hp.com>
+?X:
+?X: To create a shared library, you must compile ALL source files in the
+?X: library with +z (or possibly +Z if the library is whopping huge),
+?X: then link the library with -b. Example:
+?X: cc -c +z module_a.c
+?X: cc -c +z module_b.c
+?X: ld -b module_a.o module_b.o -o module.sl
+?X:
+?MAKE:usedl dlsrc dlobj dldir cccdlflags lddlflags ccdlflags \
+ shlibsuffix: Getfile Myread test osname sed i_dlfcn Findhdr cc
?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: 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: file that will be used with the package. This is used in Makefile.
+?S:.
+?S:dldir:
+?S: This variable contains the directory from which to fetch dlsrc.
+?S: It is up to the makefile to use it.
+?S:.
+?S:cccdlflags:
+?S: This variable contains any special flags that might need to be
+?S: passed with cc -c to compile modules to be used to create a shared
+?S: library that will be used for dynamic loading. For hpux, this
+?S: should be +z. It is up to the makefile to use it.
+?S:.
+?S:lddlflags:
+?S: This variable contains any special flags that might need to be
+?S: passed to ld to create a shared library suitable for dynamic
+?S: loading. It is up to the makefile to use it. For hpux, it
+?S: should be -b. For sunos 4.1, it is empty.
+?S:.
+?S:ccdlflags:
+?S: This variable contains any special flags that might need to be
+?S: passed to cc to link with a shared library for dynamic loading.
+?S: It is up to the makefile to use it. For sunos 4.1, it should
+?S: be empty.
?S:.
-?C:USE_DYNAMIC_LOADING~%<:
+?S:shlibsuffix:
+?S: Shared libraries are built by Makefile in the form
+?S: lib/auto/xxx/xxx${shsuffix}, where xxx is
+?S: the name of the library, e.g. /lib/auto/POSIX/POSIX.so
+?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:
+?INIT:: File to use for dynamic loading
+?INIT:usedl=''
+?T:xxx
+?X:
+?X: We select a default of 'define' for usedl if either dl_$osname.c
+?X: exists or if i_dlfcn is defined (which probably means dl_sunos.c
+?X: will work.)
+?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' ;;
+'') case "$i_dlfcn" in
+ define) dflt='y' ;;
+ *) dflt='n' ;;
+ esac
+ : Does a dl.c file exist for this operating system
+ $test -f ../ext/dl/dl_${osname}.c && dflt='y'
+ ;;
+define|y|true) 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='';;
+y*) usedl="$define"
+ if $test -f ../ext/dl/dl_${osname}.c ; then
+ dflt="ext/dl/dl_${osname}.c"
+ else
+ dflt='ext/dl/dl.c'
+ fi
+ echo "The following dynamic loading files are available:"
+ cd ..; ls -C ext/dl/dl*.c; cd UU
+ rp="Source file to use for dynamic loading"
+ fn="fne~"
+ . ./getfile
+ : emulate basename and dirname
+ xxx=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@' -e 's@\.c$@@'`
+ dlobj=$xxx.o
+ dlsrc=$xxx.c
+ dldir=`echo $ans | $sed 's@\(.*\)/[^/]*$@\1@'`
+ case "$dldir" in
+ '') dldir="." ;;
+ *) ;;
+ esac
+ if $test -f ../$dldir/$dlsrc; then
+ usedl="$define"
+ else
+ echo "File $dlsrc does not exist -- ignored"
+ usedl="$undef"
+ fi
+
+ cat << EOM
+
+Some systems may require passing special flags to $cc -c to
+compile modules that will be used to create a shared library.
+To use no flags, say "none".
+EOM
+ case "$cccdlflags" in
+ ''|' ') case "$osname" in
+ hpux) dflt='+z' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$cccdlflags" ;;
+ esac
+ rp="Any special flags to pass to $cc -c to compile shared library modules?"
+ . ./myread
+ case "$ans" in
+ none) cccdlflags='' ;;
+ *) cccdlflags="$ans" ;;
+ esac
+
+ cat << 'EOM'
+
+Some systems may require passing special flags to ld to
+create a shared library. To use no flags, say "none".
+EOM
+?X: I have received one report that NeXT requires -r here.
+?X: On SunOS 4.1.3, that makes the library no longer shared.
+ case "$lddlflags" in
+ ''|' ') case "$osname" in
+ hpux) dflt='-b' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$lddlflags" ;;
+ esac
+ rp="Any special flags to pass to ld to create a shared library?"
+ . ./myread
+ case "$ans" in
+ none) lddlflags='' ;;
+ *) lddlflags="$ans" ;;
+ esac
+
+ cat <<EOM
+
+Some systems may require passing special flags to $cc to indicate that
+dynamic linking will be used. To use no flags, say "none".
+EOM
+ case "$ccdlflags" in
+ ''|' ')
+ case "$osname" in
+ hpux) dflt='none' ;;
+ next) dflt='none' ;;
+ sunos) dflt='none' ;;
+ *) dflt='none' ;;
+ esac
+ ;;
+ *) dflt="$ccdlflags"
+ ;;
+ esac
+ rp="Any special flags to pass to $cc to use dynamic loading?"
+ . ./myread
+ case "$ans" in
+ none) ccdlflags='' ;;
+ *) ccdlflags="$ans" ;;
+ esac
+ cat <<EOM
+
+Some systems may require using a special suffix for shared libraries.
+To create the shared library for POSIX, for example, you may need to
+actually build the file POSIX.so.
+
+EOM
+ case "$shlibsuffix" in
+ '')
+ case "$osname" in
+ hpux) dflt='.sl' ;;
+ next) dflt='.so' ;;
+ sunos) dflt='.so' ;;
+ *) dflt='.so' ;;
+ esac
+ ;;
+ *) dflt="$shlibsuffix"
+ ;;
+ esac
+ rp="What is the suffix used for shared libraries?"
+ . ./myread
+ case "$ans" in
+ none) shlibsuffix='' ;;
+ *) shlibsuffix="$ans" ;;
+ esac
+ ;;
+?X: End of usedl=y section
+*) usedl="$undef"
+ : These are currently not used.
+ dlsrc=''
+ dlobj=''
+ dldir=''
+ lddlflags=''
+ ccdlflags=''
+ shlibsuffix='.o'
+ ;;
esac
diff --git a/U/gidtype.U b/U/gidtype.U
index 870fce8c83..962f3d8a6b 100644
--- a/U/gidtype.U
+++ b/U/gidtype.U
@@ -1,12 +1,3 @@
-?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
@@ -21,10 +12,10 @@
?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:gidtype: Myread Oldconfig contains Findhdr Setvar
?MAKE: -pick add $@ %<
?S:gidtype:
-?S: This variable defines Gid_t to be something like gid_t, int,
+?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:.
@@ -38,6 +29,7 @@
?H:#define Gid_t $gidtype /* Type for getgid(), etc... */
?H:.
?T:xxx
+?INIT:gidtype=''
: see what type gids are declared as in the kernel
case "$gidtype" in
'')
@@ -57,4 +49,6 @@ esac
echo " "
rp="What is the type for group ids returned by getgid()?"
. ./myread
-gidtype="$ans"
+val="$ans"
+set gidtype
+eval $setvar
diff --git a/U/groupstype.U b/U/groupstype.U
index f8ebab4ad3..355ea14980 100644
--- a/U/groupstype.U
+++ b/U/groupstype.U
@@ -1,12 +1,3 @@
-?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,
@@ -17,7 +8,7 @@
?RCS:
?RCS: $Log: groupstype.U,v $
?RCS:
-?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig contains Findhdr
+?MAKE:groupstype: gidtype d_getgrps Myread Oldconfig Findhdr cat Setvar
?MAKE: -pick add $@ %<
?INIT:groupstype=''
?S:groupstype:
@@ -48,11 +39,13 @@ case "$d_getgrps" in
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.
+is the same as group ids, $gidtype, but not always.
EOM
rp="What type is the second arguement to getgroups()?"
. ./myread
- groupstype="$ans"
+ val="$ans"
;;
-*) groupstype="$gidtype";;
+*) val="$gidtype";;
esac
+set groupstype
+eval $setvar
diff --git a/U/i_dlfcn.U b/U/i_dlfcn.U
index 0f0f9c1592..dcffe126bf 100644
--- a/U/i_dlfcn.U
+++ b/U/i_dlfcn.U
@@ -1,12 +1,3 @@
-?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,
@@ -34,4 +25,3 @@
: see if dlfcn is available
set dlfcn.h i_dlfcn
eval $inhdr
-
diff --git a/U/i_net_errno.U b/U/i_net_errno.U
new file mode 100644
index 0000000000..c5fb9116a0
--- /dev/null
+++ b/U/i_net_errno.U
@@ -0,0 +1,50 @@
+?RCS: $Id: i_net_errno.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_net_errno.U,v $
+?RCS:
+?MAKE:i_neterrno: Inhdr cc ccflags rm
+?MAKE: -pick add $@ %<
+?S:i_neterrno:
+?S: This variable conditionally defines the I_NET_ERRNO symbol, which
+?S: indicates to the C program that <net/errno.h> exists and should
+?S: be included.
+?S:.
+?C:I_NET_ERRNO:
+?C: This symbol, if defined, indicates that <net/errno.h> exists and
+?C: should be included.
+?C:.
+?H:#$i_neterrno I_NET_ERRNO /**/
+?H:.
+?LINT:set i_neterrno
+: see if net/errno.h is available
+set net/errno.h i_neterrno
+eval $inhdr
+: Unfortunately, it causes problems on some systems. Arrgh.
+case '$i_neterrno' in
+'define') echo "<net/errno.h> found."
+ cat > try.c <<'EOM'
+#include <stdio.h>
+#include <errno.h>
+#include <net/errno.h>
+int func()
+{
+int x;
+x = ENOTSOCK;
+return x;
+}
+EOM
+ if $cc $ccflags -c try.c >/dev/null 2>&1; then
+ i_neterrno="$define"
+ else
+ echo "But it causes problems, so we won't include it"
+ i_neterrno="$undef"
+ fi
+ $rm -f try.* try
+ ;;
+esac
diff --git a/U/i_pwd.U b/U/i_pwd.U
new file mode 100644
index 0000000000..69aa030706
--- /dev/null
+++ b/U/i_pwd.U
@@ -0,0 +1,134 @@
+?RCS: $Id: i_pwd.U,v 3.0 1993/08/18 12:08:25 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: i_pwd.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:25 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: This unit looks wether there is a pwd system or not
+?X:
+?MAKE:i_pwd d_pwquota d_pwage d_pwchange d_pwclass d_pwexpire d_pwcomment: \
+ test contains rm cppstdin cppflags cppminus Findhdr
+?MAKE: -pick add $@ %<
+?S:i_pwd:
+?S: This variable conditionally defines I_PWD, which indicates
+?S: to the C program that it should include <pwd.h>.
+?S:.
+?S:d_pwquota:
+?S: This varaible conditionally defines PWQUOTA, which indicates
+?S: that struct passwd contains pw_quota.
+?S:.
+?S:d_pwage:
+?S: This varaible conditionally defines PWAGE, which indicates
+?S: that struct passwd contains pw_age.
+?S:.
+?S:d_pwchange:
+?S: This varaible conditionally defines PWCHANGE, which indicates
+?S: that struct passwd contains pw_change.
+?S:.
+?S:d_pwclass:
+?S: This varaible conditionally defines PWCLASS, which indicates
+?S: that struct passwd contains pw_class.
+?S:.
+?S:d_pwexpire:
+?S: This varaible conditionally defines PWEXPIRE, which indicates
+?S: that struct passwd contains pw_expire.
+?S:.
+?S:d_pwcomment:
+?S: This varaible conditionally defines PWCOMMENT, which indicates
+?S: that struct passwd contains pw_comment.
+?S:.
+?C:I_PWD:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <pwd.h>.
+?C:.
+?C:PWQUOTA:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_quota.
+?C:.
+?C:PWAGE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_age.
+?C:.
+?C:PWCHANGE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_change.
+?C:.
+?C:PWCLASS:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_class.
+?C:.
+?C:PWEXPIRE:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_expire.
+?C:.
+?C:PWCOMMENT:
+?C: This symbol, if defined, indicates to the C program that struct passwd
+?C: contains pw_comment.
+?C:.
+?H:#$i_pwd I_PWD /**/
+?H:#$d_pwquota PWQUOTA /**/
+?H:#$d_pwage PWAGE /**/
+?H:#$d_pwchange PWCHANGE /**/
+?H:#$d_pwclass PWCLASS /**/
+?H:#$d_pwexpire PWEXPIRE /**/
+?H:#$d_pwcomment PWCOMMENT /**/
+?H:.
+?T:xxx
+: see if this is a pwd system
+echo " "
+xxx=`./findhdr pwd.h`
+if $test "$xxx"; then
+ i_pwd="$define"
+ echo "<pwd.h> found." >&4
+ $cppstdin $cppflags $cppminus < $xxx >$$.h
+ if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
+ d_pwquota="$define"
+ else
+ d_pwquota="$undef"
+ fi
+ if $contains 'pw_age' $$.h >/dev/null 2>&1; then
+ d_pwage="$define"
+ else
+ d_pwage="$undef"
+ fi
+ if $contains 'pw_change' $$.h >/dev/null 2>&1; then
+ d_pwchange="$define"
+ else
+ d_pwchange="$undef"
+ fi
+ if $contains 'pw_class' $$.h >/dev/null 2>&1; then
+ d_pwclass="$define"
+ else
+ d_pwclass="$undef"
+ fi
+ if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
+ d_pwexpire="$define"
+ else
+ d_pwexpire="$undef"
+ fi
+ if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
+ d_pwcomment="$define"
+ else
+ d_pwcomment="$undef"
+ fi
+ $rm -f $$.h
+else
+ i_pwd="$undef"
+ d_pwquota="$undef"
+ d_pwage="$undef"
+ d_pwchange="$undef"
+ d_pwclass="$undef"
+ d_pwexpire="$undef"
+ d_pwcomment="$undef"
+ echo "<pwd.h> NOT found." >&4
+fi
+
diff --git a/U/i_sdbm.U b/U/i_sdbm.U
new file mode 100644
index 0000000000..3e01615670
--- /dev/null
+++ b/U/i_sdbm.U
@@ -0,0 +1,37 @@
+?RCS: $Id: i_sdbm.U,v $
+?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: i_sdbm.U,v $
+?RCS:
+?MAKE:i_sdbm: Inhdr package Setvar
+?MAKE: -pick add $@ %<
+?S:i_sdbm:
+?S: This variable conditionally defines the I_SDBM symbol, which
+?S: indicates to the C program that sdbm.h exists and should
+?S: be included.
+?S:.
+?C:I_SDBM (HAS_SDBM):
+?C: This symbol, if defined, indicates that sdbm.h exists and should
+?C: be included.
+?C:.
+?H:#$i_sdbm I_SDBM /**/
+?H:.
+?LINT:set i_sdbm
+: see if sdbm.h is wanted
+?X: Since perl includes sdbm, don't ask here. Always include it.
+?X: But, we'll allow a hints file to over-rule us.
+echo " "
+echo "$package includes an implementation of sdbm in ext/dbm/sdbm."
+case "$i_sdbm" in
+ ''|' ') val="$define" ;;
+ *) val="$i_sdbm" ;;
+esac
+set i_sdbm
+eval $setvar
diff --git a/U/i_sgtty.U b/U/i_sgtty.U
new file mode 100644
index 0000000000..b890d78811
--- /dev/null
+++ b/U/i_sgtty.U
@@ -0,0 +1,128 @@
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
+?MAKE:i_sgtty: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, and
+?S: indicates whether a C program should include <sgtty.h>.
+?S:.
+?C:I_SGTTY:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <sgtty.h>.
+?C:.
+?H:#$i_sgtty I_SGTTY /**/
+?H:.
+?LINT:set i_sgtty
+: see if this is a sgtty.h system
+set sgtty.h i_sgtty
+eval $inhdr
diff --git a/U/i_termio.U b/U/i_termio.U
new file mode 100644
index 0000000000..f1eb947503
--- /dev/null
+++ b/U/i_termio.U
@@ -0,0 +1,117 @@
+?RCS: $Id: i_termio.U,v 3.0 1993/08/18 12:08: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: i_termio.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:44 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?X:
+?X: Include all three (possible) definitions in config_h.SH.
+?X: There are enough implementations of posix termios.h out there
+?X: that do not work well with other system headers or are
+?X: incomplete. This makes it easier for the user to back off
+?X: and try sgtty.h or i_termio.h instead.
+?X:
+?MAKE:i_termio i_sgtty i_termios: test Inlibc Cppsym Guess Setvar Findhdr
+?MAKE: -pick add $@ %<
+?S:i_termio:
+?S: This variable conditionally defines the I_TERMIO symbol, which
+?S: indicates to the C program that it should include <termio.h> rather
+?S: than <sgtty.h>.
+?S:.
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, which
+?S: indicates to the C program that the POSIX <termios.h> file is
+?S: to be included.
+?S:.
+?S:i_sgtty:
+?S: This variable conditionally defines the I_SGTTY symbol, which
+?S: indicates to the C program that it should include <sgtty.h> rather
+?S: than <termio.h>.
+?S:.
+?C:I_TERMIO ~ %<:
+?C: This symbol, if defined, indicates that the program should include
+?C: <termio.h> rather than <sgtty.h>. There are also differences in
+?C: the ioctl() calls that depend on the value of this symbol.
+?C:.
+?C:I_TERMIOS ~ %<:
+?C: This symbol, if defined, indicates that the program should include
+?C: the POSIX termios.h rather than sgtty.h or termio.h.
+?C: There are also differences in the ioctl() calls that depend on the
+?C: value of this symbol.
+?C:.
+?C:I_SGTTY ~ %<:
+?C: This symbol, if defined, indicates that the program should include
+?C: <sgtty.h> rather than <termio.h>. There are also differences in
+?C: the ioctl() calls that depend on the value of this symbol.
+?C:.
+?H:?%<:#$i_termio I_TERMIO /**/
+?H:?%<:#$i_termios I_TERMIOS /**/
+?H:?%<:#$i_sgtty I_SGTTY /**/
+?H:.
+?T:val2 val3
+?LINT:set i_termio i_sgtty i_termios
+: see if this is a termio system
+val="$undef"
+val2="$undef"
+val3="$undef"
+?X: Prefer POSIX-approved termios.h over all else
+if $test `./findhdr termios.h`; then
+ set tcsetattr i_termios
+ eval $inlibc
+ val3="$i_termios"
+fi
+echo " "
+case "$val3" in
+"$define") echo "You have POSIX termios.h... good!" >&4;;
+*) if Cppsym pyr; then
+ case "`/bin/universe`" in
+ ucb) if $test `./findhdr sgtty.h`; then
+ val2="$define"
+ echo "<sgtty.h> found." >&4
+ else
+ echo "System is pyramid with BSD universe."
+ echo "<sgtty.h> not found--you could have problems." >&4
+ fi;;
+ *) if $test `./findhdr termio.h`; then
+ val="$define"
+ echo "<termio.h> found." >&4
+ else
+ echo "System is pyramid with USG universe."
+ echo "<termio.h> not found--you could have problems." >&4
+ fi;;
+ esac
+?X: Start with USG to avoid problems if both usg/bsd was guessed
+ elif usg; then
+ if $test `./findhdr termio.h`; then
+ echo "<termio.h> found." >&4
+ val="$define"
+ elif $test `./findhdr sgtty.h`; then
+ echo "<sgtty.h> found." >&4
+ val2="$define"
+ else
+echo "Neither <termio.h> nor <sgtty.h> found--you could have problems." >&4
+ fi
+ else
+ if $test `./findhdr sgtty.h`; then
+ echo "<sgtty.h> found." >&4
+ val2="$define"
+ elif $test `./findhdr termio.h`; then
+ echo "<termio.h> found." >&4
+ val="$define"
+ else
+echo "Neither <sgtty.h> nor <termio.h> found--you could have problems." >&4
+ fi
+ fi;;
+esac
+set i_termio; eval $setvar
+val=$val2; set i_sgtty; eval $setvar
+val=$val3; set i_termios; eval $setvar
+
diff --git a/U/i_termios.U b/U/i_termios.U
new file mode 100644
index 0000000000..f676710e40
--- /dev/null
+++ b/U/i_termios.U
@@ -0,0 +1,64 @@
+?MAKE:i_termios: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, and
+?S: indicates whether a C program should include <sys/termios.h>.
+?S:.
+?C:I_TERMIOS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <termios.h>.
+?C:.
+?H:#$i_termios I_TERMIOS /**/
+?H:.
+?LINT:set i_termios
+: see if this is a termios.h system
+set termios.h i_termios
+eval $inhdr
+?MAKE:i_termios: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, and
+?S: indicates whether a C program should include <sys/termios.h>.
+?S:.
+?C:I_TERMIOS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <termios.h>.
+?C:.
+?H:#$i_termios I_TERMIOS /**/
+?H:.
+?LINT:set i_termios
+: see if this is a termios.h system
+set termios.h i_termios
+eval $inhdr
+?MAKE:i_termios: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, and
+?S: indicates whether a C program should include <sys/termios.h>.
+?S:.
+?C:I_TERMIOS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <termios.h>.
+?C:.
+?H:#$i_termios I_TERMIOS /**/
+?H:.
+?LINT:set i_termios
+: see if this is a termios.h system
+set termios.h i_termios
+eval $inhdr
+?MAKE:i_termios: Inhdr
+?MAKE: -pick add $@ %<
+?S:i_termios:
+?S: This variable conditionally defines the I_TERMIOS symbol, and
+?S: indicates whether a C program should include <sys/termios.h>.
+?S:.
+?C:I_TERMIOS:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include <termios.h>.
+?C:.
+?H:#$i_termios I_TERMIOS /**/
+?H:.
+?LINT:set i_termios
+: see if this is a termios.h system
+set termios.h i_termios
+eval $inhdr
diff --git a/U/i_vfork.U b/U/i_vfork.U
new file mode 100644
index 0000000000..19af424af1
--- /dev/null
+++ b/U/i_vfork.U
@@ -0,0 +1,34 @@
+?RCS: $Id: i_vfork.U,v 3.0 1993/08/18 12:08:50 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: i_vfork.U,v $
+?RCS: Revision 3.0 1993/08/18 12:08:50 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:i_vfork: Inhdr d_vfork
+?MAKE: -pick add $@ %<
+?S:i_vfork:
+?S: This variable conditionally defines the I_VFORK symbol, and indicates
+?S: whether a C program should include vfork.h.
+?S:.
+?C:I_VFORK:
+?C: This symbol, if defined, indicates to the C program that it should
+?C: include vfork.h.
+?C:.
+?H:#$i_vfork I_VFORK /**/
+?H:.
+?LINT:set i_vfork
+: see if this is a vfork system
+case "$d_vfork" in
+define) set vfork.h i_vfork
+ eval $inhdr
+ ;;
+*) i_vfork="$undef";;
+esac
diff --git a/U/libc.U b/U/libc.U
index 54879b1112..9f497f1ba0 100644
--- a/U/libc.U
+++ b/U/libc.U
@@ -1,12 +1,3 @@
-?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
diff --git a/U/libpth.U b/U/libpth.U
index 99cf22ccf5..2c030c296c 100644
--- a/U/libpth.U
+++ b/U/libpth.U
@@ -1,12 +1,3 @@
-?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
@@ -32,7 +23,7 @@
?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: Its value is prepended to libpth. This variable takes care of special
?S: machines, like the mips. Usually, it should be empty.
?S:.
?T: xxx yyy
diff --git a/U/libs.U b/U/libs.U
index c1f951abb0..45625abc1b 100644
--- a/U/libs.U
+++ b/U/libs.U
@@ -1,12 +1,3 @@
-?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
@@ -37,9 +28,17 @@
?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:
+?X: The -lsocket -linet -lnsl order has been reported to be necessary
+?X: for at least one SVR4 implementation.
+?X:
?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"
+?X:
+?X: The extra space at the beginning and end is for some old hints
+?X: files which assumed there was always a space around each library.
+?X:
+?INIT:libswanted=" net socket inet nsl 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 " "
@@ -55,27 +54,27 @@ for thislib in $libswanted; do
case "$thislib" in
dbm) thatlib=ndbm;;
*_s) thatlib=NONE;;
- *) thatlib="${thislib}_s";;
+ *) 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`
+ zzz=`./loc lib$thislib.so.[0-9]'*' X $libpth`
if $test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thislib";;
esac
elif $test -f $yyy; then
echo "Found -l$thatlib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thatlib";;
esac
elif $test -f $zzz; then
echo "Found -$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib) ;;
*) dflt="$dflt -l$thislib";;
esac
else
@@ -84,13 +83,13 @@ for thislib in $libswanted; do
if $test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thislib "*|*-l$thislib|*"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thislib";;
esac
elif $test -f $yyy; then
echo "Found -l$thatlib."
case "$dflt" in
- "*-l$thislib *.*"|"*-l$thatlib *.*") ;;
+ *"-l$thatlib "*|*-l$thatlib) ;;
*) dflt="$dflt -l$thatlib";;
esac
else
diff --git a/U/libyacc.U b/U/libyacc.U
index cfee077823..c12e5a5ad1 100644
--- a/U/libyacc.U
+++ b/U/libyacc.U
@@ -1,12 +1,3 @@
-?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
diff --git a/U/lns.U b/U/lns.U
new file mode 100644
index 0000000000..fcefb1fa32
--- /dev/null
+++ b/U/lns.U
@@ -0,0 +1,21 @@
+?RCS: $Id: lns.U,v $
+?RCS:
+?RCS: $Log: lns.U,v $
+?RCS:
+?MAKE:lns: ln touch
+?MAKE: -pick add $@ %<
+?S:lns:
+?S: This variable holds the name of the command to make
+?S: symbolic links (if they are supported). It can be used
+?S: in the Makefile. It is either 'ln -s' or 'ln'
+?S:.
+?X: We can't rely on d_symlink because that may be listed in the
+?X: C library but unimplemented.
+: determine whether symbolic links are supported
+$touch blurfl
+if $ln -s blurfl sym > /dev/null 2>&1 ; then
+ lns="$ln -s"
+else
+ lns="$ln"
+fi
+rm -f blurfl sym
diff --git a/U/loc_sed.U b/U/loc_sed.U
new file mode 100644
index 0000000000..9eb8b21e14
--- /dev/null
+++ b/U/loc_sed.U
@@ -0,0 +1,10 @@
+?RCS: $Id: loc_sed.U,v $
+?RCS:
+?MAKE:: sed
+?MAKE: -pick add $@ %<
+?C:LOC_SED:
+?C: This symbol holds the complete pathname to the sed program.
+?C:.
+?H:#define LOC_SED "$sed" /**/
+?H:.
+?X: This is used in perl.c.
diff --git a/U/mallocsrc.U b/U/mallocsrc.U
index 3fc4ee7c6e..9fd5382533 100644
--- a/U/mallocsrc.U
+++ b/U/mallocsrc.U
@@ -1,12 +1,3 @@
-?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
@@ -21,8 +12,8 @@
?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:mallocsrc mallocobj usemymalloc malloctype d_mymalloc: Myread Oldconfig package \
+ Guess Setvar test rm cat +cc +ccflags Findhdr
?MAKE: -pick add $@ %<
?S:usemymalloc:
?S: This variable contains y if the malloc that comes with this package
@@ -36,6 +27,11 @@
?S: Otherwise the value is null. This variable is intended for generating
?S: Makefiles.
?S:.
+?S:d_mymalloc:
+?S: This variable conditionally defines MYMALLOC in case other parts
+?S: of the source want to take special action if MYMALLOC is used.
+?S: This may include different sorts of profiling or error detection.
+?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.
@@ -50,6 +46,11 @@
?C:.
?H:#define Malloc_t $malloctype /**/
?H:.
+?C:MYMALLOC:
+?C: This symbol, if defined, indicates that we're using our own malloc.
+?C:.
+?H:#$d_mymalloc MYMALLOC /**/
+?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
@@ -71,11 +72,17 @@ 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='';;
+y*) mallocsrc='malloc.c'
+ mallocobj='malloc.o'
+ d_mymalloc="$define"
+ ;;
+*) mallocsrc=''
+ mallocobj=''
+ d_mymalloc="$undef"
+ ;;
esac
-
@end
+
@if MALLOCPTRTYPE || Malloc_t
: compute the type returned by malloc
echo " "
diff --git a/U/prototype.U b/U/prototype.U
index 8fa80e8852..b0332f5655 100644
--- a/U/prototype.U
+++ b/U/prototype.U
@@ -1,12 +1,3 @@
-?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
diff --git a/U/sig_name.U b/U/sig_name.U
new file mode 100644
index 0000000000..9b3f9e3440
--- /dev/null
+++ b/U/sig_name.U
@@ -0,0 +1,86 @@
+?RCS: $Id: sig_name.U,v 3.0 1993/08/18 12:09: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: sig_name.U,v $
+?RCS: Revision 3.0 1993/08/18 12:09:47 ram
+?RCS: Baseline for dist 3.0 netwide release.
+?RCS:
+?MAKE:sig_name: awk rm Findhdr
+?MAKE: -pick add $@ %<
+?S:sig_name:
+?S: This variable holds the signal names, space separated. The leading
+?S: SIG in signals name is removed.
+?S:.
+?C:SIG_NAME:
+?C: This symbol contains a list of signal names in order. This is intended
+?C: to be used as a static array initialization, like this:
+?C: char *sig_name[] = { SIG_NAME };
+?C: The signals in the list are separated with commas, and each signal
+?C: is surrounded by double quotes. There is no leading SIG in the signal
+?C: name, i.e. SIGQUIT is known as "QUIT".
+?C:.
+?H:#define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/
+?H:.
+?T:xxx
+: generate list of signal names
+echo " "
+case "$sig_name" in
+'')
+ echo "Generating a list of signal names..." >&4
+ xxx=`./findhdr signal.h`" "`./findhdr sys/signal.h`
+ set X `cat $xxx 2>&1 | $awk '
+$1 ~ /^#define$/ && $2 ~ /^SIG[A-Z0-9]*$/ && $3 ~ /^[1-9][0-9]*$/ {
+ sig[$3] = substr($2,4,20)
+ if (max < $3 && $3 < 60) {
+ max = $3
+ }
+}
+
+END {
+ for (i = 1; i <= max; i++) {
+ if (sig[i] == "")
+ printf "%d", i
+ else
+ printf "%s", sig[i]
+ if (i < max)
+ printf " "
+ }
+ printf "\n"
+}
+'`
+ shift
+ case $# in
+ 0)
+ echo 'kill -l' >/tmp/foo$$
+ set X `csh -f </tmp/foo$$`
+ $rm -f /tmp/foo$$
+ shift
+ case $# in
+ 0)set HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM
+ ;;
+ esac
+ ;;
+ esac
+ sig_name="ZERO $*"
+ ;;
+esac
+echo "The following signals are available:"
+echo $sig_name |
+ $awk 'BEGIN { linelen = 0 }
+ { for (i = 1; i < NF; i++)
+ {
+ name = "SIG" $i " "
+ linelen = linelen + length(name)
+ if (linelen > 70)
+ {
+ printf "\n"
+ linelen = length(name)
+ }
+ printf "%s", name } }'
diff --git a/U/voidflags.U b/U/voidflags.U
index 50b5d9285b..7d9a0d06ba 100644
--- a/U/voidflags.U
+++ b/U/voidflags.U
@@ -1,12 +1,3 @@
-?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
@@ -47,11 +38,7 @@
?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:?%<:# define VOIDUSED $defvoidused
?H:?%<:#endif
?H:?%<:#define VOIDFLAGS $voidflags
?H:?%<:#if (VOIDFLAGS & VOIDUSED) != VOIDUSED
@@ -62,7 +49,7 @@
?H:?%<:# define VOID void
?H:?%<:#endif
?H:.
-?W:%<:void VOID VOIDWANT
+?W:%<:void VOID VOIDUSED
?INIT:: full support for void wanted by default
?INIT:defvoidused=15
?INIT:
diff --git a/U/yacc.U b/U/yacc.U
index 0b777a780f..679970c34e 100644
--- a/U/yacc.U
+++ b/U/yacc.U
@@ -1,12 +1,3 @@
-?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
@@ -21,7 +12,7 @@
?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:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test package
?MAKE: -pick add $@ %<
?S:yacc:
?S: This variable holds the name of the compiler compiler we
@@ -48,8 +39,7 @@ 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.
+$package no longer requires a compiler compiler, so the following is optional.
EOM
rp="Which compiler compiler ($rp) shall I use?"
. ./myread