Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!elroy!devvax!lroot From: lroot@devvax.JPL.NASA.GOV (The Superuser) Newsgroups: comp.sources.bugs Subject: perl 1.0 patch #13 Message-ID: <1209@devvax.JPL.NASA.GOV> Date: 2 Feb 88 19:43:03 GMT Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 470 Summary: This is an official patch for perl 1.0. Please apply it. System: perl version 1.0 Patch #: 13 Priority: MEDIUM-HIGH for 20 minutes, then simmer 3 hours Subject: fix for faulty patch 12, plus random portability glitches From: pwcmrd!skipnyc!skip (Skip Gilbrech) From: kyrimis@Princeton.EDU (Kriton Kyrimis) Description: I botched patch #12, so that split(' ') only works on the first line of input due to unintended interference by the optimization that was added at the same time. Yes, I tested it, but only on one line of input. *Sigh* Some glitches have turned up on some of the rusty pig iron out there, so here are some unglitchifications. Fix: From rn, say "| patch -p0 -d DIR", where DIR is your perl source ^^^ directory. Outside of rn, say "cd DIR; patch -p0 #define PATCHLEVEL 13 Index: Configure Prereq: 1.0.1.5 *** Configure.old Tue Feb 2 11:27:30 1988 --- Configure Tue Feb 2 11:27:33 1988 *************** *** 8,14 **** # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # ! # $Header: Configure,v 1.0.1.5 88/01/30 09:21:20 root Exp $ # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than --- 8,14 ---- # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # ! # $Header: Configure,v 1.0.1.6 88/02/02 11:20:07 root Exp $ # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than *************** *** 70,79 **** --- 70,81 ---- cppminus='' d_bcopy='' d_charsprf='' + d_crypt='' d_index='' d_statblks='' d_stdstdio='' d_strctcpy='' + d_symlink='' d_tminsys='' d_vfork='' d_voidsig='' *************** *** 664,669 **** --- 666,681 ---- d_charsprf="$undef" fi + : 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 + : index or strcpy echo " " dflt=y *************** *** 1233,1238 **** --- 1245,1260 ---- cc=cc fi + : see if symlink exists + echo " " + if $contains symlink libc.list >/dev/null 2>&1; then + echo 'symlink() found.' + d_symlink="$define" + else + echo 'symlink() not found.' + d_symlink="$undef" + fi + : see if we should include -lnm echo " " if $test -r /usr/lib/libnm.a || $test -r /usr/local/lib/libnm.a ; then *************** *** 1328,1337 **** --- 1350,1361 ---- cppminus='$cppminus' d_bcopy='$d_bcopy' d_charsprf='$d_charsprf' + d_crypt='$d_crypt' d_index='$d_index' d_statblks='$d_statblks' d_stdstdio='$d_stdstdio' d_strctcpy='$d_strctcpy' + d_symlink='$d_symlink' d_tminsys='$d_tminsys' d_vfork='$d_vfork' d_voidsig='$d_voidsig' Index: Makefile.SH Prereq: 1.0.1.4 *** Makefile.SH.old Tue Feb 2 11:27:47 1988 --- Makefile.SH Tue Feb 2 11:27:48 1988 *************** *** 12,22 **** case "$0" in */*) cd `expr X$0 : 'X\(.*\)/'` ;; esac echo "Extracting Makefile (with variable substitutions)" cat >Makefile <Makefile <.clist --- 162,168 ---- test: perl chmod 755 t/TEST t/base.* t/comp.* t/cmd.* t/io.* t/op.* ! cd t && (rm -f perl; $(SLN) ../perl .) && ./perl TEST clist: echo $(c) | tr ' ' '\012' >.clist Index: arg.c Prereq: 1.0.1.6 *** arg.c.old Tue Feb 2 11:28:00 1988 --- arg.c Tue Feb 2 11:28:04 1988 *************** *** 1,6 **** ! /* $Header: arg.c,v 1.0.1.6 88/02/01 17:32:26 root Exp $ * * $Log: arg.c,v $ * Revision 1.0.1.6 88/02/01 17:32:26 root * patch12: made split(' ') behave like awk in ignoring leading white space. * --- 1,9 ---- ! /* $Header: arg.c,v 1.0.1.7 88/02/02 11:22:19 root Exp $ * * $Log: arg.c,v $ + * Revision 1.0.1.7 88/02/02 11:22:19 root + * patch13: fixed split(' ') to work right second time. Added CRYPT dependency. + * * Revision 1.0.1.6 88/02/01 17:32:26 root * patch12: made split(' ') behave like awk in ignoring leading white space. * *************** *** 225,231 **** m = str_get(eval(spat->spat_runtime,Null(STR***))); if (!*m || (*m == ' ' && !m[1])) { m = "[ \\t\\n]+"; ! while (isspace(*s)) s++; } if (spat->spat_runtime->arg_type == O_ITEM && spat->spat_runtime[1].arg_type == A_SINGLE) { --- 228,234 ---- m = str_get(eval(spat->spat_runtime,Null(STR***))); if (!*m || (*m == ' ' && !m[1])) { m = "[ \\t\\n]+"; ! spat->spat_flags |= SPAT_SKIPWHITE; } if (spat->spat_runtime->arg_type == O_ITEM && spat->spat_runtime[1].arg_type == A_SINGLE) { *************** *** 251,256 **** --- 254,263 ---- if (!ary) myarray = ary = anew(); ary->ary_fill = -1; + if (spat->spat_flags & SPAT_SKIPWHITE) { + while (isspace(*s)) + s++; + } while (*s && (m = execute(&spat->spat_compex, s, (iters == 0), 1))) { if (spat->spat_compex.numsubs) s = spat->spat_compex.subbase; *************** *** 1952,1959 **** --- 1959,1971 ---- retary = Null(STR***); /* do_stat already did retary */ goto donumset; case O_CRYPT: + #ifdef CRYPT tmps = str_get(sarg[1]); str_set(str,crypt(tmps,str_get(sarg[2]))); + #else + fatal( + "The crypt() function is unimplemented due to excessive paranoia."); + #endif break; case O_EXP: value = exp(str_gnum(sarg[1])); Index: config.h.SH *** config.h.SH.old Tue Feb 2 11:28:14 1988 --- config.h.SH Tue Feb 2 11:28:16 1988 *************** *** 65,70 **** --- 65,76 ---- */ #$d_charsprf CHARSPRINTF /**/ + /* CRYPT: + * This symbol, if defined, indicates that the crypt routine is available + * to encrypt passwords and the like. + */ + #$d_crypt CRYPT /**/ + /* index: * This preprocessor symbol is defined, along with rindex, if the system * uses the strchr and strrchr routines instead. *************** *** 94,99 **** --- 100,111 ---- * routine of some sort instead. */ #$d_strctcpy STRUCTCOPY /**/ + + /* SYMLINK: + * This symbol, if defined, indicates that the symlink routine is available + * to create symbolic links. + */ + #$d_symlink SYMLINK /**/ /* TMINSYS: * This symbol is defined if this system declares "struct tm" in Index: makedepend.SH Prereq: 1.0 *** makedepend.SH.old Tue Feb 2 11:28:23 1988 --- makedepend.SH Tue Feb 2 11:28:24 1988 *************** *** 15,23 **** echo "Extracting makedepend (with variable substitutions)" $spitshell >makedepend <makedepend <stab_name) { case '0': case '1': case '2': case '3': case '4': --- 75,80 ----