lwall@jato.Jpl.Nasa.Gov (Larry Wall) (09/16/89)
Apply these to a virgin perl 3.0 beta directory to produce a perl 3.0 gamma directory. Recommended patch switches are -p1 -N. Larry Wall lwall@jpl-devvax.jpl.nasa.gov diff -c -r beta/Changes gamma/Changes *** beta/Changes Fri Sep 15 16:07:33 1989 --- gamma/Changes Fri Sep 15 16:12:06 1989 *************** *** 11,17 **** You can now write packages with their own namespace. ! You can now pass arrays and such to subroutines by reference. The debugger now has hooks in the perl parser so it doesn't get confused. The debugger won't interfere with stdin and stdout. New debugger commands: --- 11,17 ---- You can now write packages with their own namespace. ! You can now pass things to subroutines by reference. The debugger now has hooks in the perl parser so it doesn't get confused. The debugger won't interfere with stdin and stdout. New debugger commands: *************** *** 119,124 **** --- 119,137 ---- or shift(@ary); push(@ary,<>); + The shift operator used inside subroutines now defaults to shifting + the @_ array. You can still shift ARGV explicitly, of course. + + The @_ array which is passed to subroutines is a local array, but the + elements of it are passed by reference now. This means that if you + explicitly modify $_[0], you are actually modifying the first argument + to the routine. Assignment to another location (such as the usual + local($foo) = @_ trick) causes a copy of the value, so this will not + affect most scripts. However, if you've modified @_ values in the + subroutine you could be in for a surprise. I don't believe most people + will find this a problem, and the long term efficiency gain is worth + a little confusion. + Perl now detects sequences of references to the same variable and builds switch statements internally wherever reasonable. *************** *** 175,180 **** --- 188,221 ---- vec - treat string as a vector of small integers fileno - return the file descriptor for a handle wantarray - was subroutine called in array context? + opendir + readdir + telldir + seekdir + rewinddir + closedir + syscall + socket + bind + connect + listen + accept + shutdown + socketpair + getsockname + getpeername + getsockopt + setsockopt + getpwnam + getpwuid + getpwent + setpwent + endpwent + getgrnam + getgrgid + getgrent + setgrent + endgrent gethostbyname gethostbyaddr gethostent *************** *** 195,201 **** getservent setservent endservent - Changes to s2p -------------- --- 236,241 ---- diff -c -r beta/Configure gamma/Configure *** beta/Configure Fri Sep 15 16:05:38 1989 --- gamma/Configure Fri Sep 15 16:09:55 1989 *************** *** 67,72 **** --- 67,96 ---- mail='' cpp='' perl='' + emacs='' + ls='' + rmail='' + sendmail='' + shar='' + smail='' + tbl='' + troff='' + nroff='' + uname='' + uuname='' + line='' + chgrp='' + chmod='' + lint='' + sleep='' + pr='' + tar='' + ln='' + lpr='' + lp='' + touch='' + make='' + date='' Log='' Header='' bin='' *************** *** 74,88 **** --- 98,116 ---- contains='' cppstdin='' cppminus='' + d_bcmp='' d_bcopy='' d_charsprf='' d_crypt='' + cryptlib='' d_dosuid='' + d_dup2='' d_fchmod='' d_fchown='' d_fcntl='' d_flock='' d_getgrps='' + d_gethent='' d_getpgrp='' d_getprior='' d_htonl='' *************** *** 89,98 **** --- 117,128 ---- d_index='' d_ioctl='' d_killpg='' + d_memcmp='' d_memcpy='' d_mkdir='' d_ndbm='' d_odbm='' + d_readdir='' d_rename='' d_rmdir='' d_setegid='' *************** *** 104,109 **** --- 134,140 ---- d_setrgid='' d_setruid='' d_socket='' + d_sockpair='' d_oldsock='' socketlib='' sockethdr='' *************** *** 111,116 **** --- 142,148 ---- d_stdstdio='' d_strctcpy='' d_symlink='' + d_syscall='' d_tminsys='' i_systime='' d_varargs='' *************** *** 117,126 **** --- 149,170 ---- d_vfork='' d_voidsig='' d_vprintf='' + d_charvspr='' gidtype='' + i_dirent='' + d_dirnamlen='' + i_fcntl='' + i_grp='' + i_pwd='' + d_pwquota='' + d_pwage='' + i_sysdir='' + i_sysioctl='' + i_varargs='' intsize='' libc='' libdbm='' + libndir='' libnm='' mallocsrc='' mallocobj='' *************** *** 133,141 **** --- 177,187 ---- medium='' large='' huge='' + optimize='' ccflags='' ldflags='' cc='' + libs='' n='' c='' package='' *************** *** 162,168 **** define='define' undef='undef' ! libpth='/usr/lib /usr/local/lib /lib /usr/lib/large /lib/large /usr/lib/small /lib/small' smallmach='pdp11 i8086 z8000 i80286 iAPX286' rmlist='kit[1-9]isdone kit[1-9][0-9]isdone' trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3 --- 208,214 ---- define='define' undef='undef' ! libpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large /usr/lib/small /lib/small' smallmach='pdp11 i8086 z8000 i80286 iAPX286' rmlist='kit[1-9]isdone kit[1-9][0-9]isdone' trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3 *************** *** 189,195 **** attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX" attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386" attrlist="$attrlist i186" ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib /lib /usr/local/lib" d_newshome="/usr/NeWS" defvoidused=7 --- 235,241 ---- attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX" attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386" attrlist="$attrlist i186" ! pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb" d_newshome="/usr/NeWS" defvoidused=7 *************** *** 357,380 **** chmod +x loc $eunicefix loc loclist=" - expr - sed - echo cat - rm - mv cp ! tr mkdir sort uniq - grep " trylist=" - test - egrep Mcc cpp " for file in $loclist; do xxx=`loc $file $file $pth` --- 403,427 ---- chmod +x loc $eunicefix loc loclist=" cat cp ! echo ! expr ! grep mkdir + mv + rm + sed sort + tr uniq " trylist=" Mcc cpp + egrep + test + uname " for file in $loclist; do xxx=`loc $file $file $pth` *************** *** 463,481 **** rmlist="$rmlist loc" : get list of predefined functions in a handy place echo " " if test -f /lib/libc.a; then echo "Your C library is in /lib/libc.a. You're normal." libc=/lib/libc.a else ! ans=`loc libc.a blurfl/dyick $libpth` ! if test ! -f $ans; then ans=`loc libc blurfl/dyick $libpth` fi ! if test ! -f $ans; then ans=`loc clib blurfl/dyick $libpth` fi ! if test -f $ans; then echo "Your C library is in $ans, of all places." libc=$ans else --- 510,546 ---- rmlist="$rmlist loc" : get list of predefined functions in a handy place + if $test -n "$uname"; then + os=`$uname -s` + else + os=unknown + fi echo " " if test -f /lib/libc.a; then echo "Your C library is in /lib/libc.a. You're normal." libc=/lib/libc.a else ! if test "$os" = DomainOS ; then ans=`loc libc blurfl/dyick $libpth` + else + ans=`loc libc.a blurfl/dyick $libpth` fi ! if test ! -f "$ans"; then ans=`loc clib blurfl/dyick $libpth` fi ! if test ! -f "$ans"; then ! ans=`loc libc blurfl/dyick $libpth` ! fi ! if test ! -f "$ans"; then ! ans=`loc Slibc.a blurfl/dyick /usr/lib/386 /lib/386 $libpth` ! fi ! if test ! -f "$ans"; then ! ans=`loc Mlibc.a blurfl/dyick $libpth` ! fi ! if test ! -f "$ans"; then ! ans=`loc Llibc.a blurfl/dyick $libpth` ! fi ! if test -f "$ans"; then echo "Your C library is in $ans, of all places." libc=$ans else *************** *** 501,513 **** echo " " $echo $n "Extracting names from $libc for later perusal...$c" nm $libc 2>/dev/null >libc.tmp ! sed -n -e 's/^.* [AT] *_//p' -e 's/^.* [AT] *//p' <libc.tmp >libc.list if $contains '^printf$' libc.list >/dev/null 2>&1; then echo "done" else ! sed -n -e 's/^.* D _//p' -e 's/^.* D //p' <libc.tmp >libc.list $contains '^printf$' libc.list >/dev/null 2>&1 || \ ! sed -n -e 's/^_//' \ -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list if $contains '^printf$' libc.list >/dev/null 2>&1; then echo "done" --- 566,582 ---- echo " " $echo $n "Extracting names from $libc for later perusal...$c" nm $libc 2>/dev/null >libc.tmp ! $sed -n -e 's/^.* [AT] __*//p' -e 's/^.* [AT] //p' <libc.tmp >libc.list if $contains '^printf$' libc.list >/dev/null 2>&1; then echo "done" else ! if test "$os" = DomainOS ; then ! $sed -n -e 's/^__*//' -e 's/^\([a-zA-Z_0-9$]*\).*xtern.*/\1/p' <libc.tmp >libc.list ! else ! $sed -n -e 's/^.* D __*//p' -e 's/^.* D //p' <libc.tmp >libc.list ! fi $contains '^printf$' libc.list >/dev/null 2>&1 || \ ! $sed -n -e 's/^_//' \ -e 's/^\([a-zA-Z_0-9]*\).*xtern.*text.*/\1/p' <libc.tmp >libc.list if $contains '^printf$' libc.list >/dev/null 2>&1; then echo "done" *************** *** 516,527 **** echo "nm didn't seem to work right." echo "Trying ar instead..." if ar t $libc > libc.tmp; then ! sed -e 's/\.o$//' < libc.tmp > libc.list echo "Ok." else echo "ar didn't seem to work right." echo "Maybe this is a Cray...trying bld instead..." ! if bld t $libc | sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then echo "Ok." else echo "That didn't work either. Giving up." --- 585,596 ---- echo "nm didn't seem to work right." echo "Trying ar instead..." if ar t $libc > libc.tmp; then ! $sed -e 's/\.o$//' < libc.tmp > libc.list echo "Ok." else echo "ar didn't seem to work right." echo "Maybe this is a Cray...trying bld instead..." ! if bld t $libc | $sed -e 's/.*\///' -e 's/\.o:.*$//' > libc.list; then echo "Ok." else echo "That didn't work either. Giving up." *************** *** 535,541 **** : make some quick guesses about what we are up against echo " " $echo $n "Hmm... $c" ! if $contains SIGTSTP /usr/include/signal.h >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." echo exit 0 >bsd echo exit 1 >usg --- 604,611 ---- : make some quick guesses about what we are up against echo " " $echo $n "Hmm... $c" ! cat /usr/include/signal.h /usr/include/sys/signal.h >foo ! if $contains SIGTSTP foo >/dev/null 2>&1 ; then echo "Looks kind of like a BSD system, but we'll see..." echo exit 0 >bsd echo exit 1 >usg *************** *** 591,596 **** --- 661,667 ---- fi chmod +x bsd usg v7 eunice venix $eunicefix bsd usg v7 eunice venix + rm -rf foo rmlist="$rmlist bsd usg v7 eunice venix xenix" : see if sh knows # comments *************** *** 710,716 **** if test -d $bin; then cont='' else ! dflt=n rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]" $echo $n "$rp $c" . myread --- 781,790 ---- if test -d $bin; then cont='' else ! case "$fastread" in ! yes) dflt=y;; ! *) dflt=n;; ! esac rp="Directory $bin doesn't exist. Use that name anyway? [$dflt]" $echo $n "$rp $c" . myread *************** *** 722,730 **** done : determine where manual pages go case "$mansrc" in '') ! dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1` ;; *) dflt="$mansrc" ;; --- 796,808 ---- done : determine where manual pages go + $cat <<EOM + + $package has manual pages that need to be installed in source form. + EOM case "$mansrc" in '') ! dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1 /usr/man/man.L` ;; *) dflt="$mansrc" ;; *************** *** 736,745 **** $echo $n "$rp $c" . myread mansrc=`filexp "$ans"` ! if test -d $mansrc; then cont='' else ! dflt=n rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]" $echo $n "$rp $c" . myread --- 814,827 ---- $echo $n "$rp $c" . myread mansrc=`filexp "$ans"` ! if $test -d "$mansrc"; then cont='' else ! if $test "$fastread" = yes; then ! dflt=y ! else ! dflt=n ! fi rp="Directory $mansrc doesn't exist. Use that name anyway? [$dflt]" $echo $n "$rp $c" . myread *************** *** 759,764 **** --- 841,849 ---- *C) manext=C ;; + *L) + manext=L + ;; *) manext=1 ;; *************** *** 832,839 **** *split) case "$split" in '') ! if $contains '\-i' /usr/man/man1/ld.1 >/dev/null 2>&1 || \ ! $contains '\-i' /usr/man/man1/cc.1 >/dev/null 2>&1; then dflt='-i' else dflt='none' --- 917,924 ---- *split) case "$split" in '') ! if $contains '\-i' $mansrc/man1/ld.1 >/dev/null 2>&1 || \ ! $contains '\-i' $mansrc/man1/cc.1 >/dev/null 2>&1; then dflt='-i' else dflt='none' *************** *** 851,857 **** unsplit='' ;; *large*|*small*|*medium*|*huge*) ! case "$model" in *large*) case "$large" in '') dflt='-Ml';; --- 936,942 ---- unsplit='' ;; *large*|*small*|*medium*|*huge*) ! case "$models" in *large*) case "$large" in '') dflt='-Ml';; *************** *** 867,873 **** ;; *) large='';; esac ! case "$model" in *huge*) case "$huge" in '') dflt='-Mh';; --- 952,958 ---- ;; *) large='';; esac ! case "$models" in *huge*) case "$huge" in '') dflt='-Mh';; *************** *** 883,889 **** ;; *) huge="$large";; esac ! case "$model" in *medium*) case "$medium" in '') dflt='-Mm';; --- 968,974 ---- ;; *) huge="$large";; esac ! case "$models" in *medium*) case "$medium" in '') dflt='-Mm';; *************** *** 899,905 **** ;; *) medium="$large";; esac ! case "$model" in *small*) case "$small" in '') dflt='none';; --- 984,990 ---- ;; *) medium="$large";; esac ! case "$models" in *small*) case "$small" in '') dflt='none';; *************** *** 948,954 **** *) 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 --- 1033,1039 ---- *) 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 *************** *** 974,979 **** --- 1059,1090 ---- gcc*) cpp=`loc gcc-cpp $cpp $pth`;; esac + : determine optimize, if desired, or use for debug flag also + case "$optimize" in + ' ') dflt="none" + ;; + '') dflt="-O"; + ;; + *) 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? [$dflt]" + $echo $n "$rp $c" + . myread + optimize="$ans" + case "$optimize" in + 'none') optimize=" " + ;; + esac + case "$ccflags" in '') dflt='none';; *) dflt="$ccflags";; *************** *** 997,1003 **** *) dflt="$ldflags";; esac echo " " ! rp="Any additional ld flags (such as libraries)? [$dflt]" $echo $n "$rp $c" . myread case "$ans" in --- 1108,1114 ---- *) dflt="$ldflags";; esac echo " " ! rp="Any additional ld flags (NOT including libraries)? [$dflt]" $echo $n "$rp $c" . myread case "$ans" in *************** *** 1006,1016 **** ldflags="$ans" rmlist="$rmlist pdp11" ! : check for ordering of bytes in a long echo " " case "$byteorder" in '') ! echo "Checking to see how your bytes are ordered..." $cat >try.c <<'EOCP' #include <stdio.h> main() --- 1117,1160 ---- ldflags="$ans" rmlist="$rmlist pdp11" ! case "$libs" in ! '') dflt='none';; ! *) dflt="$libs";; ! 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. ! EOM ! echo " " + rp="Any additional libraries? [$dflt]" + $echo $n "$rp $c" + . myread + case "$ans" in + none) ans=''; + esac + libs="$ans" + + : check for ordering of bytes in a long case "$byteorder" in '') ! cat <<'EOM' ! ! In the following, larger digits indicate more significance. A big-endian ! machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A ! little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other ! machines may have weird orders like 3412. If the test program works the ! default is probably right. I'm now running the test program... ! EOM $cat >try.c <<'EOCP' #include <stdio.h> main() *************** *** 1027,1032 **** --- 1171,1180 ---- EOCP if $cc try.c -o try >/dev/null 2>&1 ; then dflt=`try` + case "$dflt" in + ????) echo "(The test program ran ok.)";; + *) echo "(The test program didn't run right for some reason.)";; + esac else dflt='4321' echo "(I can't seem to compile the test program. Guessing big-endian...)" *************** *** 1033,1038 **** --- 1181,1187 ---- fi ;; *) + echo " " dflt="$byteorder" ;; esac *************** *** 1134,1139 **** --- 1283,1298 ---- fi rm -f testcpp.c testcpp.out + : see if bcmp exists + echo " " + if $contains '^bcmp$' libc.list >/dev/null 2>&1; then + echo 'bcmp() found.' + d_bcmp="$define" + else + echo 'bcmp() not found.' + d_bcmp="$undef" + fi + : see if bcopy exists echo " " if $contains '^bcopy$' libc.list >/dev/null 2>&1; then *************** *** 1149,1155 **** cat >.ucbsprf.c <<'EOF' main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); } EOF ! if $cc .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then echo "Your sprintf() returns (int)." d_charsprf="$undef" else --- 1308,1314 ---- cat >.ucbsprf.c <<'EOF' main() { char buf[10]; exit((unsigned long)sprintf(buf,"%s","foo") > 10L); } EOF ! if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then echo "Your sprintf() returns (int)." d_charsprf="$undef" else *************** *** 1158,1173 **** fi /bin/rm -f .ucbsprf.c .ucbsprf : see if crypt exists echo " " if $contains '^crypt$' libc.list >/dev/null 2>&1; then echo 'crypt() found.' d_crypt="$define" else ! echo 'crypt() not found.' ! d_crypt="$undef" fi : now see if they want to do setuid emulation case "$d_dosuid" in '') dflt=n;; --- 1317,1403 ---- fi /bin/rm -f .ucbsprf.c .ucbsprf + : see if vprintf exists + echo " " + if $contains '^vprintf$' libc.list >/dev/null 2>&1; then + echo 'vprintf() found.' + d_vprintf="$define" + cat >.ucbsprf.c <<'EOF' + #include <varargs.h> + + main() { xxx("foo"); } + + xxx(va_alist) + va_dcl + { + va_list args; + char buf[10]; + + va_start(args); + exit((unsigned long)vsprintf(buf,"%s",args) > 10L); + } + EOF + if $cc $ccflags .ucbsprf.c -o .ucbsprf >/dev/null 2>&1 && .ucbsprf; then + echo "Your vsprintf() returns (int)." + d_charvspr="$undef" + else + echo "Your vsprintf() returns (char*)." + d_charvspr="$define" + fi + /bin/rm -f .ucbsprf.c .ucbsprf + else + echo 'vprintf() not found.' + d_vprintf="$undef" + d_charvspr="$undef" + fi + : see if crypt exists echo " " if $contains '^crypt$' libc.list >/dev/null 2>&1; then echo 'crypt() found.' d_crypt="$define" + cryptlib='' else ! cryptlib=`loc Slibcrypt.a "" /lib/386 /lib` ! if $test -z "$cryptlib"; then ! cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib` ! else ! cryptlib=-lcrypt ! fi ! if $test -z "$cryptlib"; then ! cryptlib=`loc Llibcrypt.a "" /lib/386 /lib` ! else ! cryptlib=-lcrypt ! fi ! if $test -z "$cryptlib"; then ! cryptlib=`loc libcrypt.a "" $libpth` ! else ! cryptlib=-lcrypt ! fi ! if $test -z "$cryptlib"; then ! echo 'crypt() not found.' ! d_crypt="$undef" ! else ! d_crypt="$define" ! fi fi + : see if this is a dirent system + echo " " + if $test -r /usr/include/dirent.h ; then + i_dirent="$define" + echo "dirent.h found." + if $contains 'd_namlen' /usr/include/sys/dirent.h >/dev/null 2>&1; then + d_dirnamlen="$define" + else + d_dirnamlen="$undef" + fi + else + i_dirent="$undef" + d_dirnamlen="$define" + echo "No dirent.h found." + fi + : now see if they want to do setuid emulation case "$d_dosuid" in '') dflt=n;; *************** *** 1194,1199 **** --- 1424,1439 ---- *) d_dosuid="$undef";; esac + : see if dup2 exists + echo " " + if $contains '^dup2$' libc.list >/dev/null 2>&1; then + echo 'dup2() found.' + d_dup2="$define" + else + echo 'dup2() not found.' + d_dup2="$undef" + fi + : see if fchmod exists echo " " if $contains '^fchmod$' libc.list >/dev/null 2>&1; then *************** *** 1244,1249 **** --- 1484,1499 ---- d_getgrps="$undef" fi + : see if gethostent exists + echo " " + if $contains '^gethostent$' libc.list >/dev/null 2>&1; then + echo 'gethostent() found.' + d_gethent="$define" + else + echo 'gethostent() not found.' + d_gethent="$undef" + fi + : see if getpgrp exists echo " " if $contains '^getpgrp$' libc.list >/dev/null 2>&1; then *************** *** 1324,1329 **** --- 1574,1589 ---- d_killpg="$undef" fi + : see if memcmp exists + echo " " + if $contains '^memcmp$' libc.list >/dev/null 2>&1; then + echo 'memcmp() found.' + d_memcmp="$define" + else + echo 'memcmp() not found.' + d_memcmp="$undef" + fi + : see if memcpy exists echo " " if $contains '^memcpy$' libc.list >/dev/null 2>&1; then *************** *** 1346,1352 **** : see if ndbm is available echo " " ! if $test -r /usr/include/ndbm.h ; then d_ndbm="$define" echo "ndbm.h found." else --- 1606,1612 ---- : see if ndbm is available echo " " ! if $test -r /usr/include/ndbm.h || $test -r /usr/local/include/ndbm.h; then d_ndbm="$define" echo "ndbm.h found." else *************** *** 1364,1369 **** --- 1624,1661 ---- echo "dbm.h not found." fi + : see if this is an pwd system + echo " " + if $test -r /usr/include/pwd.h ; then + i_pwd="$define" + echo "pwd.h found." + if $contains 'pw_quota' /usr/include/pwd.h >/dev/null 2>&1; then + d_pwquota="$define" + else + d_pwquota="$undef" + fi + if $contains 'pw_age' /usr/include/pwd.h >/dev/null 2>&1; then + d_pwage="$define" + else + d_pwage="$undef" + fi + else + i_pwd="$undef" + d_pwquota="$undef" + d_pwage="$undef" + echo "No pwd.h found." + fi + + : see if readdir exists + echo " " + if $contains '^readdir$' libc.list >/dev/null 2>&1; then + echo 'readdir() found.' + d_readdir="$define" + else + echo 'readdir() not found.' + d_readdir="$undef" + fi + : see if rename exists echo " " if $contains '^rename$' libc.list >/dev/null 2>&1; then *************** *** 1515,1520 **** --- 1807,1817 ---- fi fi fi + if $contains socketpair libc.list >/dev/null 2>&1; then + d_sockpair="$define" + else + d_sockpair="$undef" + fi : see if stat knows about block sizes echo " " *************** *** 1578,1583 **** --- 1875,1890 ---- d_symlink="$undef" fi + : see if syscall exists + echo " " + if $contains '^syscall$' libc.list >/dev/null 2>&1; then + echo 'syscall() found.' + d_syscall="$define" + else + echo 'syscall() not found.' + d_syscall="$undef" + fi + : see if struct tm is defined in sys/time.h echo " " if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then *************** *** 1624,1639 **** d_voidsig="$undef" fi - : see if vprintf exists - echo " " - if $contains '^vprintf$' libc.list >/dev/null 2>&1; then - echo 'vprintf() found.' - d_vprintf="$define" - else - echo 'vprintf() not found.' - d_vprintf="$undef" - fi - : check for void type echo " " $cat <<EOM --- 1931,1936 ---- *************** *** 1727,1732 **** --- 2024,2079 ---- . myread gidtype="$ans" + : see if this is an fcntl system + echo " " + if $test -r /usr/include/fcntl.h ; then + i_fcntl="$define" + echo "fcntl.h found." + else + i_fcntl="$undef" + echo "No fcntl.h found, but that's ok." + fi + + : see if this is an grp system + echo " " + if $test -r /usr/include/grp.h ; then + i_grp="$define" + echo "grp.h found." + else + i_grp="$undef" + echo "No grp.h found." + fi + + : see if this is a sys/dir.h system + echo " " + if $test -r /usr/include/sys/dir.h ; then + i_sysdir="$define" + echo "sysdir.h found." + else + i_sysdir="$undef" + echo "No sysdir.h found." + fi + + : see if ioctl defs are in sgtty/termio or sys/ioctl + echo " " + if $test -r /usr/include/sys/ioctl.h ; then + i_sysioctl="$define" + echo "sys/ioctl.h found." + else + i_sysioctl="$undef" + echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h." + fi + + : see if this is a varargs system + echo " " + if $test -r /usr/include/varargs.h ; then + i_varargs="$define" + echo "varargs.h found." + else + i_varargs="$undef" + echo "No varargs.h found, but that's ok (I hope)." + fi + : check for length of integer echo " " case "$intsize" in *************** *** 1768,1774 **** $cat <<EOM The $package package has some auxiliary files that should be put in a library ! that is accessible by everyone. Where do you want to put these private" EOM $echo $n "but accessible files? [$dflt] $c" rp="Put private files where? [$dflt]" --- 2115,2121 ---- $cat <<EOM The $package package has some auxiliary files that should be put in a library ! that is accessible by everyone. Where do you want to put these "private" EOM $echo $n "but accessible files? [$dflt] $c" rp="Put private files where? [$dflt]" *************** *** 1893,1898 **** --- 2240,2275 ---- esac fi + : see if we should include -lndir + echo " " + if $test -r /usr/lib/libndir.a || $test -r /usr/local/lib/libndir.a ; then + echo "New directory library found." + libndir='-lndir' + else + ans=`loc libndir.a x $libpth` + case "$ans" in + x) + echo "No ndir library found." + libndir='' + ;; + *) + echo "New directory library found in $ans." + libndir="$ans" + ;; + esac + fi + case "$libndir" in + '') ;; + *) + case "$d_readdir" in + $define) + echo "Since you have readdir in the C library, I'll ignore $libndir" + libndir='' + ;; + esac + ;; + esac + : see if we should include -lnm echo " " if $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then *************** *** 1981,1986 **** --- 2358,2387 ---- mail='$mail' cpp='$cpp' perl='$perl' + emacs='$emacs' + ls='$ls' + rmail='$rmail' + sendmail='$sendmail' + shar='$shar' + smail='$smail' + tbl='$tbl' + troff='$troff' + nroff='$nroff' + uname='$uname' + uuname='$uuname' + line='$line' + chgrp='$chgrp' + chmod='$chmod' + lint='$lint' + sleep='$sleep' + pr='$pr' + tar='$tar' + ln='$ln' + lpr='$lpr' + lp='$lp' + touch='$touch' + make='$make' + date='$date' Log='$Log' Header='$Header' bin='$bin' *************** *** 1988,2002 **** --- 2389,2407 ---- contains='$contains' cppstdin='$cppstdin' cppminus='$cppminus' + d_bcmp='$d_bcmp' d_bcopy='$d_bcopy' d_charsprf='$d_charsprf' d_crypt='$d_crypt' + cryptlib='$cryptlib' d_dosuid='$d_dosuid' + d_dup2='$d_dup2' d_fchmod='$d_fchmod' d_fchown='$d_fchown' d_fcntl='$d_fcntl' d_flock='$d_flock' d_getgrps='$d_getgrps' + d_gethent='$d_gethent' d_getpgrp='$d_getpgrp' d_getprior='$d_getprior' d_htonl='$d_htonl' *************** *** 2003,2012 **** --- 2408,2419 ---- d_index='$d_index' d_ioctl='$d_ioctl' d_killpg='$d_killpg' + d_memcmp='$d_memcmp' d_memcpy='$d_memcpy' d_mkdir='$d_mkdir' d_ndbm='$d_ndbm' d_odbm='$d_odbm' + d_readdir='$d_readdir' d_rename='$d_rename' d_rmdir='$d_rmdir' d_setegid='$d_setegid' *************** *** 2018,2023 **** --- 2425,2431 ---- d_setrgid='$d_setrgid' d_setruid='$d_setruid' d_socket='$d_socket' + d_sockpair='$d_sockpair' d_oldsock='$d_oldsock' socketlib='$socketlib' sockethdr='$sockethdr' *************** *** 2025,2030 **** --- 2433,2439 ---- d_stdstdio='$d_stdstdio' d_strctcpy='$d_strctcpy' d_symlink='$d_symlink' + d_syscall='$d_syscall' d_tminsys='$d_tminsys' i_systime='$i_systime' d_varargs='$d_varargs' *************** *** 2031,2040 **** --- 2440,2461 ---- d_vfork='$d_vfork' d_voidsig='$d_voidsig' d_vprintf='$d_vprintf' + d_charvspr='$d_charvspr' gidtype='$gidtype' + i_dirent='$i_dirent' + d_dirnamlen='$d_dirnamlen' + i_fcntl='$i_fcntl' + i_grp='$i_grp' + i_pwd='$i_pwd' + d_pwquota='$d_pwquota' + d_pwage='$d_pwage' + i_sysdir='$i_sysdir' + i_sysioctl='$i_sysioctl' + i_varargs='$i_varargs' intsize='$intsize' libc='$libc' libdbm='$libdbm' + libndir='$libndir' libnm='$libnm' mallocsrc='$mallocsrc' mallocobj='$mallocobj' *************** *** 2047,2055 **** --- 2468,2478 ---- medium='$medium' large='$large' huge='$huge' + optimize='$optimize' ccflags='$ccflags' ldflags='$ldflags' cc='$cc' + libs='$libs' n='$n' c='$c' package='$package' *************** *** 2126,2133 **** $echo $n "$rp $c" . UU/myread case "$ans" in ! y*) make depend ! echo "Now you must run a make." ;; *) echo "You must run 'make depend' then 'make'." ;; --- 2549,2555 ---- $echo $n "$rp $c" . UU/myread case "$ans" in ! y*) make depend && echo "Now you must run a make." ;; *) echo "You must run 'make depend' then 'make'." ;; diff -c -r beta/MANIFEST gamma/MANIFEST *** beta/MANIFEST Fri Sep 15 16:07:27 1989 --- gamma/MANIFEST Fri Sep 15 16:10:28 1989 *************** *** 62,72 **** handy.h Handy definitions hash.c Associative arrays hash.h Public declarations for the above - hdef Build database of .h definition locations ioctl.pl Sample ioctl.pl lib/complete.pl A command completion subroutine lib/dumpvar.pl A variable dumper lib/getopt.pl Perl library supporting option parsing lib/importenv.pl Perl routine to get environment into variables lib/perldb.pl Perl debugging routines lib/stat.pl Perl library supporting stat function --- 62,72 ---- handy.h Handy definitions hash.c Associative arrays hash.h Public declarations for the above ioctl.pl Sample ioctl.pl lib/complete.pl A command completion subroutine lib/dumpvar.pl A variable dumper lib/getopt.pl Perl library supporting option parsing + lib/getopts.pl Perl library supporting option parsing lib/importenv.pl Perl routine to get environment into variables lib/perldb.pl Perl debugging routines lib/stat.pl Perl library supporting stat function *************** *** 76,82 **** makedir.SH Precursor to makedir makelib.SH A thing to turn C .h file into perl .h files malloc.c A version of malloc you might not want - munch Try to make some .h equivalents patchlevel.h The current patch level of perl perl.h Global declarations perl.man.1 The manual page(s), first fourth --- 76,81 ---- diff -c -r beta/Makefile.SH gamma/Makefile.SH *** beta/Makefile.SH Fri Sep 15 16:07:23 1989 --- gamma/Makefile.SH Fri Sep 15 16:12:05 1989 *************** *** 42,48 **** mallocobj = $mallocobj SLN = $sln ! libs = $libnm -lm $libdbm public = perl taintperl $suidperl --- 42,48 ---- mallocobj = $mallocobj SLN = $sln ! libs = $libnm -lm $libdbm $libs $libndir public = perl taintperl $suidperl *************** *** 102,108 **** # used for all scripts that aren't set-id or running under something set-id. perl: perl.o $(obj) ! $(CC) $(LARGE) $(obj) perl.o $(LDFLAGS) $(libs) -o perl # This version, if specified in Configure, does ONLY those scripts which need # set-id emulation. Suidperl must be setuid root. It contains the "taint" --- 102,108 ---- # used for all scripts that aren't set-id or running under something set-id. perl: perl.o $(obj) ! $(CC) $(LARGE) $(LDFLAGS) $(obj) perl.o $(libs) -o perl # This version, if specified in Configure, does ONLY those scripts which need # set-id emulation. Suidperl must be setuid root. It contains the "taint" *************** *** 110,116 **** # has been invoked correctly. suidperl: tperl.o sperly.o $(tobj) ! $(CC) $(LDFLAGS) $(LARGE) sperly.o $(tobj) tperl.o $(libs) -o suidperl # This version interprets scripts that are already set-id either via a wrapper # or through the kernel allowing set-id scripts (bad idea). Taintperl must --- 110,116 ---- # has been invoked correctly. suidperl: tperl.o sperly.o $(tobj) ! $(CC) $(LARGE) $(LDFLAGS) sperly.o $(tobj) tperl.o $(libs) -o suidperl # This version interprets scripts that are already set-id either via a wrapper # or through the kernel allowing set-id scripts (bad idea). Taintperl must *************** *** 118,124 **** # and normal perl is the presence of the "taint" checks. taintperl: tperl.o tperly.o $(tobj) ! $(CC) $(LDFLAGS) $(LARGE) tperly.o $(tobj) tperl.o $(libs) -o taintperl # Replicating all this junk is yucky, but I don't see a portable way to fix it. --- 118,124 ---- # and normal perl is the presence of the "taint" checks. taintperl: tperl.o tperly.o $(tobj) ! $(CC) $(LARGE) $(LDFLAGS) tperly.o $(tobj) tperl.o $(libs) -o taintperl # Replicating all this junk is yucky, but I don't see a portable way to fix it. *************** *** 252,261 **** config.h arg.h $(CC) -c $(CFLAGS) $(LARGE) perl.c - # if a .h file depends on another .h file... - $(h): - touch $@ - perl.man: perl.man.1 perl.man.2 perl.man.3 perl.man.4 ./perl -e '($$r,$$p)=$$]=~/(\d+\.\d+).*\n\D*(\d+)/;' \ -e 'print ".ds RP Release $$r Patchlevel $$p\n";' >perl.man --- 252,257 ---- *************** *** 306,315 **** cd x2p; $(MAKE) clean realclean: rm -f perl *.orig */*.orig *~ */*~ *.o core $(addedbyconf) perl.man rm -f perl.c perly.h t/perl Makefile config.h makedepend makedir rm -f x2p/Makefile - cd x2p; $(MAKE) realclean # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. --- 302,311 ---- cd x2p; $(MAKE) clean realclean: + cd x2p; $(MAKE) realclean rm -f perl *.orig */*.orig *~ */*~ *.o core $(addedbyconf) perl.man rm -f perl.c perly.h t/perl Makefile config.h makedepend makedir rm -f x2p/Makefile # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed.