This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 3.0 patch #5 (combined patch)
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>
Fri, 17 Nov 1989 03:02:33 +0000 (03:02 +0000)
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>
Fri, 17 Nov 1989 03:02:33 +0000 (03:02 +0000)
commit0d3e774cdb279a1eadd8282d49334b9b1bfd42ed
treefb045eec0f917ecabe28bd3c3c3d20dcdd27aae2
parentae98613044a1084886d80b8283b25bad38cfd171
perl 3.0 patch #5 (combined patch)

Some machines have bcopy() but not bzero(), so Configure
tests for them separately now.  Likewise for symlink() and lstat().
Some systems have dirent.h but not readdir().  The symbols BZERO,
LSTAT and READDIR are now used to differentiate.

Some machines have <time.h> including <sys/time.h>.  Some do
the opposite.  Some don't even have <sys/time.h>.  Configure
now looks for both kinds of include, and the saga continues...

Configure tested twice for the presence of -lnm because x2p/Makefile.SH
had a reference to the obsolete $libnm variable.  It now tests
only once.

Some machines have goodies stashed in /usr/include/sun,
/usr/include/bsd, -lsun and -lbsd.  Configure now checks those
locations.

Configure could sometimes add an option to a default of none,
producing [none -DDEBUGGING] prompts.  This is fixed.

Many of the units in metaconfig used the construct
    if xxx=`loc...`; then
On most machines the exit status of loc ends up in $?, but on
a few machines, the assignment apparently sets $? to 0, since
it always succeeds.  Oh well...

The tests for byte order had difficulties with illegal octal
digits and constants that were too long, as well as not defining
the union in try.c correctly.

When <dirent.h> was missing, it was assumed that the field d_namlen
existed.  There is now an explicit check of <sys/dir.h> for the field.

The tests of <signal.h> to see how signal() is declared needed to have
signal.h run through the C preprocessor first because of POSIX ifdefs.

The type returned by getgroups() was defaulting wrong on Suns and
such.  Configure now checks against the lint library if it exists
to produce a better default.

The construct
    foreach $elem (@array) {
foreach $elem (@array) {
    ...
}
    }
didn't work right because the iterator for the array was stored
with the array rather than with the node in the syntax tree.

If you said
    defined $foo{'bar'}
it would create the element $foo{'bar'} while returning the
correct value.  It now no longer creates the value.

The grep() function was occasionally losing arguments or dumping core.
This was because it called eval() on each argument but didn't
account for the fact that eval() is capable of reallocating the
stack.

If you said
    $something ? $foo[1] : $foo[2]
you ended up (usually) with
    $something ? $foo[0] : $foo[0]
because of the way the ?: operator tries to fool the stack into
thinking there's only one argument there instead of three.  This
only happened to constant subscripts.  Interestingly enough,
    $abc[1] ? $foo[1] : $bar[1]
would have worked, since the first argument has the same subscript.

Some machines already define TRUE and FALSE, so we have to undef
them to avoid warnings.

Several people sent in some fixes for manual typos and indent problems.
There was a reqeust to clarify the difference between $! and $@, and
I added a gratuitous warning about print making an array context for
its arguments, since people seem to run into that frequently.

suidperl could correctly emulate a setgid script, but then it could
get confused about what the actual effective gid was.

Some machine or other defines sighandler(), so perl's sighandler()
needed to be made static.

We changed uchar to unchar for Crays, and it turns out that lots
of SysV machines typedef unchar instead.  Sigh.  It's now un_char.

If you did substitutions to chop leading components off a string,
and then set the string from <filehandle>, under certain circumstances
the input string could be corrupted because str_gets() called
str_grow() without making sure to change the strings current length to
be the number of characters just read, rather than the old length.

op.stat occasionally failed with NFS race condition, so it now waits
two seconds instead of one to guarantee that the NFS server advances
its clock at least one second.

IBM PC/RT compiler can't deal with UNI() and LOP() macros.  If you
define CRIPPLED_CC it now will recast those macros as subroutines,
which runs a little slower but doesn't give the compiler heartburn.

The } character can terminate either an associative array subscript
or a BLOCK.  These set up different expectations as to whether the
next token might be a term or an operator.  There was a faulty
heuristic based on whether there was an intervening newline.
It turns out that if } simply leaves the current expectations along,
the right thing happens.

The command y/abcde// didn't work because the length of the first
part was not correctly copied to the second part.

In s2p, line labels without a subsequent statement were done wrong,
since an extra semicolon needs to be supplied.  It wasn't always
suppplied, and when it was supplied, it was in the wrong place.
S2p also needed to remove its /tmp files better.

A2p translates
    for (a in b)
to
    foreach $a} (keys(%b))
on Pyramids, because index(s, '}' + 128) doesn't find a } with the
top bit set.  This has been fixed.
15 files changed:
Configure
array.c
array.h
cmd.c
config.h.SH
cons.c
consarg.c
doio.c
dolist.c
eval.c
evalargs.xc
handy.h
patchlevel.h
t/op.stat
x2p/Makefile.SH