Path: utzoo!mnetor!uunet!bbn.com!rsalz From: rsalz@bbn.com (Rich Salz) Newsgroups: comp.sources.unix Subject: v13i011: Perl patches 1 to 5, Patch1-Patch5 Message-ID: <364@fig.bbn.com> Date: 3 Feb 88 18:57:43 GMT Organization: BBN Laboratories Inc., Cambridge MA Lines: 1703 Approved: rsalz@uunet.UU.NET Submitted-by: Rich $alz Posting-number: Volume 13, Issue 11 Archive-name: perl/patches1-5 This is the first of two files containing the first 10 official patches to perl. They are copies of the articles as I received them on my machine. When you unpack this you will get five separate patch files, each of which will have to be fed through patch. Make sure to install all 10 patches. /r$ #! /bin/sh PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'patch1' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patch1'\" else echo shar: Extracting \"'patch1'\" \(20256 characters\) sed "s/^X//" >'patch1' <<'END_OF_FILE' XFrom bbn.com!bbn!uwmcsd1!ig!agate!pasteur!ames!elroy!devvax!lroot Fri Jan 22 10:05:19 EST 1988 XArticle 659 of comp.sources.bugs: XPath: bbn.com!bbn!uwmcsd1!ig!agate!pasteur!ames!elroy!devvax!lroot X>From: lroot@devvax.JPL.NASA.GOV (The Superuser) XNewsgroups: comp.sources.bugs XSubject: perl 1.0 patch #1 XSummary: This is an official patch for perl 1.0. Please apply it. XMessage-ID: <1093@devvax.JPL.NASA.GOV> XDate: 22 Jan 88 06:24:35 GMT XOrganization: Jet Propulsion Laboratory, Pasadena, CA XLines: 715 X XSystem: perl version 1.0 XPatch #: 1 XPriority: MEDIUM XSubject: Portability bugs and one possible SIGSEGV X>From: Dan Faigin, Doug Landauer X XDescription: X On some systems the Configure script and C compilations get X warning messages that may scare some folks unnecessarily. X X Also, use of the "redo" command if debugging is compiled in X overflows a stack on which the trace context is kept. X XFix: From rn, say "| patch -d DIR", where DIR is your perl source X directory. Outside of rn, say "cd DIR; patch #define PATCHLEVEL 1 X XIndex: Configure XPrereq: 1.0 X*** Configure.old Thu Jan 21 22:20:21 1988 X*** Configure Thu Jan 21 22:20:22 1988 X*************** X*** 8,14 **** X # and edit it to reflect your system. Some packages may include samples X # of config.h for certain machines, so you might look for one of those.) X # X! # $Header: Configure,v 1.0 87/12/18 15:05:56 root Exp $ X # X # Yes, you may rip this off to use in other distribution packages. X # (Note: this Configure script was generated automatically. Rather than X--- 8,14 ---- X # and edit it to reflect your system. Some packages may include samples X # of config.h for certain machines, so you might look for one of those.) X # X! # $Header: Configure,v 1.0.1.1 88/01/21 21:21:47 root Exp $ X # X # Yes, you may rip this off to use in other distribution packages. X # (Note: this Configure script was generated automatically. Rather than X*************** X*** 67,76 **** X--- 67,79 ---- X cc='' X contains='' X cpp='' X+ cppminus='' X d_charsprf='' X d_index='' X+ d_stdstdio='' X d_strctcpy='' X d_vfork='' X+ d_voidsig='' X libc='' X libnm='' X mansrc='' X*************** X*** 90,95 **** X--- 93,99 ---- X shsharp='' X sharpbang='' X startsh='' X+ stdchar='' X voidflags='' X defvoidused='' X CONFIG='' X*************** X*** 110,116 **** X trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3 X attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr" X attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200" X! attrlist="$attrlist ns32000 ns16000 iAPX286" X pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib" X defvoidused=7 X X--- 114,120 ---- X trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3 X attrlist="mc68000 sun gcos unix ibm gimpel interdata tss os mert pyr" X attrlist="$attrlist vax pdp11 i8086 z8000 u3b2 u3b5 u3b20 u3b200" X! attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc" X pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /etc /usr/lib" X defvoidused=7 X X*************** X*** 200,207 **** X X Much effort has been expended to ensure that this shell script will run X on any Unix system. If despite that it blows up on you, your best bet is X! to edit Configure and run it again. Also, let me (lwall@sdcrdcf.UUCP) know X! how I blew it. If you can't run Configure for some reason, you'll have X to generate a config.sh file by hand. X X This installation script affects things in two ways: 1) it may do direct X--- 204,211 ---- X X Much effort has been expended to ensure that this shell script will run X on any Unix system. If despite that it blows up on you, your best bet is X! to edit Configure and run it again. Also, let me (lwall@jpl-devvax.jpl.nasa.gov) X! know how I blew it. If you can't run Configure for some reason, you'll have X to generate a config.sh file by hand. X X This installation script affects things in two ways: 1) it may do direct X*************** X*** 546,551 **** X--- 550,643 ---- X fi X rm -f try today X X+ : see how we invoke the C preprocessor X+ echo " " X+ echo "Now, how can we feed standard input to your C preprocessor..." X+ cat <<'EOT' >testcpp.c X+ #define ABC abc X+ #define XYZ xyz X+ ABC.XYZ X+ EOT X+ echo 'Maybe "/lib/cpp" will work...' X+ /lib/cpp testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Yup, it does." X+ cpp='/lib/cpp' X+ cppminus=''; X+ else X+ echo 'Nope, maybe "/lib/cpp -" will work...' X+ /lib/cpp - testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Yup, it does." X+ cpp='/lib/cpp' X+ cppminus='-'; X+ else X+ echo 'No such luck...maybe "cc -E" will work...' X+ cc -E testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "It works!" X+ cpp='cc -E' X+ cppminus=''; X+ else X+ echo 'Nixed again...maybe "cc -E -" will work...' X+ cc -E - testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Hooray, it works! I was beginning to wonder." X+ cpp='cc -E' X+ cppminus='-'; X+ else X+ echo 'Nope...maybe "cc -P" will work...' X+ cc -P testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Yup, that does." X+ cpp='cc -P' X+ cppminus=''; X+ else X+ echo 'Nope...maybe "cc -P -" will work...' X+ cc -P - testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Yup, that does." X+ cpp='cc -P' X+ cppminus='-'; X+ else X+ echo 'Hmm...perhaps you already told me...' X+ case "$cpp" in X+ '') ;; X+ *) $cpp $cppminus testcpp.out 2>&1;; X+ esac X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Hooray, you did! I was beginning to wonder." X+ else X+ echo 'Uh-uh. Time to get fancy...' X+ echo 'Trying (cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)' X+ cpp='(cat >/tmp/$$.c; cc -E /tmp/$$.c; rm /tmp/$$.c)' X+ cppminus=''; X+ $cpp testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "Eureka!." X+ else X+ dflt=blurfl X+ $echo $n "No dice. I can't find a C preprocessor. Name one: $c" X+ rp='Name a C preprocessor:' X+ . myread X+ cpp="$ans" X+ $cpp testcpp.out 2>&1 X+ if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X+ echo "OK, that will do." X+ else X+ echo "Sorry, I can't get that to work. Go find one." X+ exit 1 X+ fi X+ fi X+ fi X+ fi X+ fi X+ fi X+ fi X+ fi X+ fi X+ rm -f testcpp.c testcpp.out X+ X : see if sprintf is declared as int or pointer to char X echo " " X if $contains 'char.*sprintf' /usr/include/stdio.h >/dev/null 2>&1 ; then X*************** X*** 579,584 **** X--- 671,691 ---- X esac X fi X X+ : see if stdio is really std X+ echo " " X+ if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then X+ if $contains '_cnt;' /usr/include/stdio.h >/dev/null 2>&1 ; then X+ echo "Your stdio is pretty std." X+ d_stdstdio="$define" X+ else X+ echo "Your stdio isn't very std." X+ d_stdstdio="$undef" X+ fi X+ else X+ echo "Your stdio isn't very std." X+ d_stdstdio="$undef" X+ fi X+ X : check for structure copying X echo " " X echo "Checking to see if your C compiler can copy structs..." X*************** X*** 611,616 **** X--- 718,733 ---- X d_vfork="$define" X fi X X+ : see if signal is declared as pointer to function returning int or void X+ echo " " X+ if $contains 'void.*signal' /usr/include/signal.h >/dev/null 2>&1 ; then X+ echo "You have void (*signal())() instead of int." X+ d_voidsig="$define" X+ else X+ echo "You have int (*signal())() instead of void." X+ d_voidsig="$undef" X+ fi X+ X : check for void type X echo " " X $cat </dev/null 2>&1 ; then X+ echo "Your stdio uses unsigned chars." X+ stdchar="unsigned char" X+ else X+ echo "Your stdio uses signed chars." X+ stdchar="char" X+ fi X+ X : preserve RCS keywords in files with variable substitution, grrr X Log='$Log' X Header='$Header' X*************** X*** 793,853 **** X ;; X esac X X- : see how we invoke the C preprocessor X- echo " " X- echo "Checking to see how your C preprocessor is invoked..." X- cat <<'EOT' >testcpp.c X- #define ABC abc X- #define XYZ xyz X- ABC.XYZ X- EOT X- echo 'Maybe "cc -E" will work...' X- cc -E testcpp.c >testcpp.out 2>&1 X- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X- echo "Yup, it does." X- cpp='cc -E' X- else X- echo 'Nope...maybe "cc -P" will work...' X- cc -P testcpp.c >testcpp.out 2>&1 X- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X- echo "Yup, that does." X- cpp='cc -P' X- else X- echo 'Nixed again...maybe "/lib/cpp" will work...' X- /lib/cpp testcpp.c >testcpp.out 2>&1 X- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X- echo "Hooray, it works! I was beginning to wonder." X- cpp='/lib/cpp' X- else X- echo 'Hmm...maybe you already told me...' X- case "$cpp" in X- '') ;; X- *) $cpp testcpp.c >testcpp.out 2>&1;; X- esac X- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X- echo "Hooray, you did! I was beginning to wonder." X- else X- dflt=blurfl X- $echo $n "Nope. I can't find a C preprocessor. Name one: $c" X- rp='Name a C preprocessor:' X- . myread X- cpp="$ans" X- $cpp testcpp.c >testcpp.out 2>&1 X- if $contains 'abc.xyz' testcpp.out >/dev/null 2>&1 ; then X- echo "OK, that will do." X- else X- echo "Sorry, I can't get that to work. Go find one." X- exit 1 X- fi X- fi X- fi X- fi X- fi X- rm -f testcpp.c testcpp.out X- X : get C preprocessor symbols handy X echo " " X! echo $attrlist | $tr '[ ]' '[\012]' >Cppsym.know X $cat <Cppsym X $startsh X case "\$1" in X--- 920,928 ---- X ;; X esac X X : get C preprocessor symbols handy X echo " " X! echo $attrlist | $tr '[ - ]' '[\012-\012]' >Cppsym.know X $cat <Cppsym X $startsh X case "\$1" in X*************** X*** 874,886 **** X case \$# in X 0) exit 1;; X esac X! echo \$* | $tr '[ ]' '[\012]' | $sed -e 's/\(.*\)/\\ X #ifdef \1\\ X exit 0; _ _ _ _\1\\ \1\\ X #endif\\ X /' >/tmp/Cppsym\$\$ X echo exit 1 >>/tmp/Cppsym\$\$ X! $cpp /tmp/Cppsym\$\$ >/tmp/Cppsym2\$\$ X case "\$list" in X true) awk '\$6 != "" {print substr(\$6,2,100)}' /tmp/Cppsym\$\$ X echo exit 1 >>/tmp/Cppsym\$\$ X! $cpp $cppminus /tmp/Cppsym2\$\$ X case "\$list" in X true) awk '\$6 != "" {print substr(\$6,2,100)}' = 6 registers) */ X int i; X int bpx; X int obpx; X--- 321,328 ---- X X register char *bp; /* we're going to steal some values */ X register int cnt; /* from the stdio struct and put EVERYTHING */ X! register STDCHAR *ptr; /* in the innermost loop into registers */ X! register char newline = record_separator;/* (assuming >= 6 registers) */ X int i; X int bpx; X int obpx; X X END_OF_FILE if test 20256 -ne `wc -c <'patch1'`; then echo shar: \"'patch1'\" unpacked with wrong size! fi # end of 'patch1' fi if test -f 'patch2' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'patch2'\" else echo shar: Extracting \"'patch2'\" \(14926 characters\) sed "s/^X//" >'patch2' <<'END_OF_FILE' XPath: bbn.com!bbn!husc6!cmcl2!nrl-cmf!ames!elroy!devvax!lroot XFrom: lroot@devvax.JPL.NASA.GOV (The Superuser) XNewsgroups: comp.sources.bugs XSubject: perl 1.0 patch #2 XSummary: This is an official patch for perl 1.0. Please apply it. XMessage-ID: <1144@devvax.JPL.NASA.GOV> XDate: 24 Jan 88 12:21:57 GMT XOrganization: Jet Propulsion Laboratory, Pasadena, CA XLines: 583 X XSystem: perl version 1.0 XPatch #: 2 XPriority: HIGH XSubject: Various portability fixes. XFrom: Keith Waclena XFrom: isis!aburt (Andrew Burt) X XDescription: X Some things didn't work right on System V and Pyramids. X XFix: From rn, say "| patch -p0 -d DIR", where DIR is your perl source X ^^^ X directory. Outside of rn, say "cd DIR; patch -p0 >>>> *** NOTE: YOU MUST USE -p0 WITH PATCH OR IT WON'T WORK RIGHT *** <<<<< X X If patch indicates that patchlevel is the wrong version, you may need X to apply one or more previous patches, or the patch may already X have been applied. See the patchlevel.h file to find out what has or X has not been applied. In any event, don't continue with the patch. X X If you are missing previous patches they can be obtained from me: X X Larry Wall X lwall@jpl-devvax.jpl.nasa.gov X X If you send a mail message of the following form it will greatly speed X processing: X X Subject: Command X @SH mailpatch PATH perl 1.0 LIST X ^ note the c X X where PATH is a return path FROM ME TO YOU in Internet notation, and X LIST is the number of one or more patches you need, separated by spaces, X commas, and/or hyphens. Saying 35- says everything from 35 to the end. X X You can also get the patches via anonymous FTP from X jpl-devvax.jpl.nasa.gov (128.149.8.43). X XIndex: patchlevel.h XPrereq: 1 X1c1 X< #define PATCHLEVEL 1 X--- X> #define PATCHLEVEL 2 X XIndex: Configure XPrereq: 1.0.1.1 X*** Configure.old Sun Jan 24 03:57:22 1988 X--- Configure Sun Jan 24 03:57:24 1988 X*************** X*** 8,14 **** X # and edit it to reflect your system. Some packages may include samples X # of config.h for certain machines, so you might look for one of those.) X # X! # $Header: Configure,v 1.0.1.1 88/01/21 21:21:47 root Exp $ X # X # Yes, you may rip this off to use in other distribution packages. X # (Note: this Configure script was generated automatically. Rather than X--- 8,14 ---- X # and edit it to reflect your system. Some packages may include samples X # of config.h for certain machines, so you might look for one of those.) X # X! # $Header: Configure,v 1.0.1.2 88/01/24 03:51:55 root Exp $ X # X # Yes, you may rip this off to use in other distribution packages. X # (Note: this Configure script was generated automatically. Rather than X*************** X*** 68,77 **** X--- 68,80 ---- X contains='' X cpp='' X cppminus='' X+ d_bcopy='' X d_charsprf='' X d_index='' X+ d_statblks='' X d_stdstdio='' X d_strctcpy='' X+ d_tminsys='' X d_vfork='' X d_voidsig='' X libc='' X*************** X*** 638,643 **** X--- 641,656 ---- X fi X rm -f testcpp.c testcpp.out X X+ : see if bcopy exists X+ echo " " X+ if $contains bcopy libc.list >/dev/null 2>&1; then X+ echo 'bcopy() found.' X+ d_bcopy="$define" X+ else X+ echo 'bcopy() not found.' X+ d_bcopy="$undef" X+ fi X+ X : see if sprintf is declared as int or pointer to char X echo " " X if $contains 'char.*sprintf' /usr/include/stdio.h >/dev/null 2>&1 ; then X*************** X*** 671,676 **** X--- 684,704 ---- X esac X fi X X+ : see if stat knows about block sizes X+ echo " " X+ if $contains 'st_blocks;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then X+ if $contains 'st_blksize;' /usr/include/sys/stat.h >/dev/null 2>&1 ; then X+ echo "Your stat knows about block sizes." X+ d_statblks="$define" X+ else X+ echo "Your stat doesn't know about block sizes." X+ d_statblks="$undef" X+ fi X+ else X+ echo "Your stat doesn't know about block sizes." X+ d_statblks="$undef" X+ fi X+ X : see if stdio is really std X echo " " X if $contains 'char.*_ptr;' /usr/include/stdio.h >/dev/null 2>&1 ; then X*************** X*** 708,713 **** X--- 736,751 ---- X fi X $rm -f try.* X X+ : see if struct tm is defined in sys/time.h X+ echo " " X+ if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then X+ echo "You have struct tm defined in rather than ." X+ d_tminsys="$undef" X+ else X+ echo "You have struct tm defined in rather than ." X+ d_tminsys="$define" X+ fi X+ X : see if there is a vfork X echo " " X if $contains vfork libc.list >/dev/null 2>&1 ; then X*************** X*** 1260,1269 **** X--- 1298,1310 ---- X contains='$contains' X cpp='$cpp' X cppminus='$cppminus' X+ d_bcopy='$d_bcopy' X d_charsprf='$d_charsprf' X d_index='$d_index' X+ d_statblks='$d_statblks' X d_stdstdio='$d_stdstdio' X d_strctcpy='$d_strctcpy' X+ d_tminsys='$d_tminsys' X d_vfork='$d_vfork' X d_voidsig='$d_voidsig' X libc='$libc' X XIndex: Makefile.SH XPrereq: 1.0 X*** Makefile.SH.old Sun Jan 24 03:58:02 1988 X--- Makefile.SH Sun Jan 24 03:58:03 1988 X*************** X*** 14,28 **** X esac X echo "Extracting Makefile (with variable substitutions)" X cat >Makefile <Makefile <) { X if ($verbose) { X--- 14,42 ---- X @ARGV = split(/[ \n]/,`echo base.* comp.* cmd.* io.* op.*`); X } X X+ open(config,"../config.sh"); X+ while () { X+ if (/sharpbang='(.*)'/) { X+ $sharpbang = ($1 eq '#!'); X+ last; X+ } X+ } X $bad = 0; X while ($test = shift) { X print "$test..."; X! if ($sharpbang) { X! open(results,"$test|") || (print "can't run.\n"); X! } else { X! open(script,"$test") || die "Can't run $test"; X! $_ =