summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-10-19 13:31:07 +0000
committerLarry Wall <lwall@jpl-devvax.jpl.nasa.gov>1990-10-19 13:31:07 +0000
commite5d73d7778736a8bd9f7f44aad5289ad2c783a16 (patch)
tree756f3b46679d7ac7f679ae75de0329852e1155b2
parent20188a906a3fc8fea4839293454a6ca32aa362cc (diff)
downloadperl-e5d73d7778736a8bd9f7f44aad5289ad2c783a16.tar.gz
perl 3.0 patch #37 (combined patch)
I tried to take the strlen of an integer on systems without wait4() or waitpid(). For some reason this didn't work too well... In hash.c there was a call to dbm_nextkey() which needed to be ifdefed on old dbm systems. A pattern such as /foo.*bar$/ was wrongly optimized to do tail matching on "foo". This was a longstanding bug that was unmasked by patch 36. Some systems have some SYS V IPC but not all of it. Configure now figures this out. Patch 36 put the user's PATH in front of Configures, but to make it work right I needed to change all calls of loc to ./loc in Configure. $cryptlib needed to be mentioned in the Makefile. Apollo 10.3 and Sun 3.5 have some compilation problems, so I mentioned them in README. Cray has weird restrictions on setjmp locations--you can't say if (result = setjmp(...)) Random typos and cleanup.
-rwxr-xr-xConfigure86
-rw-r--r--Makefile.SH7
-rw-r--r--README2
-rw-r--r--cmd.c11
-rw-r--r--config.h.SH16
-rw-r--r--doio.c53
-rw-r--r--eg/sysvipc/ipcshm4
-rw-r--r--h2ph.SH4
-rw-r--r--hash.c13
-rw-r--r--makelib.SH2
-rw-r--r--patchlevel.h2
-rw-r--r--perl.man.17
-rw-r--r--perl.man.39
-rw-r--r--perl.man.49
-rw-r--r--regcomp.c25
-rw-r--r--util.c16
-rw-r--r--x2p/s2p.SH7
17 files changed, 204 insertions, 69 deletions
diff --git a/Configure b/Configure
index ca11e1315a..c1cdf6bc55 100755
--- a/Configure
+++ b/Configure
@@ -8,7 +8,7 @@
# 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 3.0.1.10 90/10/15 14:37:52 lwall Locked $
+# $Header: Configure,v 3.0.1.11 90/10/20 01:55:30 lwall Locked $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
@@ -155,6 +155,9 @@ d_strerror=''
d_symlink=''
d_syscall=''
d_sysvipc=''
+d_ipcmsg=''
+d_ipcsem=''
+d_ipcshm=''
d_truncate=''
d_varargs=''
d_vfork=''
@@ -513,7 +516,7 @@ egrep
test
"
for file in $loclist; do
- xxx=`loc $file $file $pth`
+ xxx=`./loc $file $file $pth`
eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
@@ -529,7 +532,7 @@ echo " "
echo "Don't worry if any of the following aren't found..."
ans=offhand
for file in $trylist; do
- xxx=`loc $file $file $pth`
+ xxx=`./loc $file $file $pth`
eval $file=$xxx
eval _$file=$xxx
case "$xxx" in
@@ -639,7 +642,7 @@ $eunicefix filexp
: determine where public executables go
case "$bin" in
'')
- dflt=`loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
+ dflt=`./loc . /bin /usr/local/bin /usr/lbin /usr/local /usr/bin`
;;
*) dflt="$bin"
;;
@@ -676,7 +679,7 @@ $package has manual pages that need to be installed in source form.
EOM
case "$mansrc" in
'')
- dflt=`loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1 /usr/man/man.L`
+ dflt=`./loc . /usr/man/man1 /usr/man/mann /usr/man/manl /usr/man/local/man1 /usr/man/u_man/man1 /usr/man/man1 /usr/man/man.L`
;;
*) dflt="$mansrc"
;;
@@ -810,7 +813,7 @@ EOP
if pdp11 2>/dev/null; then
dflt='unsplit split'
else
- ans=`loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
+ ans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
case "$ans" in
X) dflt='none';;
*) if $test -d /lib/small || $test -d /usr/lib/small; then
@@ -999,7 +1002,7 @@ else
cc="$ans"
fi
case "$cc" in
-gcc*) cpp=`loc gcc-cpp $cpp $pth`;;
+gcc*) cpp=`./loc gcc-cpp $cpp $pth`;;
esac
: determine optimize, if desired, or use for debug flag also
@@ -1130,7 +1133,7 @@ for thislib in $libswanted; do
*) thatlib="${thislib}_s";;
*) thatlib=NONE;;
esac
- xxx=`loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/local/lib /lib`
+ xxx=`./loc lib$thislib.a X /usr/ccs/lib /usr/lib /usr/local/lib /lib`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
@@ -1138,7 +1141,7 @@ for thislib in $libswanted; do
*) dflt="$dflt -l$thislib";;
esac
else
- xxx=`loc lib$thislib.a X $libpth`
+ xxx=`./loc lib$thislib.a X $libpth`
if test -f $xxx; then
echo "Found $xxx."
case "$dflt" in
@@ -1146,7 +1149,7 @@ for thislib in $libswanted; do
*) dflt="$dflt $xxx";;
esac
else
- xxx=`loc Slib$thislib.a X $xlibpth`
+ xxx=`./loc Slib$thislib.a X $xlibpth`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
@@ -1364,7 +1367,7 @@ case "$libpth" in
'') libpth='/usr/ccs/lib /lib /usr/lib /usr/local/lib';;
esac
case "$libs" in
-*-lc_s*) libc=`loc libc_s.a $libc $libpth`
+*-lc_s*) libc=`./loc libc_s.a $libc $libpth`
esac
libnames='';
case "$libs" in
@@ -1372,13 +1375,13 @@ case "$libs" in
*) for thislib in $libs; do
case "$thislib" in
-l*) thislib=`expr X$thislib : 'X-l\(.*\)'`
- try=`loc lib$thislib.a blurfl/dyick $libpth`
+ try=`./loc lib$thislib.a blurfl/dyick $libpth`
if test ! -f $try; then
- try=`loc lib$thislib blurfl/dyick $libpth`
+ try=`./loc lib$thislib blurfl/dyick $libpth`
if test ! -f $try; then
- try=`loc $thislib blurfl/dyick $libpth`
+ try=`./loc $thislib blurfl/dyick $libpth`
if test ! -f $try; then
- try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
+ try=`./loc Slib$thislib.a blurfl/dyick $xlibpth`
if test ! -f $try; then
try=''
fi
@@ -1405,23 +1408,23 @@ elif test -f /lib/libc.a; then
echo "Your C library is in /lib/libc.a. You're normal."
libc=/lib/libc.a
else
- ans=`loc libc.a blurfl/dyick $libpth`
+ ans=`./loc libc.a blurfl/dyick $libpth`
if test ! -f "$ans"; then
- ans=`loc Slibc.a blurfl/dyick $xlibpth`
+ ans=`./loc Slibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Mlibc.a blurfl/dyick $xlibpth`
+ ans=`./loc Mlibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Llibc.a blurfl/dyick $xlibpth`
+ ans=`./loc Llibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc libc blurfl/dyick $libpth`
+ ans=`./loc libc blurfl/dyick $libpth`
fi
if test ! -f "$ans"; then
- ans=`loc clib blurfl/dyick $libpth`
+ ans=`./loc clib blurfl/dyick $libpth`
else
- libnames="$libnames "`loc clib blurfl/dyick $libpth`
+ libnames="$libnames "`./loc clib blurfl/dyick $libpth`
fi
if test -f "$ans"; then
echo "Your C library is in $ans, of all places."
@@ -1599,19 +1602,19 @@ if $contains '^crypt$' libc.list >/dev/null 2>&1; then
d_crypt="$define"
cryptlib=''
else
- cryptlib=`loc Slibcrypt.a "" $xlibpth`
+ cryptlib=`./loc Slibcrypt.a "" $xlibpth`
if $test -z "$cryptlib"; then
- cryptlib=`loc Mlibcrypt.a "" $xlibpth`
+ cryptlib=`./loc Mlibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`loc Llibcrypt.a "" $xlibpth`
+ cryptlib=`./loc Llibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`loc libcrypt.a "" $libpth`
+ cryptlib=`./loc libcrypt.a "" $libpth`
else
cryptlib=-lcrypt
fi
@@ -1765,6 +1768,21 @@ else
echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
fi
+: see if there is System V IPC
+set msgget d_ipcmsg
+eval $inlibc
+
+set semget d_ipcsem
+eval $inlibc
+
+set shmget d_ipcshm
+eval $inlibc
+
+case "$d_ipcmsg$d_ipcsem$d_ipcshm" in
+*define*) d_sysvipc="$define";;
+*) d_sysvipc="$undef";;
+esac
+
: see if killpg exists
set killpg d_killpg
eval $inlibc
@@ -1787,7 +1805,7 @@ eval $inlibc
: see if ndbm is available
echo " "
-xxx=`loc ndbm.h x /usr/include /usr/local/include $inclwanted`
+xxx=`./loc ndbm.h x /usr/include /usr/local/include $inclwanted`
if test -f $xxx; then
d_ndbm="$define"
echo "ndbm.h found."
@@ -1798,7 +1816,7 @@ fi
: see if we have the old dbm
echo " "
-xxx=`loc dbm.h x /usr/include /usr/local/include $inclwanted`
+xxx=`./loc dbm.h x /usr/include /usr/local/include $inclwanted`
if test -f $xxx; then
d_odbm="$define"
echo "dbm.h found."
@@ -2096,10 +2114,6 @@ case "$flags" in
esac
$rm -f try.c try
-: see if there is System V IPC
-set msgget d_sysvipc
-eval $inlibc
-
: see if truncate exists
set truncate d_truncate
eval $inlibc
@@ -2280,7 +2294,7 @@ fi
: see if this is a netinet/in.h system
echo " "
-xxx=`loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
+xxx=`./loc netinet/in.h x /usr/include /usr/local/include $inclwanted`
if test -f $xxx; then
i_niin="$define"
echo "netinet/in.h found."
@@ -2311,7 +2325,7 @@ fi
: see if this is a sys/ndir.h system
echo " "
-xxx=`loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
+xxx=`./loc sys/ndir.h x /usr/include /usr/local/include $inclwanted`
if test -f $xxx; then
i_sysndir="$define"
echo "sys/ndir.h found."
@@ -2515,6 +2529,7 @@ uidtype="$ans"
Log='$Log'
Header='$Header'
+
: determine which malloc to compile in
echo " "
case "$usemymalloc" in
@@ -2730,6 +2745,9 @@ d_strerror='$d_strerror'
d_symlink='$d_symlink'
d_syscall='$d_syscall'
d_sysvipc='$d_sysvipc'
+d_ipcmsg='$d_ipcmsg'
+d_ipcsem='$d_ipcsem'
+d_ipcshm='$d_ipcshm'
d_truncate='$d_truncate'
d_varargs='$d_varargs'
d_vfork='$d_vfork'
diff --git a/Makefile.SH b/Makefile.SH
index 39a7f099cd..3197d60c9e 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -25,9 +25,12 @@ esac
echo "Extracting Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 3.0.1.9 90/10/15 14:41:34 lwall Locked $
+# $Header: Makefile.SH,v 3.0.1.10 90/10/20 01:59:21 lwall Locked $
#
# $Log: Makefile.SH,v $
+# Revision 3.0.1.10 90/10/20 01:59:21 lwall
+# patch37: added cryptlib support to Makefile
+#
# Revision 3.0.1.9 90/10/15 14:41:34 lwall
# patch29: various portability fixes
#
@@ -79,7 +82,7 @@ mallocsrc = $mallocsrc
mallocobj = $mallocobj
SLN = $sln
-libs = $libs
+libs = $libs $cryptlib
public = perl taintperl $suidperl
diff --git a/README b/README
index c25d7da51b..1b96f88322 100644
--- a/README
+++ b/README
@@ -95,8 +95,10 @@ Installation
absence of a specific rule.
The 3b2 needs to turn off -O.
+ Domain/OS 10.3 (at least) native C 6.7 may need -opt 2 for eval.c
AIX/RT may need a -a switch and -DCRIPPLED_CC.
SUNOS 4.0.[12] needs #define fputs(str,fp) fprintf(fp,"%s",str) in perl.h
+ SUNOS 3.[45] should use the system malloc.
SGI machines may need -Ddouble="long float".
Ultrix (2.3) may need to hand assemble teval.s with a -J switch.
Ultrix on MIPS machines may need -DLANGUAGE_C.
diff --git a/cmd.c b/cmd.c
index cf79eee853..d2046209ba 100644
--- a/cmd.c
+++ b/cmd.c
@@ -1,4 +1,4 @@
-/* $Header: cmd.c,v 3.0.1.9 90/10/15 15:32:39 lwall Locked $
+/* $Header: cmd.c,v 3.0.1.10 90/10/20 02:01:56 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: cmd.c,v $
+ * Revision 3.0.1.10 90/10/20 02:01:56 lwall
+ * patch37: cray has weird restrictions on setjmp locations
+ *
* Revision 3.0.1.9 90/10/15 15:32:39 lwall
* patch29: non-existent array values no longer cause core dumps
* patch29: scripts now run at almost full speed under the debugger
@@ -205,7 +208,8 @@ tail_recursion_entry:
#ifdef JMPCLOBBER
cmdparm = cmd;
#endif
- if (match = setjmp(loop_stack[loop_ptr].loop_env)) {
+ match = setjmp(loop_stack[loop_ptr].loop_env);
+ if (match) {
st = stack->ary_array; /* possibly reallocated */
#ifdef JMPCLOBBER
cmd = cmdparm;
@@ -808,7 +812,8 @@ until_loop:
#ifdef JMPCLOBBER
cmdparm = cmd;
#endif
- if (match = setjmp(loop_stack[loop_ptr].loop_env)) {
+ match = setjmp(loop_stack[loop_ptr].loop_env);
+ if (match) {
st = stack->ary_array; /* possibly reallocated */
#ifdef JMPCLOBBER
cmd = cmdparm;
diff --git a/config.h.SH b/config.h.SH
index 3eee31f57a..28ede3df93 100644
--- a/config.h.SH
+++ b/config.h.SH
@@ -424,8 +424,24 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
/* SYSVIPC:
* This symbol, if defined, indicates that System V IPC exists.
*/
+/* IPCMSG:
+ * This symbol, if defined, indicates that System V IPC messages exist.
+ */
+/* IPCSEM:
+ * This symbol, if defined, indicates that System V IPC semaphores exist.
+ */
+/* IPCSHM:
+ * This symbol, if defined, indicates that System V IPC shared memory
+ * exists.
+ */
#$d_sysvipc SYSVIPC /**/
+#$d_ipcmsg IPCMSG /**/
+
+#$d_ipcsem IPCSEM /**/
+
+#$d_ipcshm IPCSHM /**/
+
/* TRUNCATE:
* This symbol, if defined, indicates that the truncate routine is
* available to truncate files.
diff --git a/doio.c b/doio.c
index 9dee30237c..54d01cfa81 100644
--- a/doio.c
+++ b/doio.c
@@ -1,4 +1,4 @@
-/* $Header: doio.c,v 3.0.1.11 90/10/15 16:16:11 lwall Locked $
+/* $Header: doio.c,v 3.0.1.12 90/10/20 02:04:18 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: doio.c,v $
+ * Revision 3.0.1.12 90/10/20 02:04:18 lwall
+ * patch37: split out separate Sys V IPC features
+ *
* Revision 3.0.1.11 90/10/15 16:16:11 lwall
* patch29: added SysV IPC
* patch29: file - didn't auto-close cleanly
@@ -85,10 +88,16 @@
#ifdef SYSVIPC
#include <sys/ipc.h>
+#ifdef IPCMSG
#include <sys/msg.h>
+#endif
+#ifdef IPCSEM
#include <sys/sem.h>
+#endif
+#ifdef IPCSHM
#include <sys/shm.h>
#endif
+#endif
#ifdef I_PWD
#include <pwd.h>
@@ -2341,12 +2350,22 @@ int *arglast;
errno = 0;
switch (optype)
{
+#ifdef IPCMSG
case O_MSGGET:
return msgget(key, flags);
+#endif
+#ifdef IPCSEM
case O_SEMGET:
return semget(key, n, flags);
+#endif
+#ifdef IPCSHM
case O_SHMGET:
return shmget(key, n, flags);
+#endif
+#if !defined(IPCMSG) || !defined(IPCSEM) || !defined(IPCSHM)
+ default:
+ fatal("%s not implemented", opname[optype]);
+#endif
}
return -1; /* should never happen */
}
@@ -2372,14 +2391,19 @@ int *arglast;
switch (optype)
{
+#ifdef IPCMSG
case O_MSGCTL:
if (cmd == IPC_STAT || cmd == IPC_SET)
infosize = sizeof(struct msqid_ds);
break;
+#endif
+#ifdef IPCSHM
case O_SHMCTL:
if (cmd == IPC_STAT || cmd == IPC_SET)
infosize = sizeof(struct shmid_ds);
break;
+#endif
+#ifdef IPCSEM
case O_SEMCTL:
if (cmd == IPC_STAT || cmd == IPC_SET)
infosize = sizeof(struct semid_ds);
@@ -2392,6 +2416,11 @@ int *arglast;
infosize = semds.sem_nsems * sizeof(ushort);
}
break;
+#endif
+#if !defined(IPCMSG) || !defined(IPCSEM) || !defined(IPCSHM)
+ default:
+ fatal("%s not implemented", opname[optype]);
+#endif
}
if (infosize)
@@ -2419,15 +2448,21 @@ int *arglast;
errno = 0;
switch (optype)
{
+#ifdef IPCMSG
case O_MSGCTL:
ret = msgctl(id, cmd, a);
break;
+#endif
+#ifdef IPCSEM
case O_SEMCTL:
ret = semctl(id, n, cmd, a);
break;
+#endif
+#ifdef IPCSHM
case O_SHMCTL:
ret = shmctl(id, cmd, a);
break;
+#endif
}
if (getinfo && ret >= 0) {
astr->str_cur = infosize;
@@ -2440,6 +2475,7 @@ int
do_msgsnd(arglast)
int *arglast;
{
+#ifdef IPCMSG
register STR **st = stack->ary_array;
register int sp = arglast[0];
STR *mstr;
@@ -2456,12 +2492,16 @@ int *arglast;
}
errno = 0;
return msgsnd(id, mbuf, msize, flags);
+#else
+ fatal("msgsnd not implemented");
+#endif
}
int
do_msgrcv(arglast)
int *arglast;
{
+#ifdef IPCMSG
register STR **st = stack->ary_array;
register int sp = arglast[0];
STR *mstr;
@@ -2486,12 +2526,16 @@ int *arglast;
mstr->str_ptr[sizeof(long)+ret] = '\0';
}
return ret;
+#else
+ fatal("msgrcv not implemented");
+#endif
}
int
do_semop(arglast)
int *arglast;
{
+#ifdef IPCSEM
register STR **st = stack->ary_array;
register int sp = arglast[0];
STR *opstr;
@@ -2509,6 +2553,9 @@ int *arglast;
}
errno = 0;
return semop(id, opbuf, opsize/sizeof(struct sembuf));
+#else
+ fatal("semop not implemented");
+#endif
}
int
@@ -2516,6 +2563,7 @@ do_shmio(optype, arglast)
int optype;
int *arglast;
{
+#ifdef IPCSHM
register STR **st = stack->ary_array;
register int sp = arglast[0];
STR *mstr;
@@ -2558,6 +2606,9 @@ int *arglast;
bzero(shm + mpos + n, msize - n);
}
return shmdt(shm);
+#else
+ fatal("shm I/O not implemented");
+#endif
}
#endif /* SYSVIPC */
diff --git a/eg/sysvipc/ipcshm b/eg/sysvipc/ipcshm
index 70588ff865..d40e46b945 100644
--- a/eg/sysvipc/ipcshm
+++ b/eg/sysvipc/ipcshm
@@ -13,8 +13,8 @@ $send = ($mode eq "s");
$SIZE = 32;
$id = shmget(0x1234, $SIZE, ($send ? 0 : &IPC_CREAT) | 0644);
-die "Can't get message queue: $!\n" unless defined($id);
-print "message queue id: $id\n";
+die "Can't get shared memory: $!\n" unless defined($id);
+print "shared memory id: $id\n";
if ($send) {
while (<STDIN>) {
diff --git a/h2ph.SH b/h2ph.SH
index 903cad3a70..fa33efc15a 100644
--- a/h2ph.SH
+++ b/h2ph.SH
@@ -6,7 +6,7 @@ case $CONFIG in
ln ../../../config.sh . || \
(echo "Can't find config.sh."; exit 1)
fi
- . config.sh
+ . ./config.sh
;;
esac
: This forces SH files to create target in same directory as SH file.
@@ -177,7 +177,7 @@ sub expr {
$new .= 'defined';
}
elsif (/^\(/) {
- s/^\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/; # cheat
+ s/^\((\w),/("$1",/ if $id =~ /^_IO[WR]*$/i; # cheat
$new .= " &$id";
}
elsif ($isatype{$id}) {
diff --git a/hash.c b/hash.c
index 8a288df1ff..73ac5b9961 100644
--- a/hash.c
+++ b/hash.c
@@ -1,4 +1,4 @@
-/* $Header: hash.c,v 3.0.1.6 90/10/15 17:32:52 lwall Locked $
+/* $Header: hash.c,v 3.0.1.7 90/10/20 02:10:00 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: hash.c,v $
+ * Revision 3.0.1.7 90/10/20 02:10:00 lwall
+ * patch37: hash.c called ndbm function on dbm system
+ *
* Revision 3.0.1.6 90/10/15 17:32:52 lwall
* patch29: non-existent array values no longer cause core dumps
* patch29: %foo = () will now clear dbm files
@@ -402,7 +405,15 @@ int dodbm;
if ((old_dbm = tb->tbl_dbm) && dodbm) {
while (dkey = dbm_firstkey(tb->tbl_dbm), dkey.dptr) {
do {
+#ifdef NDBM
+#ifdef _CX_UX
nextdkey = dbm_nextkey(tb->tbl_dbm, dkey);
+#else
+ nextdkey = dbm_nextkey(tb->tbl_dbm);
+#endif
+#else
+ nextdkey = nextkey(dkey);
+#endif
dbm_delete(tb->tbl_dbm,dkey);
dkey = nextdkey;
} while (dkey.dptr); /* one way or another, this works */
diff --git a/makelib.SH b/makelib.SH
index e74ba8d794..53dd9f2f05 100644
--- a/makelib.SH
+++ b/makelib.SH
@@ -1,2 +1,2 @@
echo "makelib.SH has been renamed to h2ph.SH"
-rm makelib
+rm -f makelib
diff --git a/patchlevel.h b/patchlevel.h
index d248b3566e..1bff899020 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -1 +1 @@
-#define PATCHLEVEL 36
+#define PATCHLEVEL 37
diff --git a/perl.man.1 b/perl.man.1
index 4f926a48d2..a0854936b3 100644
--- a/perl.man.1
+++ b/perl.man.1
@@ -1,7 +1,10 @@
.rn '' }`
-''' $Header: perl_man.1,v 3.0.1.8 90/10/15 18:16:19 lwall Locked $
+''' $Header: perl_man.1,v 3.0.1.9 90/10/20 02:14:24 lwall Locked $
'''
''' $Log: perl.man.1,v $
+''' Revision 3.0.1.9 90/10/20 02:14:24 lwall
+''' patch37: fixed various typos in man page
+'''
''' Revision 3.0.1.8 90/10/15 18:16:19 lwall
''' patch29: added DATA filehandle to read stuff after __END__
''' patch29: added cmp and <=>
@@ -54,7 +57,7 @@
..
.de Ip
.br
-.ie \\n.$>=3 .ne \\$3
+.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
diff --git a/perl.man.3 b/perl.man.3
index 92b26766f4..80b2ad3c85 100644
--- a/perl.man.3
+++ b/perl.man.3
@@ -1,7 +1,10 @@
''' Beginning of part 3
-''' $Header: perl_man.3,v 3.0.1.9 90/10/16 10:02:43 lwall Locked $
+''' $Header: perl_man.3,v 3.0.1.10 90/10/20 02:15:17 lwall Locked $
'''
''' $Log: perl.man.3,v $
+''' Revision 3.0.1.10 90/10/20 02:15:17 lwall
+''' patch37: patch37: fixed various typos in man page
+'''
''' Revision 3.0.1.9 90/10/16 10:02:43 lwall
''' patch29: you can now read into the middle string
''' patch29: index and substr now have optional 3rd args
@@ -727,14 +730,14 @@ the undefined value if there is an error.
Calls the System V IPC function semop to perform semaphore operations
such as signaling and waiting. OPSTRING must be a packed array of
semop structures. Each semop structure can be generated with
-'pack("sss", $semnum, $semop, $semflag)'. The number of semaphore
+\&'pack("sss", $semnum, $semop, $semflag)'. The number of semaphore
operations is implied by the length of OPSTRING. Returns true if
successful, or false if there is an error. As an example, the
following code waits on semaphore $semnum of semaphore id $semid:
.nf
$semop = pack("sss", $semnum, -1, 0);
- die "Semaphore trouble: $!\n" unless semop($semid, $semop);
+ die "Semaphore trouble: $!\en" unless semop($semid, $semop);
.fi
To signal the semaphore, replace "-1" with "1".
diff --git a/perl.man.4 b/perl.man.4
index 145284e7c5..6a0ef6c971 100644
--- a/perl.man.4
+++ b/perl.man.4
@@ -1,7 +1,10 @@
''' Beginning of part 4
-''' $Header: perl_man.4,v 3.0.1.11 90/10/16 10:04:28 lwall Locked $
+''' $Header: perl_man.4,v 3.0.1.12 90/10/20 02:15:43 lwall Locked $
'''
''' $Log: perl.man.4,v $
+''' Revision 3.0.1.12 90/10/20 02:15:43 lwall
+''' patch37: patch37: fixed various typos in man page
+'''
''' Revision 3.0.1.11 90/10/16 10:04:28 lwall
''' patch29: added @###.## fields to format
'''
@@ -808,7 +811,7 @@ Example:
or, used numerically,
- warn "No checksumming!\n" if $] < 3.019;
+ warn "No checksumming!\en" if $] < 3.019;
.fi
(Mnemonic: Is this version of perl in the right bracket?)
@@ -905,7 +908,7 @@ See $0 for the command name.
The array INC contains the list of places to look for
.I perl
scripts to be
-evaluated by the \*(L"do EXPR\*(R" command or the \*(L"require\*(r" command.
+evaluated by the \*(L"do EXPR\*(R" command or the \*(L"require\*(R" command.
It initially consists of the arguments to any
.B \-I
command line switches, followed
diff --git a/regcomp.c b/regcomp.c
index 04d62c313b..99dd81b9d6 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -7,9 +7,12 @@
* blame Henry for some of the lack of readability.
*/
-/* $Header: regcomp.c,v 3.0.1.6 90/10/16 10:17:33 lwall Locked $
+/* $Header: regcomp.c,v 3.0.1.7 90/10/20 02:18:32 lwall Locked $
*
* $Log: regcomp.c,v $
+ * Revision 3.0.1.7 90/10/20 02:18:32 lwall
+ * patch37: /foo.*bar$/ wrongly optimized to do tail matching on "foo"
+ *
* Revision 3.0.1.6 90/10/16 10:17:33 lwall
* patch29: patterns with multiple short literal strings sometimes failed
*
@@ -250,7 +253,7 @@ int fold;
len = 0;
curback = 0;
back = 0;
- while (scan != NULL) {
+ while (OP(scan) != END) {
if (OP(scan) == BRANCH) {
if (OP(regnext(scan)) == BRANCH) {
curback = -30000;
@@ -288,13 +291,22 @@ int fold;
str_sset(longest,longish);
str_nset(longish,"",0);
}
- else if (index(simple,OP(scan)))
+ else if (index(simple,OP(scan))) {
curback++;
+ len = 0;
+ if (longish->str_cur > longest->str_cur)
+ str_sset(longest,longish);
+ str_nset(longish,"",0);
+ }
scan = regnext(scan);
}
- if (longish->str_cur > longest->str_cur)
+
+ /* Prefer earlier on tie, unless we can tail match latter */
+
+ if (longish->str_cur + (OP(first) == EOL) > longest->str_cur)
str_sset(longest,longish);
- str_free(longish);
+ else
+ str_nset(longish,"",0);
if (longest->str_cur) {
r->regmust = longest;
if (back < 0)
@@ -304,11 +316,12 @@ int fold;
> !(sawstudy || fold || OP(first) == EOL) )
fbmcompile(r->regmust,fold);
r->regmust->str_u.str_useful = 100;
- if (OP(first) == EOL) /* is match anchored to EOL? */
+ if (OP(first) == EOL && longish->str_cur)
r->regmust->str_pok |= SP_TAIL;
}
else
str_free(longest);
+ str_free(longish);
}
r->do_folding = fold;
diff --git a/util.c b/util.c
index 74df0fdac4..c1c7d5a01a 100644
--- a/util.c
+++ b/util.c
@@ -1,4 +1,4 @@
-/* $Header: util.c,v 3.0.1.8 90/10/16 11:26:57 lwall Locked $
+/* $Header: util.c,v 3.0.1.9 90/10/20 02:21:01 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
@@ -6,6 +6,10 @@
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: util.c,v $
+ * Revision 3.0.1.9 90/10/20 02:21:01 lwall
+ * patch37: tried to take strlen of integer on systems without wait4 or waitpid
+ * patch37: unreachable return eliminated
+ *
* Revision 3.0.1.8 90/10/16 11:26:57 lwall
* patch29: added waitpid
* patch29: various portability fixes
@@ -1341,10 +1345,10 @@ int flags;
#else
if (pid > 0) {
sprintf(spid, "%d", pid);
- str = hfetch(pidstatus,spid,strlen(pid),FALSE);
+ str = hfetch(pidstatus,spid,strlen(spid),FALSE);
if (str != &str_undef) {
*statusp = (int)str->str_u.str_useful;
- hdelete(pidstatus,spid,strlen(pid));
+ hdelete(pidstatus,spid,strlen(spid));
return pid;
}
}
@@ -1357,7 +1361,7 @@ int flags;
str = hiterval(entry);
*statusp = (int)str->str_u.str_useful;
sprintf(spid, "%d", pid);
- hdelete(pidstatus,spid,strlen(pid));
+ hdelete(pidstatus,spid,strlen(spid));
return pid;
}
}
@@ -1373,9 +1377,9 @@ int flags;
if (result < 0)
*statusp = -1;
}
+ return result;
#endif
#endif
- return result;
}
#endif /* !MSDOS */
@@ -1389,7 +1393,7 @@ int status;
char spid[16];
sprintf(spid, "%d", pid);
- str = hfetch(pidstatus,pid,strlen(pid),TRUE);
+ str = hfetch(pidstatus,spid,strlen(spid),TRUE);
str->str_u.str_useful = status;
#endif
return;
diff --git a/x2p/s2p.SH b/x2p/s2p.SH
index 553cfd68d9..9898dcf6a0 100644
--- a/x2p/s2p.SH
+++ b/x2p/s2p.SH
@@ -11,7 +11,7 @@ case $CONFIG in
ln ../../../config.sh . || \
(echo "Can't find config.sh."; exit 1)
fi
- . config.sh
+ . ./config.sh
;;
esac
echo "Extracting s2p (with variable substitutions)"
@@ -28,9 +28,12 @@ $spitshell >s2p <<!GROK!THIS!
: In the following dollars and backticks do not need the extra backslash.
$spitshell >>s2p <<'!NO!SUBS!'
-# $Header: s2p.SH,v 3.0.1.5 90/10/16 11:32:40 lwall Locked $
+# $Header: s2p.SH,v 3.0.1.6 90/10/20 02:21:43 lwall Locked $
#
# $Log: s2p.SH,v $
+# Revision 3.0.1.6 90/10/20 02:21:43 lwall
+# patch37: changed some ". config.sh" to ". ./config.sh"
+#
# Revision 3.0.1.5 90/10/16 11:32:40 lwall
# patch29: s2p modernized
#