# 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.3 89/11/17 15:01:21 lwall Locked $
+# $Header: Configure,v 3.0.1.4 89/12/21 18:57:00 lwall Locked $
#
# Yes, you may rip this off to use in other distribution packages.
# (Note: this Configure script was generated automatically. Rather than
d_getgrps=''
d_gethent=''
d_getpgrp=''
+d_getpgrp2=''
d_getprior=''
d_htonl=''
d_index=''
d_setegid=''
d_seteuid=''
d_setpgrp=''
+d_setpgrp2=''
d_setprior=''
d_setregid=''
d_setresgid=''
d_statblks=''
d_stdstdio=''
d_strctcpy=''
+d_strerror=''
d_symlink=''
d_syscall=''
-d_tminsys=''
-i_systime=''
-i_timetoo=''
-i_systimetoo=''
d_varargs=''
d_vfork=''
d_voidsig=''
d_pwexpire=''
i_sysdir=''
i_sysioctl=''
+i_sysndir=''
+i_time=''
+i_systime=''
+d_systimekernel=''
+i_utime=''
i_varargs=''
i_vfork=''
intsize=''
uidtype=''
voidflags=''
defvoidused=''
-lib=''
+yacc=''
privlib=''
+lib=''
CONFIG=''
: set package name
package=perl
define='define'
undef='undef'
-libpth='/usr/lib /usr/local/lib /usr/lib/386 /usr/lib/large /lib /lib/386 /lib/large /usr/lib/small /lib/small'
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+libpth='/usr/lib /usr/local/lib /usr/lib/large /lib '$xlibpth' /lib/large /usr/lib/small /lib/small'
smallmach='pdp11 i8086 z8000 i80286 iAPX286'
rmlist='kit[1-9]isdone kit[1-9][0-9]isdone'
trap 'echo " "; rm -f $rmlist; exit 1' 1 2 3
attrlist="$attrlist ns32000 ns16000 iAPX286 mc300 mc500 mc700 sparc"
attrlist="$attrlist nsc32000 sinix xenix venix posix ansi M_XENIX"
attrlist="$attrlist $mc68k __STDC__ UTS M_I8086 M_I186 M_I286 M_I386"
-attrlist="$attrlist i186"
+attrlist="$attrlist i186 __m88k__ m88k DGUX __DGUX__"
pth="/usr/ucb /bin /usr/bin /usr/local /usr/local/bin /usr/lbin /usr/plx /usr/5bin /vol/local/bin /etc /usr/lib /lib /usr/local/lib /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/bin /bsd4.3/usr/ucb"
d_newshome="/usr/NeWS"
defvoidused=7
-libswanted="net nm ndir ndbm dbm sun bsd c_s"
-inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd'
+libswanted="net_s net nsl_s nsl socket nm ndir ndbm dbm sun bsd x c_s"
+inclwanted='/usr/netinclude /usr/include/sun /usr/include/bsd /usr/include/lan'
: some greps do not return status, grrr.
echo "grimblepritz" >grimble
if grep blurfldyick grimble >/dev/null 2>&1 ; then
'') libswanted='c_s';;
esac
for thislib in $libswanted; do
+ case "$thislib" in
+ dbm) thatlib=ndbm;;
+ *_s) thatlib=NONE;;
+ *) thatlib="${thislib}_s";;
+ *) thatlib=NONE;;
+ esac
xxx=`loc lib$thislib.a X /usr/lib /usr/local/lib /lib`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
*) dflt="$dflt $xxx";;
esac
else
- xxx=`loc Slib$thislib.a X /usr/lib /usr/local/lib /lib`
+ xxx=`loc Slib$thislib.a X $xlibpth`
if test -f $xxx; then
echo "Found -l$thislib."
case "$dflt" in
- *-l$thislib*);;
+ *-l$thislib*|*-l$thatlib*);;
*) dflt="$dflt -l$thislib";;
esac
else
by default. There may be other libraries needed to compile $package
on your machine as well. If your system needs the "-lc_s" option,
include it here. Include any other special libraries here as well.
+Say "none" for none.
EOM
echo " "
if test ! -f $try; then
try=`loc $thislib blurfl/dyick $libpth`
if test ! -f $try; then
- try=''
+ try=`loc Slib$thislib.a blurfl/dyick $xlibpth`
+ if test ! -f $try; then
+ try=''
+ fi
fi
fi
fi
ans=`loc clib blurfl/dyick $libpth`
fi
if test ! -f "$ans"; then
- ans=`loc Slibc.a blurfl/dyick /usr/lib/386 /lib/386 $libpth`
+ ans=`loc Slibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Mlibc.a blurfl/dyick $libpth`
+ ans=`loc Mlibc.a blurfl/dyick $xlibpth`
fi
if test ! -f "$ans"; then
- ans=`loc Llibc.a blurfl/dyick $libpth`
+ ans=`loc Llibc.a blurfl/dyick $xlibpth`
fi
if test -f "$ans"; then
echo "Your C library is in $ans, of all places."
d_crypt="$define"
cryptlib=''
else
- cryptlib=`loc Slibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Slibcrypt.a "" $xlibpth`
if $test -z "$cryptlib"; then
- cryptlib=`loc Mlibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Mlibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
if $test -z "$cryptlib"; then
- cryptlib=`loc Llibcrypt.a "" /lib/386 /lib`
+ cryptlib=`loc Llibcrypt.a "" $xlibpth`
else
cryptlib=-lcrypt
fi
set getpgrp d_getpgrp
eval $inlibc
+: see if getpgrp2 exists
+set getpgrp2 d_getpgrp2
+eval $inlibc
+
: see if getpriority exists
set getpriority d_getprior
eval $inlibc
set setpgrp d_setpgrp
eval $inlibc
+: see if setpgrp2 exists
+set setpgrp2 d_setpgrp2
+eval $inlibc
+
: see if setpriority exists
set setpriority d_setprior
eval $inlibc
fi
$rm -f try.*
+: see if strerror exists
+set strerror d_strerror
+eval $inlibc
+
: see if symlink exists
set symlink d_symlink
eval $inlibc
set syscall d_syscall
eval $inlibc
-: see if struct tm is defined in sys/time.h
-echo " "
-if $contains 'struct tm' /usr/include/time.h >/dev/null 2>&1 ; then
- echo "You have struct tm defined in <time.h> rather than <sys/time.h>."
- d_tminsys="$undef"
- if test -f /usr/include/sys/time.h; then
- i_systime="$define"
- else
- i_systime="$undef"
- fi
-else
- echo "You have struct tm defined in <sys/time.h> rather than <time.h>."
- d_tminsys="$define"
- i_systime="$define"
-fi
-if $contains '^#.*include.*<time\.h>' /usr/include/sys/time.h >/dev/null 2>&1 ; then
- i_timetoo="$undef"
-else
- i_timetoo="$define"
-fi
-if $contains '^#.*include.*<sys/time\.h>' /usr/include/time.h >/dev/null 2>&1 ; then
- i_systimetoo="$undef"
-else
- i_systimetoo="$define"
-fi
+: see if we should include time.h, sys/time.h, or both
+cat <<'EOM'
+
+Testing to see if we should include <time.h>, <sys/time.h> or both.
+I'm now running the test program...
+EOM
+$cat >try.c <<'EOCP'
+#ifdef I_TIME
+#include <time.h>
+#endif
+#ifdef I_SYSTIME
+#ifdef SYSTIMEKERNEL
+#define KERNEL
+#endif
+#include <sys/time.h>
+#endif
+main()
+{
+ struct tm foo;
+#ifdef S_TIMEVAL
+ struct timeval bar;
+#endif
+ if (foo.tm_sec == foo.tm_sec)
+ exit(0);
+#ifdef S_TIMEVAL
+ if (bar.tv_sec == bar.tv_sec)
+ exit(0);
+#endif
+ exit(1);
+}
+EOCP
+flags=''
+for s_timeval in '-DS_TIMEVAL' ''; do
+ for d_systimekernel in '' '-DSYSTIMEKERNEL'; do
+ for i_time in '' '-DI_TIME'; do
+ for i_systime in '-DI_SYSTIME' ''; do
+ case "$flags" in
+ '') echo Trying $i_time $i_systime $d_systimekernel $s_timeval
+ if $cc try.c $ccflags \
+ $i_time $i_systime $d_systimekernel $s_timeval \
+ -o try >/dev/null 2>&1 ; then
+ set X $i_time $i_systime $d_systimekernel $s_timeval
+ shift
+ flags="$*"
+ echo Succeeded with $flags
+ fi
+ ;;
+ esac
+ done
+ done
+ done
+done
+case "$flags" in
+*SYSTIMEKERNEL*) d_systimekernel="$define";;
+*) d_systimekernel="$undef";;
+esac
+case "$flags" in
+*I_TIME*) i_time="$define";;
+*) i_time="$undef";;
+esac
+case "$flags" in
+*I_SYSTIME*) i_systime="$define";;
+*) i_systime="$undef";;
+esac
+$rm -f try.c try
: see if this is a varargs system
echo " "
echo " "
if $test -r /usr/include/sys/dir.h ; then
i_sysdir="$define"
- echo "sysdir.h found."
+ echo "sys/dir.h found."
else
i_sysdir="$undef"
- echo "No sysdir.h found."
+ echo "No sys/dir.h found."
fi
: see if ioctl defs are in sgtty/termio or sys/ioctl
echo "sys/ioctl.h not found, assuming ioctl args are defined in sgtty.h."
fi
+: see if this is a sys/ndir.h system
+echo " "
+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."
+else
+ i_sysndir="$undef"
+ echo "No sys/ndir.h found."
+fi
+
+: see if this is DG/UX with a funky utime.h
+echo " "
+if $test -r /usr/include/utime.h ; then
+ i_utime="$define"
+ echo "utime.h found."
+else
+ i_utime="$undef"
+ echo "No utime.h found, but that's ok."
+fi
+
: see if this is a varargs system
echo " "
if $test -r /usr/include/varargs.h ; then
*) mallocsrc=''; mallocobj='';;
esac
+: determine compiler compiler
+case "$yacc" in
+'') dflt=yacc;;
+*) dflt="$yacc";;
+esac
+cont=true
+ echo " "
+rp="Which compiler compiler (yacc or bison) will you use? [$dflt]"
+$echo $n "$rp $c"
+. myread
+case "$ans" in
+'') ans="$dflt";;
+esac
+yacc="$ans"
+
echo " "
echo "End of configuration questions."
echo " "
d_getgrps='$d_getgrps'
d_gethent='$d_gethent'
d_getpgrp='$d_getpgrp'
+d_getpgrp2='$d_getpgrp2'
d_getprior='$d_getprior'
d_htonl='$d_htonl'
d_index='$d_index'
d_setegid='$d_setegid'
d_seteuid='$d_seteuid'
d_setpgrp='$d_setpgrp'
+d_setpgrp2='$d_setpgrp2'
d_setprior='$d_setprior'
d_setregid='$d_setregid'
d_setresgid='$d_setresgid'
d_statblks='$d_statblks'
d_stdstdio='$d_stdstdio'
d_strctcpy='$d_strctcpy'
+d_strerror='$d_strerror'
d_symlink='$d_symlink'
d_syscall='$d_syscall'
-d_tminsys='$d_tminsys'
-i_systime='$i_systime'
-i_timetoo='$i_timetoo'
-i_systimetoo='$i_systimetoo'
d_varargs='$d_varargs'
d_vfork='$d_vfork'
d_voidsig='$d_voidsig'
d_pwexpire='$d_pwexpire'
i_sysdir='$i_sysdir'
i_sysioctl='$i_sysioctl'
+i_sysndir='$i_sysndir'
+i_time='$i_time'
+i_systime='$i_systime'
+d_systimekernel='$d_systimekernel'
+i_utime='$i_utime'
i_varargs='$i_varargs'
i_vfork='$i_vfork'
intsize='$intsize'
uidtype='$uidtype'
voidflags='$voidflags'
defvoidused='$defvoidused'
-lib='$lib'
+yacc='$yacc'
privlib='$privlib'
+lib='$lib'
CONFIG=true
EOT
*) : in case they cannot read
eval $ans;;
esac
+: if this fails, just run all the .SH files by hand
. ./config.sh
echo " "
Makefile.SH Precursor to Makefile
PACKINGLIST Which files came from which kits
README The Instructions
+README.uport Special instructions for Microports
Wishlist Some things that may or may not happen
arg.h Public declarations for the above
array.c Numerically subscripted arrays
echo "Extracting Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 3.0.1.2 89/11/11 04:07:30 lwall Locked $
+# $Header: Makefile.SH,v 3.0.1.3 89/12/21 19:09:26 lwall Locked $
#
# $Log: Makefile.SH,v $
+# Revision 3.0.1.3 89/12/21 19:09:26 lwall
+# patch7: Configure now lets you pick between yacc or bison
+#
# Revision 3.0.1.2 89/11/11 04:07:30 lwall
# patch2: $sockethdr incorporated into $ccflags
# patch2: $libs now has most of the -l libraries
#
CC = $cc
+YACC = $yacc
bin = $bin
privlib = $privlib
mansrc = $mansrc
.c.o:
$(CC) -c $(CFLAGS) $(LARGE) $*.c
-all: $(public) $(private) $(util) perl.man x2p/all
- touch all
-
-x2p/all:
+all: $(public) $(private) $(util) perl.man
cd x2p; $(MAKE) all
+ touch all
# This is the standard version that contains no "taint" checks and is
# used for all scripts that aren't set-id or running under something set-id.
perl.c perly.h: perl.y
@ echo Expect 25 shift/reduce errors...
- yacc -d perl.y
+ $(YACC) -d perl.y
mv y.tab.c perl.c
mv y.tab.h perly.h
cd x2p; $(MAKE) install
clean:
- rm -f *.o all perl taintperl perl.man
+ rm -f *.o all perl taintperl $suidperl perl.man
cd x2p; $(MAKE) clean
realclean:
echo $(sh) | tr ' ' '\012' >.shlist
# AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
-perly.o $(obj):
+$(obj):
@ echo "You haven't done a "'"make depend" yet!'; exit 1
makedepend: makedepend.SH
/bin/sh makedepend.SH
This will attempt to make perl in the current directory.
+ If you can't compile successfully, try adding a -DCRIPPLED_CC flag.
+ (Just because you get no errors doesn't mean it compiled right!)
+ This simplifies some complicated expressions for compilers that
+ get indigestion easily. If that has no effect, try turning off
+ optimization. If you have missing routines, you probably need to
+ add some library or other, or you need to undefine some feature that
+ Configure thought was there but is defective or incomplete.
+
+ Some compilers will not compile or optimize the larger files without
+ some extra switches to use larger jump offsets or allocate larger
+ internal tables. It's okay to insert rules for specific files into
+ Makefile.SH, since a default rule only take effect in the
+ absence of a specific rule.
+
+ The 3b2 needs to turn off -O.
+ AIX/RT may need a -a switch and -DCRIPPLED_CC.
+ SGI machines may need -Ddouble="long float".
+ Ultrix (2.3) may need to hand assemble teval.s with a -J switch.
+ SCO Xenix may need -m25000 for yacc.
+ Genix needs to use libc rather than libc_s, or #undef VARARGS.
+
5) make test
This will run the regression tests on the perl you just made.
Context diffs are the best, then normal diffs. Don't send ed scripts--
I've probably changed my copy since the version you have.
- Watch for perl patches in comp.sources.bugs. Patches will generally be
+ Watch for perl patches in comp.lang.perl. Patches will generally be
in a form usable by the patch program. If you are just now bringing up
perl and aren't sure how many patches there are, write to me and I'll
send any you don't have. Your current patch level is shown in patchlevel.h.
--- /dev/null
+From dwm@uf.msc.umn.edu Tue Dec 19 15:03:27 1989
+Subject: perl on Microport Un*x 2.4
+
+Here are the steps to get perl patchlevel 6 running on Microport Un*x 2.4.
+
+(1) Get the directory routines (opendir, readdir, etc) from an archive
+ somewhere. I got mine from uunet: comp.sources.unix/volume9/gwyn-dir-lib
+ and comp.sources.unix/volume10/dir-lib.pch. Compile a large memory
+ version of the library and put it in /usr/lib/large/dir.a. Also put
+ the dir.h include file in /usr/include/sys. [ If you don't want to
+ do this make sure I_SYSDIR does not defined in config.sh ]
+
+(2) Configure causes sh to get a segmentation fault when it does the
+ ". config.sh" near line 2551. You will have to remove that line
+ from Configure and make sure you get your configuration info right
+ the first time or start over if you make a mistake.
+
+[Or just run the .SH files by hand and proceed to the make depend.]
+
+(3) If you are using C-shell, put a blank line at the start of Configure so it
+ wont get executed by the C-shell. If you are using ksh, you will have to
+ execute Configure with 'sh Configure'. Configure does not work with
+ ksh.
+
+(4) When you run Configure, select compilation option -DCRIPPLED_CC.
+ I also selected -DDEBUGGING to make debugging easier. I recommend it.
+ You can use -O, but you will then have to compile consarg.c and util.c
+ separately without -O because the optimizer generates bad code for these
+ routines. The optimizer also dies harmlessly while optimizing cmd.c,
+ eval.c (who can blame it? [sorry, Larry]), and toke.c.
+ I am still trying to isolate the remaining optimization problems in
+ consarg.c and util.c.
+
+[The rest of the previously published instructions are no longer necessary.]
-/* $Header: arg.h,v 3.0.1.1 89/10/26 23:02:35 lwall Locked $
+/* $Header: arg.h,v 3.0.1.2 89/12/21 19:13:14 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: arg.h,v $
+ * Revision 3.0.1.2 89/12/21 19:13:14 lwall
+ * patch7: send() didn't allow a TO argument
+ *
* Revision 3.0.1.1 89/10/26 23:02:35 lwall
* patch1: reverse didn't work
*
A(1,1,0), /* CONNECT */
A(1,1,0), /* LISTEN */
A(1,1,0), /* ACCEPT */
- A(1,1,2), /* SEND */
+ A(1,1,3), /* SEND */
A(1,1,1), /* RECV */
A(1,1,1), /* SSELECT */
A(1,1,1), /* SOCKETPAIR */
-/* $Header: cmd.c,v 3.0.1.3 89/11/17 15:04:36 lwall Locked $
+/* $Header: cmd.c,v 3.0.1.4 89/12/21 19:17:41 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: cmd.c,v $
+ * Revision 3.0.1.4 89/12/21 19:17:41 lwall
+ * patch7: arranged for certain registers to be restored after longjmp()
+ * patch7: made nested or recursive foreach work right
+ *
* Revision 3.0.1.3 89/11/17 15:04:36 lwall
* patch5: nested foreach on same array didn't work
*
void grow_dlevel();
+/* do longjmps() clobber register variables? */
+
+#if defined(cray) || defined(__STDC__)
+#define JMPCLOBBER
+#endif
+
/* This is the main command loop. We try to spend as much time in this loop
* as possible, so lots of optimizations do their activities in here. This
* means things get a little sloppy.
*/
int
-cmd_exec(cmd,gimme,sp)
-#ifdef cray /* nobody else has complained yet */
-CMD *cmd;
-#else
-register CMD *cmd;
-#endif
+cmd_exec(cmdparm,gimme,sp)
+CMD *VOLATILE cmdparm;
int gimme;
int sp;
{
- SPAT *oldspat;
- int oldsave;
- int aryoptsave;
+ register CMD *cmd = cmdparm;
+ SPAT *VOLATILE oldspat;
+ VOLATILE int oldsave;
+ VOLATILE int aryoptsave;
#ifdef DEBUGGING
- int olddlevel;
- int entdlevel;
+ VOLATILE int olddlevel;
+ VOLATILE int entdlevel;
#endif
register STR *retstr = &str_undef;
register char *tmps;
register char *go_to = goto_targ;
register int newsp = -2;
register STR **st = stack->ary_array;
- FILE *fp;
- ARRAY *ar;
+ VOLATILE FILE *fp;
+ VOLATILE ARRAY *ar;
lastsize = 0;
#ifdef DEBUGGING
}
#endif
}
- switch (setjmp(loop_stack[loop_ptr].loop_env)) {
- case O_LAST: /* not done unless go_to found */
- go_to = Nullch;
+#ifdef JMPCLOBBER
+ cmdparm = cmd;
+#endif
+ if (match = setjmp(loop_stack[loop_ptr].loop_env)) {
+#ifdef JMPCLOBBER
st = stack->ary_array; /* possibly reallocated */
- if (lastretstr) {
- retstr = lastretstr;
- newsp = -2;
- }
- else {
- newsp = sp + lastsize;
- retstr = st[newsp];
- }
+ cmd = cmdparm;
+ cmdflags = cmd->c_flags|CF_ONCE;
+#endif
+ switch (match) {
+ case O_LAST: /* not done unless go_to found */
+ go_to = Nullch;
+ if (lastretstr) {
+ retstr = lastretstr;
+ newsp = -2;
+ }
+ else {
+ newsp = sp + lastsize;
+ retstr = st[newsp];
+ }
#ifdef DEBUGGING
- olddlevel = dlevel;
+ olddlevel = dlevel;
#endif
- curspat = oldspat;
- if (savestack->ary_fill > oldsave)
- restorelist(oldsave);
- goto next_cmd;
- case O_NEXT: /* not done unless go_to found */
- go_to = Nullch;
- goto next_iter;
- case O_REDO: /* not done unless go_to found */
- go_to = Nullch;
- goto doit;
+ curspat = oldspat;
+ if (savestack->ary_fill > oldsave)
+ restorelist(oldsave);
+ goto next_cmd;
+ case O_NEXT: /* not done unless go_to found */
+ go_to = Nullch;
+#ifdef JMPCLOBBER
+ newsp = -2;
+ retstr = &str_undef;
+#endif
+ goto next_iter;
+ case O_REDO: /* not done unless go_to found */
+ go_to = Nullch;
+#ifdef JMPCLOBBER
+ newsp = -2;
+ retstr = &str_undef;
+#endif
+ goto doit;
+ }
}
oldspat = curspat;
oldsave = savestack->ary_fill;
newsp = eval(cmd->c_expr,gimme && (cmdflags & CF_TERM),sp);
st = stack->ary_array; /* possibly reallocated */
retstr = st[newsp];
- if (newsp > sp)
+ if (newsp > sp && retstr)
match = str_true(retstr);
else
match = FALSE;
}
#endif
}
- switch (setjmp(loop_stack[loop_ptr].loop_env)) {
- case O_LAST:
- /* retstr = lastretstr; */
+#ifdef JMPCLOBBER
+ cmdparm = cmd;
+#endif
+ if (match = setjmp(loop_stack[loop_ptr].loop_env)) {
+#ifdef JMPCLOBBER
st = stack->ary_array; /* possibly reallocated */
- if (lastretstr) {
- retstr = lastretstr;
+ cmd = cmdparm;
+ cmdflags = cmd->c_flags|CF_ONCE;
+ go_to = goto_targ;
+#endif
+ switch (match) {
+ case O_LAST:
+ if (lastretstr) {
+ retstr = lastretstr;
+ newsp = -2;
+ }
+ else {
+ newsp = sp + lastsize;
+ retstr = st[newsp];
+ }
+ curspat = oldspat;
+ if (savestack->ary_fill > oldsave)
+ restorelist(oldsave);
+ goto next_cmd;
+ case O_NEXT:
+#ifdef JMPCLOBBER
newsp = -2;
- }
- else {
- newsp = sp + lastsize;
- retstr = st[newsp];
- }
- curspat = oldspat;
- if (savestack->ary_fill > oldsave)
- restorelist(oldsave);
- goto next_cmd;
- case O_NEXT:
- goto next_iter;
- case O_REDO:
+ retstr = &str_undef;
+#endif
+ goto next_iter;
+ case O_REDO:
#ifdef DEBUGGING
- dlevel = olddlevel;
+ dlevel = olddlevel;
#endif
- goto doit;
+#ifdef JMPCLOBBER
+ newsp = -2;
+ retstr = &str_undef;
+#endif
+ goto doit;
+ }
}
oldspat = curspat;
oldsave = savestack->ary_fill;
str = Str_new(18,0);
str_sset(str,sarg[i]);
(void)apush(savestack,str); /* remember the value */
+ sarg[i]->str_u.str_useful = -1;
}
}
*/
#$d_getpgrp GETPGRP /**/
+/* GETPGRP2:
+ * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
+ * routine is available to get the current process group.
+ */
+#$d_getpgrp2 GETPGRP2 /**/
+
/* GETPRIORITY:
* This symbol, if defined, indicates that the getpriority() routine is
* available to get a process's priority.
*/
#$d_setpgrp SETPGRP /**/
+/* SETPGRP2:
+ * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
+ * routine is available to set the current process group.
+ */
+#$d_setpgrp2 SETPGRP2 /**/
+
/* SETPRIORITY:
* This symbol, if defined, indicates that the setpriority() routine is
* available to set a process's priority.
*/
#$d_strctcpy STRUCTCOPY /**/
+/* STRERROR:
+ * This symbol, if defined, indicates that the strerror() routine is
+ * available to translate error numbers to strings.
+ */
+#$d_strerror STRERROR /**/
+
/* SYMLINK:
* This symbol, if defined, indicates that the symlink routine is available
* to create symbolic links.
*/
#$d_syscall SYSCALL /**/
-/* TMINSYS:
- * This symbol is defined if this system declares "struct tm" in
- * in <sys/time.h> rather than <time.h>. We can't just say
- * -I/usr/include/sys because some systems have both time files, and
- * the -I trick gets the wrong one.
- */
-/* I_SYSTIME:
- * This symbol is defined if this system has the file <sys/time.h>.
- */
-/* I_TIMETOO:
- * This symbol is defined if <sys/time.h> exists but doesn't include
- * <time.h>.
- */
-/* I_SYSTIMETOO:
- * This symbol is defined if <sys/time.h> exists but isn't included
- * by <time.h>.
- */
-#$d_tminsys TMINSYS /**/
-#$i_systime I_SYSTIME /**/
-#$i_timetoo I_TIMETOO /**/
-#$i_systimetoo I_SYSTIMETOO /**/
-
/* VARARGS:
* This symbol, if defined, indicates to the C program that it should
* include varargs.h.
*/
#$i_sysioctl I_SYSIOCTL /**/
+/* I_SYSNDIR:
+ * This symbol, if defined, indicates to the C program that it should
+ * include sys/ndir.h.
+ */
+#$i_sysndir I_SYSNDIR /**/
+
+/* I_TIME:
+ * This symbol is defined if the program should include <time.h>.
+ */
+/* I_SYSTIME:
+ * This symbol is defined if the program should include <sys/time.h>.
+ */
+/* I_SYSTIMEKERNEL:
+ * This symbol is defined if the program should include <sys/time.h>
+ * with KERNEL defined.
+ */
+#$i_time I_TIME /**/
+#$i_systime I_SYSTIME /**/
+#$d_systimekernel SYSTIMEKERNEL /**/
+
+/* I_UTIME:
+ * This symbol, if defined, indicates to the C program that it should
+ * include utime.h (a DG/UX thingie).
+ */
+#$i_utime I_UTIME /**/
+
/* I_VARARGS:
* This symbol, if defined, indicates to the C program that it should
* include varargs.h.
sub Complete {
local ($prompt) = shift (@_);
local ($c, $cmp, $l, $r, $ret, $return, $test);
- @_ = sort @_;
+ @_cmp_lst = sort @_;
system 'stty raw -echo';
loop: {
print $prompt, $return;
while (($c = getc(stdin)) ne "\r") {
if ($c eq "\t") { # (TAB) attempt completion
@_match = ();
- foreach $cmp (@_) {
+ foreach $cmp (@_cmp_lst) {
push (@_match, $cmp) if $cmp =~ /^$return/;
}
$test = $_match[0];
}
elsif ($c eq "\004") { # (^D) completion list
print "\r\n";
- foreach $cmp (@_) {
+ foreach $cmp (@_cmp_lst) {
print "$cmp\r\n" if $cmp =~ /^$return/;
}
redo loop;
-#define PATCHLEVEL 6
+#define PATCHLEVEL 7
esac
echo "Extracting x2p/Makefile (with variable substitutions)"
cat >Makefile <<!GROK!THIS!
-# $Header: Makefile.SH,v 3.0.1.2 89/11/17 15:49:55 lwall Locked $
+# $Header: Makefile.SH,v 3.0.1.3 89/12/21 20:29:00 lwall Locked $
#
# $Log: Makefile.SH,v $
+# Revision 3.0.1.3 89/12/21 20:29:00 lwall
+# patch7: Configure now lets you pick between yacc or bison
+#
# Revision 3.0.1.2 89/11/17 15:49:55 lwall
-# patch: in x2p/Makefile.SH, removed reference to $libnm
+# patch: in x2p/Makefile.SH, removed reference to nm library
#
# Revision 3.0.1.1 89/10/26 23:29:11 lwall
# patch1: in x2p/Makefile.SH, added dependency on ../config.sh
#
CC = $cc
+YACC = $yacc
bin = $bin
lib = $lib
mansrc = $mansrc
a2p.c: a2p.y
@ echo Expect 208 shift/reduce conflicts...
- yacc a2p.y
+ $(YACC) a2p.y
mv y.tab.c a2p.c
a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h
-/* $Header: a2p.h,v 3.0.1.1 89/11/11 05:07:00 lwall Locked $
+/* $Header: a2p.h,v 3.0.1.2 89/12/21 20:30:29 lwall Locked $
*
* Copyright (c) 1989, Larry Wall
*
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log: a2p.h,v $
+ * Revision 3.0.1.2 89/12/21 20:30:29 lwall
+ * patch7: arranged so a2p has a chance of running on a 286
+ *
* Revision 3.0.1.1 89/11/11 05:07:00 lwall
* patch2: Configure may now set -DDEBUGGING
*
EXT int mop INIT(1);
-#define OPSMAX 50000
-union {
+union u_ops {
int ival;
char *cval;
-} ops[OPSMAX]; /* hope they have 200k to spare */
+};
+#if defined(iAPX286) || defined(M_I286) || defined(I80286) /* 80286 hack */
+#define OPSMAX (64000/sizeof(union u_ops)) /* approx. max segment size */
+#else
+#define OPSMAX 50000
+#endif /* 80286 hack */
+union u_ops ops[OPSMAX];
#include <stdio.h>
#include <ctype.h>