From: Perl 5 Porters Date: Tue, 22 Apr 1997 12:00:00 +0000 (+1200) Subject: [inseparable changes from match from perl-5.003_97g to perl-5.003_97h] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46fc3d4c69a0adf236bfcba70daee7fd597cf30d;p=p5sagit%2Fp5-mst-13.2.git [inseparable changes from match from perl-5.003_97g to perl-5.003_97h] BUILD PROCESS Subject: Fix up Linux hints for tcsh, and Configure patch Date: Tue, 22 Apr 1997 11:02:27 -0400 (EDT) From: Andy Dougherty Files: Configure hints/linux.sh Msg-ID: Pine.SOL.3.95q.970422101051.2506C-100000@fractal.lafayette.e (applied based on p5p patch as commit 1eb1b1cb9647b817d039bb17afa3e74940b5ef92) Subject: There is no standard answer to 'Use suidperl?' From: Chip Salzenberg Files: hints/bsdos.sh hints/freebsd.sh hints/linux.sh hints/machten_2.sh CORE LANGUAGE CHANGES Subject: Support PRINTF for tied handles Date: Sun, 20 Apr 1997 18:26:13 -0400 From: Doug MacEachern Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t Msg-ID: 199704202226.SAA08032@postman.osf.org (applied based on p5p patch as commit e7c5525577c16ee25e3521e86aca2b5105dba394) CORE PORTABILITY Subject: Fix bitwise shifts and pack('w') on Crays From: Chip Salzenberg Files: pp.c DOCUMENTATION Subject: FAQ udpate (23-apr-97) Date: Wed, 23 Apr 1997 12:22:55 -0600 (MDT) From: Nathan Torkington Files: pod/perlfaq*.pod private-msgid: 199704231822.MAA05074@prometheus.frii.com OTHER CORE CHANGES Subject: Mondo Cool patch for buffer safety and convenience From: Chip Salzenberg Files: XSUB.h doop.c dump.c ext/DynaLoader/dl_dlopen.xs ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs ext/DynaLoader/dlutils.c ext/ODBM_File/ODBM_File.xs global.sym gv.c interp.sym mg.c op.c perl.c perl.h pod/perlguts.pod pp.c pp_ctl.c pp_hot.c pp_sys.c proto.h regcomp.c regexec.c sv.c toke.c util.c Subject: Problems with glob Date: Sun, 20 Apr 1997 02:44:32 -0400 (EDT) From: Ilya Zakharevich Files: op.c Msg-ID: 1997Apr20.024432.1941365@hmivax.humgen.upenn.edu (applied based on p5p patch as commit a1230b335277820e65b8a9454ab751341204cf4f) Subject: Fix scalar leak in closures From: Chip Salzenberg Files: op.c scope.c Subject: Refine error messages re: anon subs' prototypes From: Chip Salzenberg Files: op.c Subject: Outermost scope is void, not scalar From: Chip Salzenberg Files: pp_ctl.c --- diff --git a/Changes b/Changes index a1ae3c2..075fa39 100644 --- a/Changes +++ b/Changes @@ -46,6 +46,119 @@ And the Keepers of the Patch Pumpkin: ----------------- +Version 5.003_97h +----------------- + +This patch eliminates almost all possible sources of buffer overflow; +in particular, there are no more sprintf() bugs. (!!) This patch +also has a few other fixes. With these changes in place, I can sleep +at night. (Because I've stopped hacking. :-)) + + CORE LANGUAGE CHANGES + + Title: "Support PRINTF for tied handles" + From: Doug MacEachern + Msg-ID: <199704202226.SAA08032@postman.osf.org> + Date: Sun, 20 Apr 1997 18:26:13 -0400 + Files: pod/perldelta.pod pod/perltie.pod pp_sys.c t/op/misc.t + + CORE PORTABILITY + + Title: "Fix bitwise shifts and pack('w') on Crays" + From: Chip Salzenberg + Files: pp.c + + Title: "Win32 update (two patches)" + From: Gurusamy Sarathy + Files: lib/AutoSplit.pm lib/ExtUtils/MM_Unix.pm win32/config.w32 + win32/makedef.pl + + OTHER CORE CHANGES + + Title: "Mondo Cool patch for buffer safety and convenience" + From: Chip Salzenberg + Files: XSUB.h doop.c dump.c ext/DynaLoader/dl_dlopen.xs + ext/DynaLoader/dl_hpux.xs ext/DynaLoader/dl_next.xs + ext/DynaLoader/dlutils.c ext/ODBM_File/ODBM_File.xs + global.sym gv.c interp.sym mg.c op.c perl.c perl.h + pod/perlguts.pod pp.c pp_ctl.c pp_hot.c pp_sys.c proto.h + regcomp.c regexec.c sv.c toke.c util.c + + Title: "Problems with glob" + From: Ilya Zakharevich + Msg-ID: <1997Apr20.024432.1941365@hmivax.humgen.upenn.edu> + Date: Sun, 20 Apr 1997 02:44:32 -0400 (EDT) + Files: op.c + + Title: "Fix scalar leak in closures" + From: Chip Salzenberg + Files: op.c scope.c + + Title: "Refine error messages re: anon subs' prototypes" + From: Chip Salzenberg + Files: op.c + + Title: "Outermost scope is void, not scalar" + From: Chip Salzenberg + Files: pp_ctl.c + + BUILD PROCESS + + Title: "Fix up Linux hints for tcsh, and Configure patch" + From: Andy Dougherty + Msg-ID: without module name" + From: Chip Salzenberg + Files: lib/autouse.pm + + Title: "Silence warnings on simple C" + From: Roderick Schertler + Msg-ID: + Date: 19 Apr 1997 10:22:43 -0400 + Files: ext/Opcode/ops.pm + + TESTS + + Title: "Don't put leading newline on numeric strings" + From: Andreas Koenig + Msg-ID: <199704230847.KAA22752@anna.in-berlin.de> + Date: Wed, 23 Apr 1997 10:47:00 +0200 + Files: t/pragma/constant.t + + UTILITIES + + (no changes) + + DOCUMENTATION + + Title: "FAQ udpate (23-apr-97)" + From: Nathan Torkington + Msg-ID: <199704231822.MAA05074@prometheus.frii.com> + Date: Wed, 23 Apr 1997 12:22:55 -0600 (MDT) + Files: pod/perlfaq*.pod + + Title: "Two doublewords less" + From: Jarkko Hietaniemi + Msg-ID: <199704201938.WAA07722@alpha.hut.fi> + Date: Sun, 20 Apr 1997 22:38:13 +0300 (EET DST) + Files: pod/perlrun.pod vms/perlvms.pod + + +----------------- Version 5.003_97g ----------------- diff --git a/Configure b/Configure index fbe1b31..64dd01c 100755 --- a/Configure +++ b/Configure @@ -6095,12 +6095,14 @@ eval $setvar : get csh whereabouts case "$csh" in 'csh') val="$undef" ;; -'tcsh') val="$undef" ;; *) val="$define" ;; esac set d_csh eval $setvar -full_csh=$csh +: Respect a hint or command line value for full_csh. +case "$full_csh" in +'') full_csh=$csh ;; +esac : see if cuserid exists set cuserid d_cuserid diff --git a/MANIFEST b/MANIFEST index ba759ea..7fc958b 100644 --- a/MANIFEST +++ b/MANIFEST @@ -346,7 +346,7 @@ lib/File/Compare.pm Emulation of cmp command lib/File/Copy.pm Emulation of cp command lib/File/Find.pm Routines to do a find lib/File/Path.pm Do things like `mkdir -p' and `rm -r' -lib/File/stat.pm By-name interface to Perl's built-in stat +lib/File/stat.pm By-name interface to Perl's builtin stat lib/FileCache.pm Keep more files open than the system permits lib/FileHandle.pm Backward-compatible front end to IO extension lib/FindBin.pm Find name of currently executing program @@ -360,10 +360,10 @@ lib/Math/BigInt.pm An arbitrary precision integer arithmetic package lib/Math/Complex.pm A Complex package lib/Math/Trig.pm A simple interface to complex trigonometry lib/Net/Ping.pm Hello, anybody home? -lib/Net/hostent.pm By-name interface to Perl's built-in gethost* -lib/Net/netent.pm By-name interface to Perl's built-in getnet* -lib/Net/protoent.pm By-name interface to Perl's built-in getproto* -lib/Net/servent.pm By-name interface to Perl's built-in getserv* +lib/Net/hostent.pm By-name interface to Perl's builtin gethost* +lib/Net/netent.pm By-name interface to Perl's builtin getnet* +lib/Net/protoent.pm By-name interface to Perl's builtin getproto* +lib/Net/servent.pm By-name interface to Perl's builtin getserv* lib/Pod/Functions.pm used by pod/splitpod lib/Pod/Html.pm Convert POD data to HTML lib/Pod/Text.pm Convert POD data to formatted ASCII text @@ -388,12 +388,12 @@ lib/Tie/RefHash.pm Base class for tied hashes with references as keys lib/Tie/Scalar.pm Base class for tied scalars lib/Tie/SubstrHash.pm Compact hash for known key, value and table size lib/Time/Local.pm Reverse translation of localtime, gmtime -lib/Time/gmtime.pm By-name interface to Perl's built-in gmtime -lib/Time/localtime.pm By-name interface to Perl's built-in localtime +lib/Time/gmtime.pm By-name interface to Perl's builtin gmtime +lib/Time/localtime.pm By-name interface to Perl's builtin localtime lib/Time/tm.pm Internal object for Time::{gm,local}time lib/UNIVERSAL.pm Base class for ALL classes -lib/User/grent.pm By-name interface to Perl's built-in getgr* -lib/User/pwent.pm By-name interface to Perl's built-in getpw* +lib/User/grent.pm By-name interface to Perl's builtin getgr* +lib/User/pwent.pm By-name interface to Perl's builtin getpw* lib/abbrev.pl An abbreviation table builder lib/assert.pl assertion and panic with stack trace lib/autouse.pm Load and call a function only when it's used diff --git a/XSUB.h b/XSUB.h index d15af1f..65c33c9 100644 --- a/XSUB.h +++ b/XSUB.h @@ -39,20 +39,18 @@ #ifdef XS_VERSION # define XS_VERSION_BOOTCHECK \ STMT_START { \ - char vn[255], *module = SvPV(ST(0),na); \ + char *vn = "", *module = SvPV(ST(0),na); \ if (items >= 2) /* version supplied as bootstrap arg */ \ Sv = ST(1); \ else { \ - sprintf(vn,"%s::XS_VERSION", module); \ - Sv = perl_get_sv(vn, FALSE); /* XXX GV_ADDWARN */ \ - if (!Sv || !SvOK(Sv)) { \ - sprintf(vn,"%s::VERSION", module); \ - Sv = perl_get_sv(vn, FALSE); /* XXX GV_ADDWARN */ \ - } \ + /* XXX GV_ADDWARN */ \ + Sv = perl_get_sv(vn = form("%s::XS_VERSION", module), FALSE); \ + if (!Sv || !SvOK(Sv)) \ + Sv = perl_get_sv(vn = form("%s::VERSION", module), FALSE); \ } \ if (Sv && (!SvOK(Sv) || strNE(XS_VERSION, SvPV(Sv, na)))) \ - croak("%s object version %s does not match $%s %s", \ - module, XS_VERSION, vn, SvPV(Sv, na)); \ + croak("%s object version %s does not match $%s %S", \ + module, XS_VERSION, vn, Sv); \ } STMT_END #else # define XS_VERSION_BOOTCHECK diff --git a/doop.c b/doop.c index 400934d..763b1a9 100644 --- a/doop.c +++ b/doop.c @@ -142,217 +142,18 @@ register SV **sp; void do_sprintf(sv,len,sarg) -register SV *sv; -register I32 len; -register SV **sarg; +SV *sv; +I32 len; +SV **sarg; { - register char *s; - register char *t; - register char *f; - char dotype; - char ch; - register char *send; - register SV *arg; - char *xs; - I32 xlen; - I32 pre; - I32 post; - double value; - STRLEN arglen; - - sv_setpv(sv,""); - len--; /* don't count pattern string */ - t = s = SvPV(*sarg, arglen); /* XXX Don't know t is writeable */ - send = s + arglen; - sarg++; - for ( ; ; len--) { - - /*SUPPRESS 560*/ - if (len <= 0 || !(arg = *sarg++)) - arg = &sv_no; - - /*SUPPRESS 530*/ - for ( ; t < send && *t != '%'; t++) ; - if (t >= send) - break; /* end of run_format string, ignore extra args */ - f = t; - *buf = '\0'; - xs = buf; - dotype = '\0'; - pre = post = 0; - for (t++; t < send; t++) { - switch (*t) { - default: - ch = *(++t); - *t = '\0'; - (void)sprintf(xs,f); - len++, sarg--; - xlen = strlen(xs); - break; - case 'n': case '*': - croak("Use of %c in printf format not supported", *t); - - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case '.': case '#': case '-': case '+': case ' ': - continue; - case 'l': -#ifdef HAS_QUAD - if (dotype == 'l') - dotype = 'q'; - else -#endif - dotype = 'l'; - continue; - case 'h': - dotype = 's'; - continue; - case 'c': - ch = *(++t); - *t = '\0'; - xlen = SvIV(arg); - if (strEQ(f,"%c")) { /* some printfs fail on null chars */ - *xs = xlen; - xs[1] = '\0'; - xlen = 1; - } - else { - (void)sprintf(xs,f,xlen); - xlen = strlen(xs); - } - break; - case 'D': - dotype = 'l'; - /* FALL THROUGH */ - case 'd': - case 'i': - ch = *(++t); - *t = '\0'; - switch (dotype) { -#ifdef HAS_QUAD - case 'q': - /* perl.h says that if quad is available, IV is quad */ - (void)sprintf(xs,f,(Quad_t)SvIV(arg)); - break; -#endif - case 'l': - (void)sprintf(xs,f,(long)SvIV(arg)); - break; - default: - (void)sprintf(xs,f,(int)SvIV(arg)); - break; - case 's': - (void)sprintf(xs,f,(short)SvIV(arg)); - break; - } - xlen = strlen(xs); - break; - case 'X': case 'O': - dotype = 'l'; - /* FALL THROUGH */ - case 'x': case 'o': case 'u': - ch = *(++t); - *t = '\0'; - switch (dotype) { -#ifdef HAS_QUAD - case 'q': - /* perl.h says that if quad is available, UV is quad */ - (void)sprintf(xs,f,(unsigned Quad_t)SvUV(arg)); - break; -#endif - case 'l': - (void)sprintf(xs,f,(unsigned long)SvUV(arg)); - break; - default: - (void)sprintf(xs,f,(unsigned int)SvUV(arg)); - break; - case 's': - (void)sprintf(xs,f,(unsigned short)SvUV(arg)); - break; - } - xlen = strlen(xs); - break; - case 'E': case 'e': case 'f': case 'G': case 'g': - ch = *(++t); - *t = '\0'; - (void)sprintf(xs,f,SvNV(arg)); - xlen = strlen(xs); -#ifdef LC_NUMERIC - /* - * User-defined locales may include arbitrary characters. - * And, unfortunately, some system may alloc the "C" locale - * to be overridden by a malicious user. - */ - if (op->op_type == OP_SPRINTF) - SvTAINTED_on(sv); -#endif /* LC_NUMERIC */ - break; - case 's': - ch = *(++t); - *t = '\0'; - xs = SvPV(arg, arglen); - xlen = (I32)arglen; - if (strEQ(f,"%s")) { /* some printfs fail on >128 chars */ - break; /* so handle simple cases */ - } - else if (f[1] == '-') { - char *mp = strchr(f, '.'); - I32 min = atoi(f+2); - - if (mp) { - I32 max = atoi(mp+1); - - if (xlen > max) - xlen = max; - } - if (xlen < min) - post = min - xlen; - break; - } - else if (isDIGIT(f[1])) { - char *mp = strchr(f, '.'); - I32 min = atoi(f+1); - - if (mp) { - I32 max = atoi(mp+1); - - if (xlen > max) - xlen = max; - } - if (xlen < min) - pre = min - xlen; - break; - } - strcpy(tokenbuf+64,f); /* sprintf($s,...$s...) */ - *t = ch; - (void)sprintf(buf,tokenbuf+64,xs); - xs = buf; - xlen = strlen(xs); - break; - } - /* end of switch, copy results */ - *t = ch; - if (xs == buf && xlen >= sizeof(buf)) { /* Ooops! */ - PerlIO_puts(PerlIO_stderr(),"panic: sprintf overflow - memory corrupted!\n"); - my_exit(1); - } - SvGROW(sv, SvCUR(sv) + (f - s) + xlen + 1 + pre + post); - sv_catpvn(sv, s, f - s); - if (pre) { - repeatcpy(SvPVX(sv) + SvCUR(sv), " ", 1, pre); - SvCUR(sv) += pre; - } - sv_catpvn(sv, xs, xlen); - if (post) { - repeatcpy(SvPVX(sv) + SvCUR(sv), " ", 1, post); - SvCUR(sv) += post; - } - s = t; - break; /* break from for loop */ - } - } - sv_catpvn(sv, s, t - s); + STRLEN patlen; + char *pat = SvPV(*sarg, patlen); + bool do_taint = FALSE; + + sv_vsetpvfn(sv, pat, patlen, Null(va_list*), sarg + 1, len - 1, &do_taint); SvSETMAGIC(sv); + if (do_taint) + SvTAINTED_on(sv); } void @@ -708,18 +509,15 @@ dARGS if (dokeys) XPUSHs(hv_iterkeysv(entry)); /* won't clobber stack_sp */ if (dovalues) { - tmpstr = NEWSV(45,0); + tmpstr = sv_newmortal(); PUTBACK; sv_setsv(tmpstr,hv_iterval(hv,entry)); + DEBUG_H(sv_setpvf(tmpstr, "%lu%%%d=%lu", + (unsigned long)HeHASH(entry), + HvMAX(hv)+1, + (unsigned long)(HeHASH(entry) & HvMAX(hv)))); SPAGAIN; - DEBUG_H( { - sprintf(buf,"%lu%%%d=%lu\n", - (unsigned long)HeHASH(entry), - HvMAX(hv)+1, - (unsigned long)(HeHASH(entry) & HvMAX(hv))); - sv_setpv(tmpstr,buf); - } ) - XPUSHs(sv_2mortal(tmpstr)); + XPUSHs(tmpstr); } PUTBACK; } diff --git a/dump.c b/dump.c index e74c8c4..2a45e75 100644 --- a/dump.c +++ b/dump.c @@ -103,8 +103,6 @@ void dump_op(op) register OP *op; { - SV *tmpsv; - dump("{\n"); if (op->op_seq) PerlIO_printf(Perl_debug_log, "%-4d", op->op_seq); @@ -130,58 +128,57 @@ register OP *op; dump("ADDR = 0x%lx => 0x%lx\n",op, op->op_next); #endif if (op->op_flags) { - *buf = '\0'; + SV *tmpsv = newSVpv("", 0); switch (op->op_flags & OPf_WANT) { case OPf_WANT_VOID: - (void)strcat(buf,"VOID,"); + sv_catpv(tmpsv, ",VOID"); break; case OPf_WANT_SCALAR: - (void)strcat(buf,"SCALAR,"); + sv_catpv(tmpsv, ",SCALAR"); break; case OPf_WANT_LIST: - (void)strcat(buf,"LIST,"); + sv_catpv(tmpsv, ",LIST"); break; default: - (void)strcat(buf,"UNKNOWN,"); + sv_catpv(tmpsv, ",UNKNOWN"); break; } if (op->op_flags & OPf_KIDS) - (void)strcat(buf,"KIDS,"); + sv_catpv(tmpsv, ",KIDS"); if (op->op_flags & OPf_PARENS) - (void)strcat(buf,"PARENS,"); + sv_catpv(tmpsv, ",PARENS"); if (op->op_flags & OPf_STACKED) - (void)strcat(buf,"STACKED,"); + sv_catpv(tmpsv, ",STACKED"); if (op->op_flags & OPf_REF) - (void)strcat(buf,"REF,"); + sv_catpv(tmpsv, ",REF"); if (op->op_flags & OPf_MOD) - (void)strcat(buf,"MOD,"); + sv_catpv(tmpsv, ",MOD"); if (op->op_flags & OPf_SPECIAL) - (void)strcat(buf,"SPECIAL,"); - if (*buf) - buf[strlen(buf)-1] = '\0'; - dump("FLAGS = (%s)\n",buf); + sv_catpv(tmpsv, ",SPECIAL"); + dump("FLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX(tmpsv) + 1 : ""); + SvREFCNT_dec(tmpsv); } if (op->op_private) { - *buf = '\0'; + SV *tmpsv = newSVpv("", 0); if (op->op_type == OP_AASSIGN) { if (op->op_private & OPpASSIGN_COMMON) - (void)strcat(buf,"COMMON,"); + sv_catpv(tmpsv, ",COMMON"); } else if (op->op_type == OP_SASSIGN) { if (op->op_private & OPpASSIGN_BACKWARDS) - (void)strcat(buf,"BACKWARDS,"); + sv_catpv(tmpsv, ",BACKWARDS"); } else if (op->op_type == OP_TRANS) { if (op->op_private & OPpTRANS_SQUASH) - (void)strcat(buf,"SQUASH,"); + sv_catpv(tmpsv, ",SQUASH"); if (op->op_private & OPpTRANS_DELETE) - (void)strcat(buf,"DELETE,"); + sv_catpv(tmpsv, ",DELETE"); if (op->op_private & OPpTRANS_COMPLEMENT) - (void)strcat(buf,"COMPLEMENT,"); + sv_catpv(tmpsv, ",COMPLEMENT"); } else if (op->op_type == OP_REPEAT) { if (op->op_private & OPpREPEAT_DOLIST) - (void)strcat(buf,"DOLIST,"); + sv_catpv(tmpsv, ",DOLIST"); } else if (op->op_type == OP_ENTERSUB || op->op_type == OP_RV2SV || @@ -193,56 +190,55 @@ register OP *op; { if (op->op_type == OP_ENTERSUB) { if (op->op_private & OPpENTERSUB_AMPER) - (void)strcat(buf,"AMPER,"); + sv_catpv(tmpsv, ",AMPER"); if (op->op_private & OPpENTERSUB_DB) - (void)strcat(buf,"DB,"); + sv_catpv(tmpsv, ",DB"); } switch (op->op_private & OPpDEREF) { case OPpDEREF_SV: - (void)strcat(buf, "SV,"); + sv_catpv(tmpsv, ",SV"); break; case OPpDEREF_AV: - (void)strcat(buf, "AV,"); + sv_catpv(tmpsv, ",AV"); break; case OPpDEREF_HV: - (void)strcat(buf, "HV,"); + sv_catpv(tmpsv, ",HV"); break; } if (op->op_type == OP_AELEM || op->op_type == OP_HELEM) { if (op->op_private & OPpLVAL_DEFER) - (void)strcat(buf,"LVAL_DEFER,"); + sv_catpv(tmpsv, ",LVAL_DEFER"); } else { if (op->op_private & HINT_STRICT_REFS) - (void)strcat(buf,"STRICT_REFS,"); + sv_catpv(tmpsv, ",STRICT_REFS"); } } else if (op->op_type == OP_CONST) { if (op->op_private & OPpCONST_BARE) - (void)strcat(buf,"BARE,"); + sv_catpv(tmpsv, ",BARE"); } else if (op->op_type == OP_FLIP) { if (op->op_private & OPpFLIP_LINENUM) - (void)strcat(buf,"LINENUM,"); + sv_catpv(tmpsv, ",LINENUM"); } else if (op->op_type == OP_FLOP) { if (op->op_private & OPpFLIP_LINENUM) - (void)strcat(buf,"LINENUM,"); + sv_catpv(tmpsv, ",LINENUM"); } if (op->op_flags & OPf_MOD && op->op_private & OPpLVAL_INTRO) - (void)strcat(buf,"INTRO,"); - if (*buf) { - buf[strlen(buf)-1] = '\0'; - dump("PRIVATE = (%s)\n",buf); - } + sv_catpv(tmpsv, ",INTRO"); + if (SvCUR(tmpsv)) + dump("PRIVATE = (%s)\n", SvPVX(tmpsv) + 1); + SvREFCNT_dec(tmpsv); } switch (op->op_type) { case OP_GVSV: case OP_GV: if (cGVOP->op_gv) { + SV *tmpsv = NEWSV(0,0); ENTER; - tmpsv = NEWSV(0,0); SAVEFREESV(tmpsv); gv_fullname3(tmpsv, cGVOP->op_gv, Nullch); dump("GV = %s\n", SvPV(tmpsv, na)); @@ -367,30 +363,29 @@ register PMOP *pm; dump("PMf_SHORT = %s\n",SvPEEK(pm->op_pmshort)); } if (pm->op_pmflags) { - *buf = '\0'; + SV *tmpsv = newSVpv("", 0); if (pm->op_pmflags & PMf_USED) - (void)strcat(buf,"USED,"); + sv_catpv(tmpsv, ",USED"); if (pm->op_pmflags & PMf_ONCE) - (void)strcat(buf,"ONCE,"); + sv_catpv(tmpsv, ",ONCE"); if (pm->op_pmflags & PMf_SCANFIRST) - (void)strcat(buf,"SCANFIRST,"); + sv_catpv(tmpsv, ",SCANFIRST"); if (pm->op_pmflags & PMf_ALL) - (void)strcat(buf,"ALL,"); + sv_catpv(tmpsv, ",ALL"); if (pm->op_pmflags & PMf_SKIPWHITE) - (void)strcat(buf,"SKIPWHITE,"); + sv_catpv(tmpsv, ",SKIPWHITE"); if (pm->op_pmflags & PMf_CONST) - (void)strcat(buf,"CONST,"); + sv_catpv(tmpsv, ",CONST"); if (pm->op_pmflags & PMf_KEEP) - (void)strcat(buf,"KEEP,"); + sv_catpv(tmpsv, ",KEEP"); if (pm->op_pmflags & PMf_GLOBAL) - (void)strcat(buf,"GLOBAL,"); + sv_catpv(tmpsv, ",GLOBAL"); if (pm->op_pmflags & PMf_RUNTIME) - (void)strcat(buf,"RUNTIME,"); + sv_catpv(tmpsv, ",RUNTIME"); if (pm->op_pmflags & PMf_EVAL) - (void)strcat(buf,"EVAL,"); - if (*buf) - buf[strlen(buf)-1] = '\0'; - dump("PMFLAGS = (%s)\n",buf); + sv_catpv(tmpsv, ",EVAL"); + dump("PMFLAGS = (%s)\n", SvCUR(tmpsv) ? SvPVX(tmpsv) + 1 : ""); + SvREFCNT_dec(tmpsv); } dumplvl--; diff --git a/embed.h b/embed.h index a5936c4..474f7e1 100644 --- a/embed.h +++ b/embed.h @@ -57,7 +57,6 @@ #define block_start Perl_block_start #define bool__amg Perl_bool__amg #define bor_amg Perl_bor_amg -#define buf Perl_buf #define bufend Perl_bufend #define bufptr Perl_bufptr #define bxor_amg Perl_bxor_amg @@ -210,6 +209,7 @@ #define force_list Perl_force_list #define force_next Perl_force_next #define force_word Perl_force_word +#define form Perl_form #define free_tmps Perl_free_tmps #define freq Perl_freq #define ge_amg Perl_ge_amg @@ -431,6 +431,7 @@ #define newSViv Perl_newSViv #define newSVnv Perl_newSVnv #define newSVpv Perl_newSVpv +#define newSVpvf Perl_newSVpvf #define newSVrv Perl_newSVrv #define newSVsv Perl_newSVsv #define newUNOP Perl_newUNOP @@ -1000,6 +1001,7 @@ #define sv_backoff Perl_sv_backoff #define sv_bless Perl_sv_bless #define sv_catpv Perl_sv_catpv +#define sv_catpvf Perl_sv_catpvf #define sv_catpvn Perl_sv_catpvn #define sv_catsv Perl_sv_catsv #define sv_chop Perl_sv_chop @@ -1038,6 +1040,7 @@ #define sv_setnv Perl_sv_setnv #define sv_setptrobj Perl_sv_setptrobj #define sv_setpv Perl_sv_setpv +#define sv_setpvf Perl_sv_setpvf #define sv_setpvn Perl_sv_setpvn #define sv_setref_iv Perl_sv_setref_iv #define sv_setref_nv Perl_sv_setref_nv @@ -1053,6 +1056,8 @@ #define sv_untaint Perl_sv_untaint #define sv_upgrade Perl_sv_upgrade #define sv_usepvn Perl_sv_usepvn +#define sv_vcatpvfn Perl_sv_vcatpvfn +#define sv_vsetpvfn Perl_sv_vsetpvfn #define sv_yes Perl_sv_yes #define taint_env Perl_taint_env #define taint_proper Perl_taint_proper @@ -1254,6 +1259,7 @@ #define mainstack (curinterp->Imainstack) #define maxscream (curinterp->Imaxscream) #define maxsysfd (curinterp->Imaxsysfd) +#define mess_sv (curinterp->Imess_sv) #define minus_F (curinterp->Iminus_F) #define minus_a (curinterp->Iminus_a) #define minus_c (curinterp->Iminus_c) @@ -1407,6 +1413,7 @@ #define Imainstack mainstack #define Imaxscream maxscream #define Imaxsysfd maxsysfd +#define Imess_sv mess_sv #define Iminus_F minus_F #define Iminus_a minus_a #define Iminus_c minus_c @@ -1569,6 +1576,7 @@ #define mainstack Perl_mainstack #define maxscream Perl_maxscream #define maxsysfd Perl_maxsysfd +#define mess_sv Perl_mess_sv #define minus_F Perl_minus_F #define minus_a Perl_minus_a #define minus_c Perl_minus_c diff --git a/ext/DynaLoader/dl_dlopen.xs b/ext/DynaLoader/dl_dlopen.xs index 1c43517..fef4530 100644 --- a/ext/DynaLoader/dl_dlopen.xs +++ b/ext/DynaLoader/dl_dlopen.xs @@ -175,13 +175,14 @@ dl_find_symbol(libhandle, symbolname) char * symbolname CODE: #ifdef DLSYM_NEEDS_UNDERSCORE - char symbolname_buf[1024]; - symbolname = dl_add_underscore(symbolname, symbolname_buf); + symbolname = form("_%s", symbolname); #endif - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_find_symbol(handle=%lx, symbol=%s)\n", - (unsigned long) libhandle, symbolname)); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + "dl_find_symbol(handle=%lx, symbol=%s)\n", + (unsigned long) libhandle, symbolname)); RETVAL = dlsym(libhandle, symbolname); - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " symbolref = %lx\n", (unsigned long) RETVAL)); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + " symbolref = %lx\n", (unsigned long) RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) SaveError("%s",dlerror()) ; diff --git a/ext/DynaLoader/dl_hpux.xs b/ext/DynaLoader/dl_hpux.xs index b5a75fe..fea6284 100644 --- a/ext/DynaLoader/dl_hpux.xs +++ b/ext/DynaLoader/dl_hpux.xs @@ -88,11 +88,12 @@ dl_find_symbol(libhandle, symbolname) void *symaddr = NULL; int status; #ifdef __hp9000s300 - char symbolname_buf[MAXPATHLEN]; - symbolname = dl_add_underscore(symbolname, symbolname_buf); + symbolname = form("_%s", symbolname); #endif - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_find_symbol(handle=%x, symbol=%s)\n", - libhandle, symbolname)); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + "dl_find_symbol(handle=%lx, symbol=%s)\n", + (unsigned long) libhandle, symbolname)); + ST(0) = sv_newmortal() ; errno = 0; diff --git a/ext/DynaLoader/dl_next.xs b/ext/DynaLoader/dl_next.xs index 17b5be5..952c022 100644 --- a/ext/DynaLoader/dl_next.xs +++ b/ext/DynaLoader/dl_next.xs @@ -72,7 +72,7 @@ enum dyldErrorSource static void TranslateError (const char *path, enum dyldErrorSource type, int number) { - char errorBuffer[128]; + char *error; unsigned int index; static char *OFIErrorStrings[] = { @@ -86,25 +86,22 @@ static void TranslateError }; #define NUM_OFI_ERRORS (sizeof(OFIErrorStrings) / sizeof(OFIErrorStrings[0])) - if ( dl_last_error ) { - safefree(dl_last_error); - } switch (type) { case OFImage: index = number; if (index > NUM_OFI_ERRORS - 1) index = NUM_OFI_ERRORS - 1; - sprintf(errorBuffer, OFIErrorStrings[index], path, number); + error = form(OFIErrorStrings[index], path, number); break; default: - sprintf(errorBuffer, "%s(%d): Totally unknown error type %d\n", - path, number, type); + error = form("%s(%d): Totally unknown error type %d\n", + path, number, type); break; } - dl_last_error = safemalloc(strlen(errorBuffer)+1); - strcpy(dl_last_error, errorBuffer); + safefree(dl_last_error); + dl_last_error = savepv(error); } static char *dlopen(char *path, int mode /* mode is ignored */) @@ -209,13 +206,10 @@ void *handle; char *symbol; { NXStream *nxerr = OpenError(); - char symbuf[1024]; unsigned long symref = 0; - sprintf(symbuf, "_%s", symbol); - if (!rld_lookup(nxerr, symbuf, &symref)) { + if (!rld_lookup(nxerr, form("_%s", symbuf), &symref)) TransferError(nxerr); - } CloseError(nxerr); return (void*) symref; } @@ -265,13 +259,14 @@ dl_find_symbol(libhandle, symbolname) char * symbolname CODE: #if NS_TARGET_MAJOR >= 4 - char symbolname_buf[1024]; - symbolname = dl_add_underscore(symbolname, symbolname_buf); + symbolname = form("_%s", symbolname); #endif - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "dl_find_symbol(handle=%x, symbol=%s)\n", - libhandle, symbolname)); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + "dl_find_symbol(handle=%lx, symbol=%s)\n", + (unsigned long) libhandle, symbolname)); RETVAL = dlsym(libhandle, symbolname); - DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), " symbolref = %x\n", RETVAL)); + DLDEBUG(2, PerlIO_printf(PerlIO_stderr(), + " symbolref = %lx\n", (unsigned long) RETVAL)); ST(0) = sv_newmortal() ; if (RETVAL == NULL) SaveError("%s",dlerror()) ; diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c index e13427a..5800678 100644 --- a/ext/DynaLoader/dlutils.c +++ b/ext/DynaLoader/dlutils.c @@ -82,15 +82,3 @@ SaveError(pat, va_alist) DLDEBUG(2,PerlIO_printf(PerlIO_stderr(), "DynaLoader: stored error msg '%s'\n",LastError)); } - -/* prepend underscore to s. write into buf. return buf. */ -static char * -dl_add_underscore(s, buf) -char *s; -char *buf; -{ - *buf = '_'; - (void)strcpy(buf + 1, s); - return buf; -} - diff --git a/ext/ODBM_File/ODBM_File.xs b/ext/ODBM_File/ODBM_File.xs index 92b443c..d23b318 100644 --- a/ext/ODBM_File/ODBM_File.xs +++ b/ext/ODBM_File/ODBM_File.xs @@ -54,9 +54,11 @@ odbm_TIEHASH(dbtype, filename, flags, mode) int mode CODE: { - char tmpbuf[1025]; + char *tmpbuf; if (dbmrefcnt++) croak("Old dbm can only open one database"); + New(0, tmpbuf, strlen(filename) + 5, char); + SAVEFREEPV(tmpbuf); sprintf(tmpbuf,"%s.dir",filename); if (stat(tmpbuf, &statbuf) < 0) { if (flags & O_CREAT) { diff --git a/global.sym b/global.sym index 7baefdb..781d179 100644 --- a/global.sym +++ b/global.sym @@ -19,7 +19,6 @@ band_amg block_type bool__amg bor_amg -buf bufend bufptr bxor_amg @@ -431,6 +430,7 @@ force_ident force_list force_next force_word +form free_tmps gen_constant_list gp_free @@ -599,6 +599,7 @@ newSVREF newSViv newSVnv newSVpv +newSVpvf newSVrv newSVsv newUNOP @@ -1071,6 +1072,7 @@ sv_2uv sv_add_arena sv_backoff sv_bless +sv_catpvf sv_catpv sv_catpvn sv_catsv @@ -1106,6 +1108,7 @@ sv_reftype sv_replace sv_report_used sv_reset +sv_setpvf sv_setiv sv_setnv sv_setptrobj @@ -1124,6 +1127,8 @@ sv_unref sv_untaint sv_upgrade sv_usepvn +sv_vcatpvfn +sv_vsetpvfn taint_env taint_proper too_few_arguments diff --git a/gv.c b/gv.c index 90eee26..a18304e 100644 --- a/gv.c +++ b/gv.c @@ -376,23 +376,22 @@ char *name; U32 namelen; I32 create; { - char tmpbuf[1203]; + char smallbuf[256]; + char *tmpbuf; HV *stash; GV *tmpgv; - if (namelen > 1200) { - namelen = 1200; -#ifdef VMS - warn("Weird package name \"%s\" truncated", name); -#else - warn("Weird package name \"%.*s...\" truncated", (int)namelen, name); -#endif - } + if (namelen + 3 < sizeof smallbuf) + tmpbuf = smallbuf; + else + New(606, tmpbuf, namelen + 3, char); Copy(name,tmpbuf,namelen,char); tmpbuf[namelen++] = ':'; tmpbuf[namelen++] = ':'; tmpbuf[namelen] = '\0'; - tmpgv = gv_fetchpv(tmpbuf,create, SVt_PVHV); + tmpgv = gv_fetchpv(tmpbuf, create, SVt_PVHV); + if (tmpbuf != smallbuf) + Safefree(tmpbuf); if (!tmpgv) return 0; if (!GvHV(tmpgv)) @@ -873,8 +872,8 @@ GV * newGVgen(pack) char *pack; { - (void)sprintf(tokenbuf,"%s::_GEN_%ld",pack,(long)gensym++); - return gv_fetchpv(tokenbuf,TRUE, SVt_PVGV); + return gv_fetchpv(form("%s::_GEN_%ld", pack, (long)gensym++), + TRUE, SVt_PVGV); } /* hopefully this is only called on local symbol table entries */ @@ -1066,16 +1065,13 @@ HV* stash; } for (i = 1; i < NofAMmeth; i++) { - cv = 0; - cp = AMG_names[i]; - - *buf = '('; /* A cookie: "(". */ - strcpy(buf + 1, cp); + SV *cookie = sv_2mortal(newSVpvf("(%s", cp = AMG_names[i])); DEBUG_o( deb("Checking overloading of `%s' in package `%.256s'\n", cp, HvNAME(stash)) ); - gv = gv_fetchmeth(stash, buf, strlen(buf), -1); /* no filling stash! */ + /* don't fill the cache while looking up! */ + gv = gv_fetchmeth(stash, SvPVX(cookie), SvCUR(cookie), -1); + cv = 0; if(gv && (cv = GvCV(gv))) { - char *name = buf; if (GvNAMELEN(CvGV(cv)) == 3 && strEQ(GvNAME(CvGV(cv)), "nil") && strEQ(HvNAME(GvSTASH(CvGV(cv))), "overload")) { /* GvSV contains the name of the method. */ @@ -1097,7 +1093,6 @@ HV* stash; (SvPOK(GvSV(gv)) ? SvPVX(GvSV(gv)) : "???" ), cp, HvNAME(stash)); } - name = SvPVX(GvSV(gv)); cv = GvCV(gv = ngv); } DEBUG_o( deb("Overloading `%s' in package `%.256s' via `%.256s::%.256s' \n", @@ -1280,9 +1275,10 @@ int flags; } else if (cvp && (cv=cvp[nomethod_amg])) { notfound = 1; lr = 1; } else { + SV *msg; if (off==-1) off=method; - sprintf(buf, - "Operation `%s': no method found,%sargument %s%.256s%s%.256s", + msg = sv_2mortal(newSVpvf( + "Operation `%s': no method found,%sargument %s%s%s%s", AMG_names[method + assignshift], (flags & AMGf_unary ? " " : "\n\tleft "), SvAMAGIC(left)? @@ -1298,11 +1294,11 @@ int flags; : ",\n\tright argument has no overloaded magic"), SvAMAGIC(right)? HvNAME(SvSTASH(SvRV(right))): - ""); + "")); if (amtp && amtp->fallback >= AMGfallYES) { - DEBUG_o( deb(buf) ); + DEBUG_o( deb("%s", SvPVX(msg)) ); } else { - croak(buf); + croak("%S", msg); } return NULL; } @@ -1310,7 +1306,7 @@ int flags; } if (!notfound) { DEBUG_o( deb( - "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %.256s%s\n", + "Overloaded operator `%s'%s%s%s:\n\tmethod%s found%s in package %s%s\n", AMG_names[off], method+assignshift==off? "" : " (initially `", diff --git a/hints/bsdos.sh b/hints/bsdos.sh index 29a0691..ef98ace 100644 --- a/hints/bsdos.sh +++ b/hints/bsdos.sh @@ -16,7 +16,6 @@ so='o' #sig_name='ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 ' signal_t='void' d_voidsig='define' -d_dosuid='define' # we don't want to use -lnm, since exp() is busted (in 1.1 anyway) set `echo X "$libswanted "| sed -e 's/ nm / /'` diff --git a/hints/freebsd.sh b/hints/freebsd.sh index 7ec8751..6ce5fa7 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -59,7 +59,6 @@ case "$osvers" in 2.0.5*|2.0-built*|2.1*) usevfork='true' usemymalloc='n' - d_dosuid='define' d_setregid='define' d_setreuid='define' d_setegid='undef' @@ -73,7 +72,6 @@ case "$osvers" in usevfork='true' usemymalloc='n' libswanted=`echo $libswanted | sed 's/ malloc / /'` - d_dosuid='define' d_setregid='define' d_setreuid='define' d_setegid='undef' diff --git a/hints/linux.sh b/hints/linux.sh index 99ab9c8..d458c49 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -17,13 +17,6 @@ # No version of Linux supports setuid scripts. d_suidsafe='undef' -#don't force people to install SUID if they don't want to (have said -#-Dd_dosuid=undef explicitly on command line) - MIKEDLR -if [ ! "A$d_dosuid" = "Aundef" ] #do I need to be paranoid here? -then - d_dosuid='define' -fi - # perl goes into the /usr tree. See the Filesystem Standard # available via anonymous FTP at tsx-11.mit.edu in @@ -175,16 +168,17 @@ fi if [ ! "`csh -c 'echo $version' 2>/dev/null`" ] then - echo 'Real csh found (might break); looking for tcsh ...' - if which tcsh >/dev/null 2>&1 - then - echo 'Found tcsh; will use it for globbing.' - csh='tcsh' - d_csh='tcsh' - full_csh=`which tcsh` # we know this will work now. - else - echo "Couldn't find tcsh. BEWARE BROKEN GLOBBING." - fi + echo 'Real csh found (might break); looking for tcsh ...' + # Use ../UU/loc to find tcsh. (We run in the hints/ directory.) + if xxx=`../UU/loc tcsh blurfl $pth`; $test -f "$xxx"; then + echo "Found tcsh. I'll use it for globbing." + # We can't change Configure's setting of $csh, due to the way + # Configure handles $d_portable and commands found in $loclist. + # We can set the value for CSH in config.h by setting full_csh. + full_csh=$xxx + else + echo "Couldn't find tcsh. BEWARE: GLOBBING MIGHT BE BROKEN." + fi else - echo 'Your csh is really tcsh. Good.' + echo 'Your csh is really tcsh. Good.' fi diff --git a/hints/machten_2.sh b/hints/machten_2.sh index c406a37..bc7dde4 100644 --- a/hints/machten_2.sh +++ b/hints/machten_2.sh @@ -46,9 +46,6 @@ esac # MachTen doesn't have secure setid scripts d_suidsafe='undef' -case "$d_dosuid" in -'') d_dosuid='define' ;; -esac # groupstype should be gid_t, as near as I can tell, but it only # seems to work right when it's int. diff --git a/installperl b/installperl index 07b1e55..9563bda 100755 --- a/installperl +++ b/installperl @@ -405,6 +405,9 @@ sub installlib { $name = "$dir/$name" if $dir ne ''; + # ignore Chip-style patch backups. + return if grep(/^P\d+$/, split(m{/+}, $name)); + my $installlib = $installprivlib; if ($dir =~ /^auto/ || ($name =~ /^(.*)\.(?:pm|pod)$/ && $archpms{$1})) { diff --git a/interp.sym b/interp.sym index 80ef5b5..753f53d 100644 --- a/interp.sym +++ b/interp.sym @@ -78,6 +78,7 @@ main_start mainstack maxscream maxsysfd +mess_sv minus_F minus_a minus_c diff --git a/lib/ExtUtils/Install.pm b/lib/ExtUtils/Install.pm index 71f553b..89e8671 100644 --- a/lib/ExtUtils/Install.pm +++ b/lib/ExtUtils/Install.pm @@ -49,6 +49,7 @@ sub install { opendir DIR, $source_dir_or_file or next; for (readdir DIR) { next if $_ eq "." || $_ eq ".." || $_ eq ".exists"; + next if /^P\d+$/ && -d "$source_dir_or_file/$_"; # no Chip bk's if (-w $hash{$source_dir_or_file} || mkpath($hash{$source_dir_or_file})) { last; } else { @@ -88,6 +89,7 @@ sub install { $atime,$mtime,$ctime,$blksize,$blocks) = stat; return unless -f _; return if $_ eq ".exists"; + return if /\bP\d+\b/; # no Chip-style backups my $targetdir = $MY->catdir($hash{$source},$File::Find::dir); my $targetfile = $MY->catfile($targetdir,$_); diff --git a/mg.c b/mg.c index 1355740..7d8cd04 100644 --- a/mg.c +++ b/mg.c @@ -531,27 +531,20 @@ MAGIC *mg; break; case '(': sv_setiv(sv, (IV)gid); - s = buf; - (void)sprintf(s,"%d",(int)gid); + sv_setpvf(sv, "%vd", (IV)gid); goto add_groups; case ')': sv_setiv(sv, (IV)egid); - s = buf; - (void)sprintf(s,"%d",(int)egid); + sv_setpvf(sv, "%vd", (IV)egid); add_groups: - while (*s) s++; #ifdef HAS_GETGROUPS { Groups_t gary[NGROUPS]; - i = getgroups(NGROUPS,gary); - while (--i >= 0) { - (void)sprintf(s," %d", (int)gary[i]); - while (*s) s++; - } + while (--i >= 0) + sv_catpvf(sv, " %vd", (IV)gary[i]); } #endif - sv_setpv(sv,buf); SvIOK_on(sv); /* what a wonderful hack! */ break; case '*': @@ -769,10 +762,8 @@ MAGIC* mg; * access to a known hint bit in a known OP, we can't * tell whether HINT_STRICT_REFS is in force or not. */ - if (!strchr(s,':') && !strchr(s,'\'')) { - sprintf(tokenbuf, "main::%s",s); - sv_setpv(sv,tokenbuf); - } + if (!strchr(s,':') && !strchr(s,'\'')) + sv_setpv(sv, form("main::%s", s)); if (i) (void)rsignal(i, sighandler); else diff --git a/op.c b/op.c index 6a1fa5b..747ae0f 100644 --- a/op.c +++ b/op.c @@ -48,11 +48,11 @@ static PADOFFSET pad_findlex _((char* name, PADOFFSET newoff, U32 seq, CV* startcv, I32 cx_ix)); static char* -CvNAME(cv) -CV* cv; +gv_ename(gv) +GV* gv; { SV* tmpsv = sv_newmortal(); - gv_efullname3(tmpsv, CvGV(cv), Nullch); + gv_efullname3(tmpsv, gv, Nullch); return SvPV(tmpsv,na); } @@ -60,9 +60,8 @@ static OP * no_fh_allowed(op) OP *op; { - sprintf(tokenbuf,"Missing comma after first argument to %s function", - op_desc[op->op_type]); - yyerror(tokenbuf); + yyerror(form("Missing comma after first argument to %s function", + op_desc[op->op_type])); return op; } @@ -71,8 +70,7 @@ too_few_arguments(op, name) OP* op; char* name; { - sprintf(tokenbuf,"Not enough arguments for %s", name); - yyerror(tokenbuf); + yyerror(form("Not enough arguments for %s", name)); return op; } @@ -81,8 +79,7 @@ too_many_arguments(op, name) OP *op; char* name; { - sprintf(tokenbuf,"Too many arguments for %s", name); - yyerror(tokenbuf); + yyerror(form("Too many arguments for %s", name)); return op; } @@ -93,9 +90,8 @@ char *t; char *name; OP *kid; { - sprintf(tokenbuf, "Type of arg %d to %s must be %s (not %s)", - (int) n, name, t, op_desc[kid->op_type]); - yyerror(tokenbuf); + yyerror(form("Type of arg %d to %s must be %s (not %s)", + (int)n, name, t, op_desc[kid->op_type])); return op; } @@ -105,8 +101,7 @@ OP *op; { int type = op->op_type; if (type != OP_AELEM && type != OP_HELEM) { - sprintf(tokenbuf, "Can't use subscript on %s", op_desc[type]); - yyerror(tokenbuf); + yyerror(form("Can't use subscript on %s", op_desc[type])); if (type == OP_ENTERSUB || type == OP_RV2HV || type == OP_PADHV) warn("(Did you mean $ or @ instead of %c?)\n", type == OP_ENTERSUB ? '&' : '%'); @@ -123,8 +118,11 @@ char *name; SV *sv; if (!(isALPHA(name[1]) || name[1] == '_' && (int)strlen(name) > 2)) { - if (!isPRINT(name[1])) - sprintf(name+1, "^%c", toCTRL(name[1])); /* XXX tokenbuf, really */ + if (!isPRINT(name[1])) { + name[3] = '\0'; + name[2] = toCTRL(name[1]); + name[1] = '^'; + } croak("Can't use global %s in \"my\"",name); } if (AvFILL(comppad_name) >= 0) { @@ -1016,10 +1014,9 @@ I32 type; /* grep, foreach, subcalls, refgen */ if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN) break; - sprintf(tokenbuf, "Can't modify %s in %s", - op_desc[op->op_type], - type ? op_desc[type] : "local"); - yyerror(tokenbuf); + yyerror(form("Can't modify %s in %s", + op_desc[op->op_type], + type ? op_desc[type] : "local")); return op; case OP_PREINC: @@ -1321,8 +1318,7 @@ OP *op; type != OP_PADHV && type != OP_PUSHMARK) { - sprintf(tokenbuf, "Can't declare %s in my", op_desc[op->op_type]); - yyerror(tokenbuf); + yyerror(form("Can't declare %s in my", op_desc[op->op_type])); return op; } op->op_flags |= OPf_MOD; @@ -2945,8 +2941,16 @@ CV *cv; I32 i = AvFILL(CvPADLIST(cv)); while (i >= 0) { SV** svp = av_fetch(CvPADLIST(cv), i--, FALSE); - if (svp) - SvREFCNT_dec(*svp); + SV* sv = svp ? *svp : Nullsv; + if (!sv) + continue; + if (sv == (SV*)comppad_name) + comppad_name = Nullav; + else if (sv == (SV*)comppad) { + comppad = Nullav; + curpad = Null(SV**); + } + SvREFCNT_dec(sv); } SvREFCNT_dec((SV*)CvPADLIST(cv)); } @@ -3022,6 +3026,7 @@ CV* outside; ENTER; SAVESPTR(curpad); SAVESPTR(comppad); + SAVESPTR(comppad_name); SAVESPTR(compcv); cv = compcv = (CV*)NEWSV(1104,0); @@ -3041,11 +3046,15 @@ CV* outside; if (SvPOK(proto)) sv_setpvn((SV*)cv, SvPVX(proto), SvCUR(proto)); + comppad_name = newAV(); + for (ix = fname; ix >= 0; ix--) + av_store(comppad_name, ix, SvREFCNT_inc(pname[ix])); + comppad = newAV(); comppadlist = newAV(); AvREAL_off(comppadlist); - av_store(comppadlist, 0, SvREFCNT_inc((SV*)protopad_name)); + av_store(comppadlist, 0, (SV*)comppad_name); av_store(comppadlist, 1, (SV*)comppad); CvPADLIST(cv) = comppadlist; av_fill(comppad, AvFILL(protopad)); @@ -3137,26 +3146,22 @@ GV* gv; char* p; { if ((!p != !SvPOK(cv)) || (p && strNE(p, SvPVX(cv)))) { - char* buf; + SV* msg = sv_newmortal(); SV* name = Nullsv; if (gv) - gv_efullname3(name = NEWSV(606, 40), gv, Nullch); - New(607, buf, ((name ? SvCUR(name) : 0) - + (SvPOK(cv) ? SvCUR(cv) : 0) - + (p ? strlen(p) : 0) - + 60), char); - strcpy(buf, "Prototype mismatch:"); - if (name) { - sprintf(buf + strlen(buf), " sub %s", SvPVX(name)); - SvREFCNT_dec(name); - } + gv_efullname3(name = sv_newmortal(), gv, Nullch); + sv_setpv(msg, "Prototype mismatch:"); + if (name) + sv_catpvf(msg, " sub %S", name); if (SvPOK(cv)) - sprintf(buf + strlen(buf), " (%s)", SvPVX(cv)); - strcat(buf, " vs "); - sprintf(buf + strlen(buf), p ? "(%s)" : "none", p); - warn("%s", buf); - Safefree(buf); + sv_catpvf(msg, " (%s)", SvPVX(cv)); + sv_catpv(msg, " vs "); + if (p) + sv_catpvf(msg, "(%s)", p); + else + sv_catpv(msg, "none"); + warn("%S", msg); } } @@ -3337,18 +3342,15 @@ OP *block; char *s; if (perldb && curstash != debstash) { - SV *sv; + SV *sv = NEWSV(0,0); SV *tmpstr = sv_newmortal(); static GV *db_postponed; CV *cv; HV *hv; - sprintf(buf, "%s:%ld", - SvPVX(GvSV(curcop->cop_filegv)), (long)subline); - sv = newSVpv(buf,0); - sv_catpv(sv,"-"); - sprintf(buf,"%ld",(long)curcop->cop_line); - sv_catpv(sv,buf); + sv_setpvf(sv, "%S:%ld-%ld", + GvSV(curcop->cop_filegv), + (long)subline, (long)curcop->cop_line); gv_efullname3(tmpstr, gv, Nullch); hv_store(GvHV(DBsub), SvPVX(tmpstr), SvCUR(tmpstr), sv, 0); if (!db_postponed) { @@ -4088,8 +4090,14 @@ OP *op; GV *gv = gv_fetchpv("glob", FALSE, SVt_PVCV); if (gv && GvIMPORTED_CV(gv)) { + static int glob_index; + + append_elem(OP_GLOB, op, + newSVOP(OP_CONST, 0, newSViv(glob_index++))); op->op_type = OP_LIST; op->op_ppaddr = ppaddr[OP_LIST]; + ((LISTOP*)op)->op_first->op_type = OP_PUSHMARK; + ((LISTOP*)op)->op_first->op_ppaddr = ppaddr[OP_PUSHMARK]; op = newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, op, scalar(newUNOP(OP_RV2CV, 0, @@ -4476,6 +4484,7 @@ OP *op; OP *cvop; char *proto = 0; CV *cv = 0; + GV *namegv = 0; int optional = 0; I32 arg = 0; @@ -4487,8 +4496,10 @@ OP *op; tmpop = (SVOP*)((UNOP*)cvop)->op_first; if (tmpop->op_type == OP_GV) { cv = GvCVu(tmpop->op_sv); - if (cv && SvPOK(cv) && !(op->op_private & OPpENTERSUB_AMPER)) - proto = SvPV((SV*)cv,na); + if (cv && SvPOK(cv) && !(op->op_private & OPpENTERSUB_AMPER)) { + namegv = CvANON(cv) ? (GV*)tmpop->op_sv : CvGV(cv); + proto = SvPV((SV*)cv, na); + } } } op->op_private |= (hints & HINT_STRICT_REFS); @@ -4498,7 +4509,7 @@ OP *op; if (proto) { switch (*proto) { case '\0': - return too_many_arguments(op, CvNAME(cv)); + return too_many_arguments(op, gv_ename(namegv)); case ';': optional = 1; proto++; @@ -4517,7 +4528,7 @@ OP *op; proto++; arg++; if (o->op_type != OP_REFGEN && o->op_type != OP_UNDEF) - bad_type(arg, "block", CvNAME(cv), o); + bad_type(arg, "block", gv_ename(namegv), o); break; case '*': proto++; @@ -4538,23 +4549,23 @@ OP *op; switch (*proto++) { case '*': if (o->op_type != OP_RV2GV) - bad_type(arg, "symbol", CvNAME(cv), o); + bad_type(arg, "symbol", gv_ename(namegv), o); goto wrapref; case '&': if (o->op_type != OP_RV2CV) - bad_type(arg, "sub", CvNAME(cv), o); + bad_type(arg, "sub", gv_ename(namegv), o); goto wrapref; case '$': if (o->op_type != OP_RV2SV && o->op_type != OP_PADSV) - bad_type(arg, "scalar", CvNAME(cv), o); + bad_type(arg, "scalar", gv_ename(namegv), o); goto wrapref; case '@': if (o->op_type != OP_RV2AV && o->op_type != OP_PADAV) - bad_type(arg, "array", CvNAME(cv), o); + bad_type(arg, "array", gv_ename(namegv), o); goto wrapref; case '%': if (o->op_type != OP_RV2HV && o->op_type != OP_PADHV) - bad_type(arg, "hash", CvNAME(cv), o); + bad_type(arg, "hash", gv_ename(namegv), o); wrapref: { OP* kid = o; @@ -4573,7 +4584,7 @@ OP *op; default: oops: croak("Malformed prototype for %s: %s", - CvNAME(cv),SvPV((SV*)cv,na)); + gv_ename(namegv), SvPV((SV*)cv, na)); } } else @@ -4583,7 +4594,7 @@ OP *op; o = o->op_sibling; } if (proto && !optional && *proto == '$') - return too_few_arguments(op, CvNAME(cv)); + return too_few_arguments(op, gv_ename(namegv)); return op; } diff --git a/patchlevel.h b/patchlevel.h index a75fc48..e517f7a 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -38,13 +38,7 @@ */ static char *local_patches[] = { NULL - ,"Dev97A - First development patch to 5.003_97" - ,"Dev97B - Second development patch to 5.003_97" - ,"Dev97C - Third development patch to 5.003_97" - ,"Dev97D - Fourth development patch to 5.003_97" - ,"Dev97E - Fifth development patch to 5.003_97" - ,"Dev97F - Sixth development patch to 5.003_97" - ,"Dev97G - Seventh development patch to 5.003_97" + ,"Dev97A-H - Eight development patches to 5.003_97" ,NULL }; diff --git a/perl.c b/perl.c index e4767d5..b4d69cb 100644 --- a/perl.c +++ b/perl.c @@ -59,6 +59,7 @@ dEXTCONST char rcsid[] = "perl.c\nPatch level: ###\n"; dlmax = 128; \ laststatval = -1; \ laststype = OP_STAT; \ + mess_sv = Nullsv; \ } STMT_END static void find_beginning _((void)); @@ -376,6 +377,11 @@ register PerlInterpreter *sv_interp; (long)cxstack_ix + 1); } + + /* Without SVs, messages must be primitive. */ + SvREFCNT_dec(mess_sv); + mess_sv = &sv_undef; + /* Now absolutely destruct everything, somehow or other, loops or no. */ last_sv_count = 0; SvFLAGS(strtab) |= SVTYPEMASK; /* don't clean out strtab now */ @@ -629,40 +635,35 @@ setuid perl scripts securely.\n"); sv_catpv(Sv,"print \"\\nCharacteristics of this binary (from libperl): \\n\","); #endif #if defined(DEBUGGING) || defined(NO_EMBED) || defined(MULTIPLICITY) - strcpy(buf,"\" Compile-time options:"); + sv_catpv(Sv,"\" Compile-time options:"); # ifdef DEBUGGING - strcat(buf," DEBUGGING"); + sv_catpv(Sv," DEBUGGING"); # endif # ifdef NO_EMBED - strcat(buf," NO_EMBED"); + sv_catpv(Sv," NO_EMBED"); # endif # ifdef MULTIPLICITY - strcat(buf," MULTIPLICITY"); + sv_catpv(Sv," MULTIPLICITY"); # endif - strcat(buf,"\\n\","); - sv_catpv(Sv,buf); + sv_catpv(Sv,"\\n\","); #endif #if defined(LOCAL_PATCH_COUNT) if (LOCAL_PATCH_COUNT > 0) { int i; sv_catpv(Sv,"\" Locally applied patches:\\n\","); for (i = 1; i <= LOCAL_PATCH_COUNT; i++) { - if (localpatches[i]) { - sprintf(buf,"\" \\t%s\\n\",",localpatches[i]); - sv_catpv(Sv,buf); - } + if (localpatches[i]) + sv_catpvf(Sv,"\" \\t%s\\n\",",localpatches[i]); } } #endif - sprintf(buf,"\" Built under %s\\n\"",OSNAME); - sv_catpv(Sv,buf); + sv_catpvf(Sv,"\" Built under %s\\n\"",OSNAME); #ifdef __DATE__ # ifdef __TIME__ - sprintf(buf,",\" Compiled at %s %s\\n\"",__DATE__,__TIME__); + sv_catpvf(Sv,",\" Compiled at %s %s\\n\"",__DATE__,__TIME__); # else - sprintf(buf,",\" Compiled on %s\\n\"",__DATE__); + sv_catpvf(Sv,",\" Compiled on %s\\n\"",__DATE__); # endif - sv_catpv(Sv,buf); #endif sv_catpv(Sv, "; \ $\"=\"\\n \"; \ @@ -1341,9 +1342,8 @@ char *s; forbid_setid("-d"); s++; if (*s == ':' || *s == '=') { - sprintf(buf, "use Devel::%s;", ++s); + my_setenv("PERL5DB", form("use Devel::%s;", ++s)); s += strlen(s); - my_setenv("PERL5DB",buf); } if (!perldb) { perldb = TRUE; @@ -1539,15 +1539,20 @@ void my_unexec() { #ifdef UNEXEC + SV* prog; + SV* file; int status; extern int etext; - sprintf (buf, "%s.perldump", origfilename); - sprintf (tokenbuf, "%s/perl", BIN_EXP); + prog = newSVpv(BIN_EXP); + sv_catpv(prog, "/perl"); + file = newSVpv(origfilename); + sv_catpv(file, ".perldump"); - status = unexec(buf, tokenbuf, &etext, sbrk(0), 0); + status = unexec(SvPVX(file), SvPVX(prog), &etext, sbrk(0), 0); if (status) - PerlIO_printf(PerlIO_stderr(), "unexec of %s into %s failed!\n", tokenbuf, buf); + PerlIO_printf(PerlIO_stderr(), "unexec of %s into %s failed!\n", + SvPVX(prog), SvPVX(file)); exit(status); #else # ifdef VMS @@ -1714,16 +1719,19 @@ SV *sv; #endif } else if (preprocess) { - char *cpp = CPPSTDIN; + char *cpp_cfg = CPPSTDIN; + SV *cpp = NEWSV(0,0); + SV *cmd = NEWSV(0,0); + + if (strEQ(cpp_cfg, "cppstdin")) + sv_catpvf(cpp, "%s/", BIN_EXP); + sv_catpv(cpp, cpp_cfg); - if (strEQ(cpp,"cppstdin")) - sprintf(tokenbuf, "%s/%s", BIN_EXP, cpp); - else - sprintf(tokenbuf, "%s", cpp); sv_catpv(sv,"-I"); sv_catpv(sv,PRIVLIB_EXP); + #ifdef MSDOS - (void)sprintf(buf, "\ + sv_setpvf(cmd, "\ sed %s -e \"/^[^#]/b\" \ -e \"/^#[ ]*include[ ]/b\" \ -e \"/^#[ ]*define[ ]/b\" \ @@ -1735,10 +1743,10 @@ sed %s -e \"/^[^#]/b\" \ -e \"/^#[ ]*undef[ ]/b\" \ -e \"/^#[ ]*endif/b\" \ -e \"s/^#.*//\" \ - %s | %s -C %s %s", + %s | %S -C %S %s", (doextract ? "-e \"1,/^#/d\n\"" : ""), #else - (void)sprintf(buf, "\ + sv_setpvf(cmd, "\ %s %s -e '/^[^#]/b' \ -e '/^#[ ]*include[ ]/b' \ -e '/^#[ ]*define[ ]/b' \ @@ -1750,7 +1758,7 @@ sed %s -e \"/^[^#]/b\" \ -e '/^#[ ]*undef[ ]/b' \ -e '/^#[ ]*endif/b' \ -e 's/^[ ]*#.*//' \ - %s | %s -C %s %s", + %s | %S -C %S %s", #ifdef LOC_SED LOC_SED, #else @@ -1758,7 +1766,7 @@ sed %s -e \"/^[^#]/b\" \ #endif (doextract ? "-e '1,/^#/d\n'" : ""), #endif - scriptname, tokenbuf, SvPV(sv, na), CPPMINUS); + scriptname, cpp, sv, CPPMINUS); doextract = FALSE; #ifdef IAMSUID /* actually, this is caught earlier */ if (euid != uid && !euid) { /* if running suidperl */ @@ -1779,7 +1787,9 @@ sed %s -e \"/^[^#]/b\" \ croak("Can't do seteuid!\n"); } #endif /* IAMSUID */ - rsfp = my_popen(buf,"r"); + rsfp = my_popen(SvPVX(cmd), "r"); + SvREFCNT_dec(cmd); + SvREFCNT_dec(cpp); } else if (!*scriptname) { forbid_setid("program input from stdin"); @@ -1800,8 +1810,8 @@ sed %s -e \"/^[^#]/b\" \ #ifndef IAMSUID /* in case script is not readable before setuid */ if (euid && Stat(SvPVX(GvSV(curcop->cop_filegv)),&statbuf) >= 0 && statbuf.st_mode & (S_ISUID|S_ISGID)) { - (void)sprintf(buf, "%s/sperl%s", BIN_EXP, patchlevel); - execv(buf, origargv); /* try again */ + /* try again */ + execv(form("%s/sperl%s", BIN_EXP, patchlevel), origargv); croak("Can't do setuid\n"); } #endif @@ -1948,8 +1958,8 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); if (euid) { /* oops, we're not the setuid root perl */ (void)PerlIO_close(rsfp); #ifndef IAMSUID - (void)sprintf(buf, "%s/sperl%s", BIN_EXP, patchlevel); - execv(buf, origargv); /* try again */ + /* try again */ + execv(form("%s/sperl%s", BIN_EXP, patchlevel), origargv); #endif croak("Can't do setuid\n"); } @@ -2026,15 +2036,12 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); for (which = 1; origargv[which] && origargv[which] != scriptname; which++) ; if (!origargv[which]) croak("Permission denied"); - (void)sprintf(buf, "/dev/fd/%d/%.127s", PerlIO_fileno(rsfp), origargv[which]); - origargv[which] = buf; - + origargv[which] = savepv(form("/dev/fd/%d/%s", + PerlIO_fileno(rsfp), origargv[which])); #if defined(HAS_FCNTL) && defined(F_SETFD) fcntl(PerlIO_fileno(rsfp),F_SETFD,0); /* ensure no close-on-exec */ #endif - - (void)sprintf(tokenbuf, "%s/perl%s", BIN_EXP, patchlevel); - execv(tokenbuf, origargv); /* try again */ + execv(form("%s/perl%s", BIN_EXP, patchlevel), origargv); /* try again */ croak("Can't do setuid\n"); #endif /* IAMSUID */ #else /* !DOSUID */ diff --git a/perl.h b/perl.h index 64561f0..b807b5d 100644 --- a/perl.h +++ b/perl.h @@ -1354,7 +1354,6 @@ EXT SV ** curpad; /* temp space */ EXT SV * Sv; EXT XPV * Xpv; -EXT char buf[2048]; /* should be longer than PATH_MAX */ EXT char tokenbuf[256]; EXT struct stat statbuf; #ifdef HAS_TIMES @@ -1879,6 +1878,7 @@ IEXT bool Ipreambled; IEXT AV * Ipreambleav; IEXT int Ilaststatval IINIT(-1); IEXT I32 Ilaststype IINIT(OP_STAT); +IEXT SV * Imess_sv; #undef IEXT #undef IINIT diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 0613412..70d2216 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -490,6 +490,19 @@ the print function. return print join( $, => map {uc} @_), $\; } +=item PRINTF this, LIST + +This method will be triggered every time the tied handle is printed to +with the C function. +Beyond its self reference it also expects the format and list that was +passed to the printf function. + + sub PRINTF { + shift; + my $fmt = shift; + print sprintf($fmt, @_)."\n"; + } + =item READ this LIST This method will be called when the handle is read from via the C @@ -717,16 +730,16 @@ alphabetically: FindBin.pm Find path of currently executing program Class/Struct.pm Declare struct-like datatypes as Perl classes - File/stat.pm By-name interface to Perl's built-in stat - Net/hostent.pm By-name interface to Perl's built-in gethost* - Net/netent.pm By-name interface to Perl's built-in getnet* - Net/protoent.pm By-name interface to Perl's built-in getproto* - Net/servent.pm By-name interface to Perl's built-in getserv* - Time/gmtime.pm By-name interface to Perl's built-in gmtime - Time/localtime.pm By-name interface to Perl's built-in localtime + File/stat.pm By-name interface to Perl's builtin stat + Net/hostent.pm By-name interface to Perl's builtin gethost* + Net/netent.pm By-name interface to Perl's builtin getnet* + Net/protoent.pm By-name interface to Perl's builtin getproto* + Net/servent.pm By-name interface to Perl's builtin getserv* + Time/gmtime.pm By-name interface to Perl's builtin gmtime + Time/localtime.pm By-name interface to Perl's builtin localtime Time/tm.pm Internal object for Time::{gm,local}time - User/grent.pm By-name interface to Perl's built-in getgr* - User/pwent.pm By-name interface to Perl's built-in getpw* + User/grent.pm By-name interface to Perl's builtin getgr* + User/pwent.pm By-name interface to Perl's builtin getpw* Tie/RefHash.pm Base class for tied hashes with references as keys diff --git a/pod/perlfaq.pod b/pod/perlfaq.pod index 99aeae9..95a4a5c 100644 --- a/pod/perlfaq.pod +++ b/pod/perlfaq.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq - frequently asked questions about Perl ($Date: 1997/03/25 18:20:48 $) +perlfaq - frequently asked questions about Perl ($Date: 1997/04/23 18:11:06 $) =head1 DESCRIPTION @@ -64,8 +64,8 @@ at http://www.perl.com/perl/faq/ . =head2 How to contribute to this document You may mail corrections, additions, and suggestions to -perlfaq-suggestions@perl.com. Mail sent to the old perlfaq alias will -merely cause the FAQ to be sent to you. +perlfaq-suggestions@perl.com . Mail sent to the old perlfaq alias +will merely cause the FAQ to be sent to you. =head2 What will happen if you mail your Perl programming problems to the authors @@ -124,6 +124,20 @@ in respect of this information or its use. =over 4 +=item 23/April/97 + +Added http://www.oasis.leo.org/perl/ to L. Style fix to +L. Added floating point precision, fixed complex number +arithmetic, cross-references, caveat for Text::Wrap, alternative +answer for initial capitalizing, fixed incorrect regexp, added example +of Tie::IxHash to L. Added example of passing and storing +filehandles, added commify to L. Restored variable suicide, +and added mass commenting to L. Added Net::Telnet, fixed +backticks, added reader/writer pair to telnet question, added FindBin, +grouped module questions together in L. Expanded caveats +for the simple URL extractor, gave LWP example, added CGI security +question, expanded on the email address answer in L. + =item 25/March/97 Added more info to the binary distribution section of L. @@ -131,7 +145,7 @@ Added Net::Telnet to L. Fixed typos in L. Added mail sending example to L. Added Merlyn's columns to L. -=item 18/March/97 +=item 18/March/97 Added the DATE to the NAME section, indicating which sections have changed. diff --git a/pod/perlfaq1.pod b/pod/perlfaq1.pod index 99d4b35..6463a98 100644 --- a/pod/perlfaq1.pod +++ b/pod/perlfaq1.pod @@ -168,7 +168,7 @@ notice that perl is not itself written in Perl. The new native-code compiler for Perl may reduce the limitations given in the previous statement to some degree, but understand that Perl remains fundamentally a dynamically typed language, and not a -statically typed one. You certainly won't be chastised if you don't +statically typed one. You certainly won't be chastized if you don't trust nuclear-plant or brain-surgery monitoring code to it. And Larry will sleep easier, too -- Wall Street programs not withstanding. :-) @@ -187,10 +187,10 @@ ok, while "awk and Perl" and "Python and perl" do not. It doesn't matter. In "standard terminology" a I has been compiled to physical -machine code once, and can then be run multiple times, whereas a +machine code once, and can then be be run multiple times, whereas a I