diff options
author | Larry Wall <lwall@netlabs.com> | 1991-11-05 10:12:55 +0000 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1991-11-05 10:12:55 +0000 |
commit | f1ca563b1a195a92d64b84ed3b4f859a5807e204 (patch) | |
tree | 078c1452204e3d72336ae335a9831fe4dde80a3a /Makefile.SH | |
parent | 1462b684862954f3522657efc93a3264698e4a9f (diff) | |
download | perl-f1ca563b1a195a92d64b84ed3b4f859a5807e204.tar.gz |
perl 4.0 patch 11: (combined patch)
Subject: added eval {}
Subject: eval 'stuff' now optimized to eval {stuff}
This set of patches doesn't have many enhancements but this is
one of them. The eval operator has two distinct semantic functions.
First, it runs the parser on some random string and executes it.
Second, it traps exceptions and returns them in $@. There are times
when you'd like to get the second function without the first. In
order to do that, you can now eval a block of code, which is parsed
like ordinary code at compile time, but which traps any run-time
errors and returns them in the $@ variable. For instance, to
trap divide by zero errors:
eval {
$answer = $foo / $bar;
};
warn $@ if $@;
Since single-quoted strings don't ever change, they are optimized
to the eval {} form the first time they are encountered at run-time.
This doesn't happen too often, though some of you have written things
like eval '&try_this;'. However, the righthand side of s///e is
evaluated as a single-quoted string, so this construct should run
somewhat faster now.
Subject: added sort {} LIST
Another enhancement that some of you have been hankering for.
You can now inline the sort subroutine as a block where the
subroutine name used to go:
@articles = sort {$a <=> $b;} readdir(DIR);
Subject: added some support for 64-bit integers
For Convexen and Crayen, which have 64-bit integers, there's
now pack, unpack and sprintf support for 64-bit integers.
Subject: sprintf() now supports any length of s field
You can now use formats like %2048s and %-8192.8192s. Perl will
totally bypass your system's sprintf() function on these. No,
you still probably can't say %2048d. No, I'm not going to
change that any time soon.
Subject: substr() and vec() weren't allowed in an lvalue list
Subject: extra comma at end of list is now allowed in more places (Hi, Felix!)
Subject: underscore is now allowed within literal octal and hex numbers
Various syntactic relaxations. You can now get away with
(substr($foo,0,3), substr($bar,0,3)) = ('abc', 'def');
(1,2,3,)[$x];
$addr = 0x1a20_ff0b;
Subject: safe malloc code now integrated into Perl's malloc when possible
To save a bunch of subroutine calls. If you use your system's
malloc it still has to use wrappers.
Subject: added support for dbz
By saying "make dbzperl" you can make a copy of Perl that can
access C news's dbz files. You still have to follow the dbz rules,
though, if you're going to try to write a dbz file.
Subject: there are now subroutines for calling back from C into Perl
Subject: usub/curses.mus now supports SysV curses
More C linkage support. I still haven't got Perl embeddable, but
we're getting there. That's too big an enhancement for this
update, in which I've been trying to stick to bug fixes, with some
success.
Subject: prepared for ctype implementations that don't define isascii()
A larger percentage of this update consists of code to do
consistent ctype processing whether or not <ctype.h> is 8-bit
clean.
Subject: /$foo/o optimizer could access deallocated data
Subject: certain optimizations of //g in array context returned too many values
Subject: regexp with no parens in array context returned wacky $`, $& and $'
Subject: $' not set right on some //g
Subject: grep of a split lost its values
Subject: # fields could write outside allocated memory
Subject: length($x) was sometimes wrong for numeric $x
Recently added or modified stuff that you kind of expect to be
a bit flaky still. Well, I do...
Subject: passing non-existend array elements to subrouting caused core dump
Subject: "foo" x -1 dumped core
Subject: truncate on a closed filehandle could dump
Subject: a last statement outside any block caused occasional core dumps
Subject: missing arguments caused core dump in -D8 code
Subject: cacheout.pl could dump core from invalid comparison operator
Subject: *foo = undef coredumped
Subject: warn '-' x 10000 dumped core
Subject: index("little", "longer string") could visit faraway places
A bunch of natty little bugs that you wouldn't generally run into
unless you're trying to be coy.
Subject: hex() didn't understand leading 0x
It wasn't documented that it should work, but oct() understands 0x,
so why not hex()? I dunno...
Subject: "foo\0" eq "foo" was sometimes optimized to true
Subject: eval confused by string containing null
Yet more holdovers from the time before Perl was 8-bit clean.
Subject: foreach on null list could spring memory leak
Subject: local(*FILEHANDLE) had a memory leak
Kind of slow leaks, as leaks go. Still...
Subject: minimum match length calculation in regexp is now cumulative
More substitutions can be done in place now because Perl knows
that patterns like in s/foo\s+bar/1234567/ have to match a
certain number of characters total. It used to be on that
particular pattern that it only knew that it had to match at
least 3 characters. Now it know it has to match at least 7.
Subject: multiple reallocations now avoided in 1 .. 100000
You still don't want to say 1 .. 1000000, but at least it will
refrain from allocating intermediate sized blocks while it's
constructing the value, and won't do the extra copies implied
by realloc.
Subject: indirect subroutine calls through magic vars (e.g. &$1) didn't work
Subject: defined(&$foo) and undef(&$foo) didn't work
Subject: certain perl errors should set EBADF so that $! looks better
Subject: stats of _ forgot whether prior stat was actually lstat
Subject: -T returned true on NFS directory
Subject: sysread() in socket was substituting recv()
Subject: formats didn't fill their fields as well as they could
Subject: ^ fields chopped hyphens on line break
Subject: -P didn't allow use of #elif or #undef
Subject: $0 was being truncated at times
Subject: forked exec on non-existent program now issues a warning
Various things you'd expect to work the way you expect, but
didn't when you did, or I did, or something...
Subject: perl mistook some streams for sockets because they return mode 0 too
Subject: reopening STDIN, STDOUT and STDERR failed on some machines
Problems opening files portably. So what's new?
Subject: cppstdin now installed outside of source directory
Subject: installperl now overrides installer's umask
People who used cppstdin for the cpp filter or who had their
umask set to 700 will now be happier. (And Configure will now
prefer /lib/cpp over cppstdin like it used to. If this gives
your machine heartburn because /lib/cpp doesn't set the symbols
it should, write a hints file to poke them into ccflags.)
Subject: initial .* in pattern had dependency on value of $*
An initial .* was optimized to have a ^ on the front to avoid retrying
when we know it won't match. Unfortunately this implicit ^ was
paying attention to $*, which it shouldn't have been.
Subject: certain patterns made use of garbage pointers from uncleared memory
Many of you saw this as a failure in t/op/pat.t.
Subject: perl now issues warning if $SIG{'ALARM'} is referenced
Since the book mentions "SIGALARM", I thought we needed this.
Subject: solitary subroutine references no longer trigger typo warnings
You can now use -w (more) profitably on programs that require
other files. I figured if you mistype a subroutine name you'll
get a fatal error anyway, unlike a variable, which just defaults
to being undefined.
Subject: $foo .= <BAR> could overrun malloced memory
Good old-fashioned bug.
Subject: \$ didn't always make it through double-quoter to regexp routines
Subject: \x and \c were subject to double interpretation in regexps
Subject: nested list operators could miscount parens
Subject: sort eval "whatever" didn't work
Syntactic misfeatures of various sorts.
Subject: find2perl produced incorrect code for -group
Subject: find2perl could be confused by names containing whitespace
Subject: in a2p, split on whitespace produced extra null field
Translator stuff.
Subject: new complete.pl from Wayne Thompson
Subject: assert.pl and exceptions.pl from Tom Christiansen
Subject: added Tom's c2ph stuff
Subject: getcwd.pl from Brandon S. Allbery
Subject: fastcwd.pl from John Basik
Subject: chat2.pl from Randal L. Schwartz
New contributed stuff. Thanks!
(Not that a lot of the other stuff isn't contributed too...)
Subject: debugger got confused over nested subroutine definitions
Subject: once-thru blocks didn't display right in the debugger
Subject: perldb.pl modified to run within emacs in perldb-mode
Debugger stuff. The first two were caused by not saving line
numbers at exactly the right moment.
Subject: documented meaning of scalar(%foo)
I also updated the Errata section of the man page.
Subject: various portability fixes
Subject: random cleanup
Subject: saberized perl
Type casts, saber warning message suppression, hints files and various
metaconfig fiddlehoods.
Diffstat (limited to 'Makefile.SH')
-rw-r--r-- | Makefile.SH | 123 |
1 files changed, 74 insertions, 49 deletions
diff --git a/Makefile.SH b/Makefile.SH index 3efc862e28..cc60bf39c6 100644 --- a/Makefile.SH +++ b/Makefile.SH @@ -25,9 +25,13 @@ esac echo "Extracting Makefile (with variable substitutions)" cat >Makefile <<!GROK!THIS! -# $RCSfile: Makefile.SH,v $$Revision: 4.0.1.2 $$Date: 91/06/07 10:14:43 $ +# $RCSfile: Makefile.SH,v $$Revision: 4.0.1.3 $$Date: 91/11/05 15:48:11 $ # # $Log: Makefile.SH,v $ +# Revision 4.0.1.3 91/11/05 15:48:11 lwall +# patch11: saberized perl +# patch11: added support for dbz +# # Revision 4.0.1.2 91/06/07 10:14:43 lwall # patch4: cflags now emits entire cc command except for the filename # patch4: alternate make programs are now semi-supported @@ -56,6 +60,7 @@ LARGE = $large $split mallocsrc = $mallocsrc mallocobj = $mallocobj SLN = $sln +RMS = rm -f libs = $libs $cryptlib @@ -91,8 +96,14 @@ c3 = stab.c str.c toke.c util.c usersub.c c = $(c1) $(c2) $(c3) +s1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c +s2 = eval.c form.c hash.c perl.c regcomp.c regexec.c +s3 = stab.c str.c toke.c util.c usersub.c perly.c + +saber = $(s1) $(s2) $(s3) + obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o -obj2 = eval.o form.o hash.o $(mallocobj) perl.o regcomp.o regexec.o +obj2 = eval.o form.o $(mallocobj) perl.o regcomp.o regexec.o obj3 = stab.o str.o toke.o util.o obj = $(obj1) $(obj2) $(obj3) @@ -122,14 +133,26 @@ all: $(public) $(private) $(util) uperl.o $(scripts) # The $& notation is tells Sequent machines that it can do a parallel make, # and is harmless otherwise. -perl: $& perly.o $(obj) usersub.o - $(CC) $(LARGE) $(CLDFLAGS) $(obj) perly.o usersub.o $(libs) -o perl +perl: $& perly.o $(obj) hash.o usersub.o + $(CC) $(LARGE) $(CLDFLAGS) $(obj) hash.o perly.o usersub.o $(libs) -o perl + +# This command assumes that /usr/include/dbz.h and /usr/lib/dbz.o exist. + +dbzperl: $& perly.o $(obj) zhash.o usersub.o + $(CC) $(LARGE) $(CLDFLAGS) $(obj) zhash.o /usr/lib/dbz.o perly.o usersub.o $(libs) -o dbzperl + +zhash.o: hash.c $(h) + $(RMS) zhash.c + $(SLN) hash.c zhash.c + $(CCCMD) -DWANT_DBZ zhash.c + $(RMS) zhash.c -uperl.o: $& perly.o $(obj) - -ld $(LARGE) $(LDFLAGS) -r $(obj) perly.o -o uperl.o +uperl.o: $& perly.o $(obj) hash.o + -ld $(LARGE) $(LDFLAGS) -r $(obj) hash.o perly.o -o uperl.o -saber: perly.c - # load $(c) perly.c +saber: $(saber) + # load $(saber) + # load /lib/libm.a # This version, if specified in Configure, does ONLY those scripts which need # set-id emulation. Suidperl must be setuid root. It contains the "taint" @@ -152,124 +175,124 @@ taintperl: $& tperly.o tperl.o $(tobj) usersub.o # Replicating all this junk is yucky, but I don't see a portable way to fix it. tperly.o: perly.c perly.h $(h) - /bin/rm -f tperly.c + $(RMS) tperly.c $(SLN) perly.c tperly.c $(CCCMD) -DTAINT tperly.c - /bin/rm -f tperly.c + $(RMS) tperly.c tperl.o: perl.c perly.h patchlevel.h perl.h $(h) - /bin/rm -f tperl.c + $(RMS) tperl.c $(SLN) perl.c tperl.c $(CCCMD) -DTAINT tperl.c - /bin/rm -f tperl.c + $(RMS) tperl.c sperl.o: perl.c perly.h patchlevel.h $(h) - /bin/rm -f sperl.c + $(RMS) sperl.c $(SLN) perl.c sperl.c $(CCCMD) -DTAINT -DIAMSUID sperl.c - /bin/rm -f sperl.c + $(RMS) sperl.c tarray.o: array.c $(h) - /bin/rm -f tarray.c + $(RMS) tarray.c $(SLN) array.c tarray.c $(CCCMD) -DTAINT tarray.c - /bin/rm -f tarray.c + $(RMS) tarray.c tcmd.o: cmd.c $(h) - /bin/rm -f tcmd.c + $(RMS) tcmd.c $(SLN) cmd.c tcmd.c $(CCCMD) -DTAINT tcmd.c - /bin/rm -f tcmd.c + $(RMS) tcmd.c tcons.o: cons.c $(h) perly.h - /bin/rm -f tcons.c + $(RMS) tcons.c $(SLN) cons.c tcons.c $(CCCMD) -DTAINT tcons.c - /bin/rm -f tcons.c + $(RMS) tcons.c tconsarg.o: consarg.c $(h) - /bin/rm -f tconsarg.c + $(RMS) tconsarg.c $(SLN) consarg.c tconsarg.c $(CCCMD) -DTAINT tconsarg.c - /bin/rm -f tconsarg.c + $(RMS) tconsarg.c tdoarg.o: doarg.c $(h) - /bin/rm -f tdoarg.c + $(RMS) tdoarg.c $(SLN) doarg.c tdoarg.c $(CCCMD) -DTAINT tdoarg.c - /bin/rm -f tdoarg.c + $(RMS) tdoarg.c tdoio.o: doio.c $(h) - /bin/rm -f tdoio.c + $(RMS) tdoio.c $(SLN) doio.c tdoio.c $(CCCMD) -DTAINT tdoio.c - /bin/rm -f tdoio.c + $(RMS) tdoio.c tdolist.o: dolist.c $(h) - /bin/rm -f tdolist.c + $(RMS) tdolist.c $(SLN) dolist.c tdolist.c $(CCCMD) -DTAINT tdolist.c - /bin/rm -f tdolist.c + $(RMS) tdolist.c tdump.o: dump.c $(h) - /bin/rm -f tdump.c + $(RMS) tdump.c $(SLN) dump.c tdump.c $(CCCMD) -DTAINT tdump.c - /bin/rm -f tdump.c + $(RMS) tdump.c teval.o: eval.c $(h) - /bin/rm -f teval.c + $(RMS) teval.c $(SLN) eval.c teval.c $(CCCMD) -DTAINT teval.c - /bin/rm -f teval.c + $(RMS) teval.c tform.o: form.c $(h) - /bin/rm -f tform.c + $(RMS) tform.c $(SLN) form.c tform.c $(CCCMD) -DTAINT tform.c - /bin/rm -f tform.c + $(RMS) tform.c thash.o: hash.c $(h) - /bin/rm -f thash.c + $(RMS) thash.c $(SLN) hash.c thash.c $(CCCMD) -DTAINT thash.c - /bin/rm -f thash.c + $(RMS) thash.c tregcomp.o: regcomp.c $(h) - /bin/rm -f tregcomp.c + $(RMS) tregcomp.c $(SLN) regcomp.c tregcomp.c $(CCCMD) -DTAINT tregcomp.c - /bin/rm -f tregcomp.c + $(RMS) tregcomp.c tregexec.o: regexec.c $(h) - /bin/rm -f tregexec.c + $(RMS) tregexec.c $(SLN) regexec.c tregexec.c $(CCCMD) -DTAINT tregexec.c - /bin/rm -f tregexec.c + $(RMS) tregexec.c tstab.o: stab.c $(h) - /bin/rm -f tstab.c + $(RMS) tstab.c $(SLN) stab.c tstab.c $(CCCMD) -DTAINT tstab.c - /bin/rm -f tstab.c + $(RMS) tstab.c tstr.o: str.c $(h) perly.h - /bin/rm -f tstr.c + $(RMS) tstr.c $(SLN) str.c tstr.c $(CCCMD) -DTAINT tstr.c - /bin/rm -f tstr.c + $(RMS) tstr.c ttoke.o: toke.c $(h) perly.h - /bin/rm -f ttoke.c + $(RMS) ttoke.c $(SLN) toke.c ttoke.c $(CCCMD) -DTAINT ttoke.c - /bin/rm -f ttoke.c + $(RMS) ttoke.c tutil.o: util.c $(h) - /bin/rm -f tutil.c + $(RMS) tutil.c $(SLN) util.c tutil.c $(CCCMD) -DTAINT tutil.c - /bin/rm -f tutil.c + $(RMS) tutil.c perly.h: perly.c @ echo Dummy dependency for dumb parallel make @@ -298,6 +321,7 @@ realclean: clean rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir rm -f makefile x2p/Makefile x2p/makefile cflags x2p/cflags + rm -f c2ph pstruct # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. @@ -327,7 +351,7 @@ shlist: echo $(sh) | tr ' ' '\012' >.shlist # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE -$(obj): +$(obj) hash.o: @ echo "You haven't done a "'"make depend" yet!'; exit 1 makedepend: makedepend.SH /bin/sh makedepend.SH @@ -339,3 +363,4 @@ case `pwd` in ln Makefile ../Makefile ;; esac +rm -f makefile |