summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-17 03:02:33 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1989-11-17 03:02:33 +0000
commit0d3e774cdb279a1eadd8282d49334b9b1bfd42ed (patch)
treefb045eec0f917ecabe28bd3c3c3d20dcdd27aae2 /handy.h
parentae98613044a1084886d80b8283b25bad38cfd171 (diff)
downloadperl-0d3e774cdb279a1eadd8282d49334b9b1bfd42ed.tar.gz
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.
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/handy.h b/handy.h
index 37cfef47d9..a19f684602 100644
--- a/handy.h
+++ b/handy.h
@@ -1,4 +1,4 @@
-/* $Header: handy.h,v 3.0 89/10/18 15:18:24 lwall Locked $
+/* $Header: handy.h,v 3.0.1.1 89/11/17 15:25:55 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
@@ -6,6 +6,9 @@
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: handy.h,v $
+ * Revision 3.0.1.1 89/11/17 15:25:55 lwall
+ * patch5: some machines already define TRUE and FALSE
+ *
* Revision 3.0 89/10/18 15:18:24 lwall
* 3.0 baseline
*
@@ -28,6 +31,13 @@
#else
#define bool char
#endif
+
+#ifdef TRUE
+#undef TRUE
+#endif
+#ifdef FALSE
+#undef FALSE
+#endif
#define TRUE (1)
#define FALSE (0)