Skip to content

Commit 4aa0a1f

Browse files
author
Andy Dougherty
committed
This is my patch patch.1l for perl5.001.
To apply, change to your perl directory, run the command above, then apply with patch -p1 -N < thispatch. This patch fixes all the Configure & build problems for which I have a solution. After you apply this patch, I would recommend: make distclean # or at the very least rm config.sh sh Configure [whatever options you use] make depend make make test Patch and enjoy, Andy Dougherty doughera@lafcol.lafayette.edu Dept. of Physics Lafayette College, Easton PA 18042 Here are the file-by-file contents: Changes.Conf Updated a bit. Configure Now honors hints on <pwd.h>-related things (for CX/UX, in particular). Now honors previous values of d_stdio_ptr_lval and d_stdio_cnt_lval. DB test programs now conditionally include 'const'. MANIFEST Updated. config_H Updated. config_h.SH Include trailing /**/ on STDIO_..._LVALUE defines. hints/cxux.sh Simplified. Include info about failing test. hints/epix.sh A guess at a dynamic loading fix. hints/next_3.sh Add a few comments. lib/Benchmark.pm Ensure numeric context on number of loop iterations. op.c Spider's padlex and goto &$nonesuch patches. perl.c fputs("\tUnofficial patchlevel 1l.\n",stdout); pp_ctl.c pp_hot.c scope.c Spider's padlex and goto &$nonesuch patches.
1 parent 005c1a0 commit 4aa0a1f

File tree

14 files changed

+137
-81
lines changed

14 files changed

+137
-81
lines changed

Changes.Conf

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ This is a brief summary of the most important changes:
2222

2323
Many hint file updates.
2424

25+
Upgrade Traps and Pitfalls:
26+
27+
Since a lot has changed in the build process, you are probably best off
28+
starting with a fresh copy of the perl5.002 sources. In particular,
29+
your 5.000 or 5.001 config.sh will contain several variables that are no
30+
longer needed. Further, improvements in the Configure tests may mean
31+
that some of the answers will be different than they were in previous
32+
versions, and which answer to keep can be difficult to sort out.
33+
Therefore, you are probably better off ignoring your old config.sh, as
34+
in the following:
35+
36+
make distclean # (if you've built perl before)
37+
sh Configure [whatever options you like]
38+
make depend
39+
make
40+
make test
2541

2642
-------------
2743
Version 5.001
@@ -121,11 +137,3 @@ The following is the sequence of steps to upgrade to 5.001:
121137
<mv old architecture-dependent library to new location, if needed>
122138
make install
123139

124-
125-
126-
127-
128-
129-
130-
131-

Configure

Lines changed: 71 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
# $Id: Head.U,v 3.0.1.7 1995/03/21 08:46:15 ram Exp $
2222
#
23-
# Generated on Mon Jun 5 12:18:53 EDT 1995 [metaconfig 3.0 PL55]
23+
# Generated on Tue Jun 6 12:25:20 EDT 1995 [metaconfig 3.0 PL55]
2424

2525
cat >/tmp/c1$$ <<EOF
2626
ARGGGHHHH!!!!!
@@ -5180,54 +5180,75 @@ eval $inlibc
51805180
set pipe d_pipe
51815181
eval $inlibc
51825182

5183-
: see if this is a pwd system
5184-
echo " "
5185-
xxx=`./findhdr pwd.h`
5186-
if $test "$xxx"; then
5187-
i_pwd="$define"
5188-
echo "<pwd.h> found." >&4
5183+
: see if this is a pwd.h system
5184+
set pwd.h i_pwd
5185+
eval $inhdr
5186+
5187+
case "$i_pwd" in
5188+
$define)
5189+
xxx=`./findhdr pwd.h`
51895190
$cppstdin $cppflags $cppminus < $xxx >$$.h
5191+
51905192
if $contains 'pw_quota' $$.h >/dev/null 2>&1; then
5191-
d_pwquota="$define"
5193+
val="$define"
51925194
else
5193-
d_pwquota="$undef"
5195+
val="$undef"
51945196
fi
5197+
set d_pwquota
5198+
eval $setvar
5199+
51955200
if $contains 'pw_age' $$.h >/dev/null 2>&1; then
5196-
d_pwage="$define"
5201+
val="$define"
51975202
else
5198-
d_pwage="$undef"
5203+
val="$undef"
51995204
fi
5205+
set d_pwage
5206+
eval $setvar
5207+
52005208
if $contains 'pw_change' $$.h >/dev/null 2>&1; then
5201-
d_pwchange="$define"
5209+
val="$define"
52025210
else
5203-
d_pwchange="$undef"
5211+
val="$undef"
52045212
fi
5213+
set d_pwchange
5214+
eval $setvar
5215+
52055216
if $contains 'pw_class' $$.h >/dev/null 2>&1; then
5206-
d_pwclass="$define"
5217+
val="$define"
52075218
else
5208-
d_pwclass="$undef"
5219+
val="$undef"
52095220
fi
5221+
set d_pwclass
5222+
eval $setvar
5223+
52105224
if $contains 'pw_expire' $$.h >/dev/null 2>&1; then
5211-
d_pwexpire="$define"
5225+
val="$define"
52125226
else
5213-
d_pwexpire="$undef"
5227+
val="$undef"
52145228
fi
5229+
set d_pwexpire
5230+
eval $setvar
5231+
52155232
if $contains 'pw_comment' $$.h >/dev/null 2>&1; then
5216-
d_pwcomment="$define"
5233+
val="$define"
52175234
else
5218-
d_pwcomment="$undef"
5235+
val="$undef"
52195236
fi
5237+
set d_pwcomment
5238+
eval $setvar
5239+
52205240
$rm -f $$.h
5221-
else
5222-
i_pwd="$undef"
5223-
d_pwquota="$undef"
5224-
d_pwage="$undef"
5225-
d_pwchange="$undef"
5226-
d_pwclass="$undef"
5227-
d_pwexpire="$undef"
5228-
d_pwcomment="$undef"
5229-
echo "<pwd.h> NOT found." >&4
5230-
fi
5241+
;;
5242+
*)
5243+
val="$undef";
5244+
set d_pwquota; eval $setvar
5245+
set d_pwage; eval $setvar
5246+
set d_pwchange; eval $setvar
5247+
set d_pwclass; eval $setvar
5248+
set d_pwexpire; eval $setvar
5249+
set d_pwcomment; eval $setvar
5250+
;;
5251+
esac
52315252

52325253
: see if readdir and friends exist
52335254
set readdir d_readdir
@@ -5615,11 +5636,15 @@ if $contains '_IO_fpos_t' `./findhdr stdio.h` >/dev/null 2>&1 ; then
56155636
'') stdio_ptr='((fp)->_IO_read_ptr)'
56165637
ptr_lval=$define
56175638
;;
5639+
*) ptr_lval=$d_stdio_ptr_lval
5640+
;;
56185641
esac
56195642
case "$stdio_cnt" in
56205643
'') stdio_cnt='((fp)->_IO_read_end - (fp)->_IO_read_ptr)'
56215644
cnt_lval=$undef
56225645
;;
5646+
*) cnt_lval=$d_stdio_cnt_lval
5647+
;;
56235648
esac
56245649
case "$stdio_base" in
56255650
'') stdio_base='((fp)->_IO_read_base)';;
@@ -5632,11 +5657,15 @@ else
56325657
'') stdio_ptr='((fp)->_ptr)'
56335658
ptr_lval=$define
56345659
;;
5660+
*) ptr_lval=$d_stdio_ptr_lval
5661+
;;
56355662
esac
56365663
case "$stdio_cnt" in
56375664
'') stdio_cnt='((fp)->_cnt)'
56385665
cnt_lval=$define
56395666
;;
5667+
*) cnt_lval=$d_stdio_cnt_lval
5668+
;;
56405669
esac
56415670
case "$stdio_base" in
56425671
'') stdio_base='((fp)->_base)';;
@@ -6384,11 +6413,15 @@ define)
63846413
: Check the return type needed for hash
63856414
echo " "
63866415
echo "Checking return type needed for hash for Berkeley DB ..." >&4
6387-
$cat >try.c <<'EOCP'
6416+
$cat >try.c <<EOCP
6417+
#$d_const HASCONST
6418+
#ifndef HASCONST
6419+
#define const
6420+
#endif
63886421
#include <sys/types.h>
63896422
#include <db.h>
63906423
u_int32_t hash_cb (ptr, size)
6391-
void *ptr;
6424+
const void *ptr;
63926425
size_t size;
63936426
{
63946427
}
@@ -6420,12 +6453,16 @@ define)
64206453
: Check the return type needed for prefix
64216454
echo " "
64226455
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
6423-
cat >try.c <<'EOCP'
6456+
cat >try.c <<EOCP
6457+
#$d_const HASCONST
6458+
#ifndef HASCONST
6459+
#define const
6460+
#endif
64246461
#include <sys/types.h>
64256462
#include <db.h>
64266463
size_t prefix_cb (key1, key2)
6427-
DBT *key1;
6428-
DBT *key2;
6464+
const DBT *key1;
6465+
const DBT *key2;
64296466
{
64306467
}
64316468
BTREEINFO info;

MANIFEST

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ hints/mpc.sh Hints for named architecture
209209
hints/mpeix.sh Hints for named architecture
210210
hints/ncr_tower.sh Hints for named architecture
211211
hints/netbsd.sh Hints for named architecture
212+
hints/next_3.sh Hints for named architecture
212213
hints/next_3_0.sh Hints for named architecture
213-
hints/next_3_2.sh Hints for named architecture
214214
hints/opus.sh Hints for named architecture
215215
hints/powerunix.sh Hints for named architecture
216216
hints/sco_2_3_0.sh Hints for named architecture

config_H

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* $Id: Config_h.U,v 3.0.1.3 1995/01/30 14:25:39 ram Exp $
1515
*/
1616

17-
/* Configuration time: Fri Jun 2 14:50:10 EDT 1995
17+
/* Configuration time: Tue Jun 6 12:34:26 EDT 1995
1818
* Configured by: andy
1919
* Target system: crystal crystal 3.2 2 i386
2020
*/
@@ -773,9 +773,9 @@
773773
*/
774774
#ifdef USE_STDIO_PTR
775775
#define FILE_ptr(fp) ((fp)->_ptr)
776-
#define STDIO_PTR_LVALUE
776+
#define STDIO_PTR_LVALUE /**/
777777
#define FILE_cnt(fp) ((fp)->_cnt)
778-
#define STDIO_CNT_LVALUE
778+
#define STDIO_CNT_LVALUE /**/
779779
#endif
780780

781781
/* FILE_base:

config_h.SH

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,9 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!'
787787
*/
788788
#ifdef USE_STDIO_PTR
789789
#define FILE_ptr(fp) $stdio_ptr
790-
#$d_stdio_ptr_lval STDIO_PTR_LVALUE
790+
#$d_stdio_ptr_lval STDIO_PTR_LVALUE /**/
791791
#define FILE_cnt(fp) $stdio_cnt
792-
#$d_stdio_cnt_lval STDIO_CNT_LVALUE
792+
#$d_stdio_cnt_lval STDIO_CNT_LVALUE /**/
793793
#endif
794794
795795
/* FILE_base:

hints/cxux.sh

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -75,30 +75,10 @@ ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
7575
lddlflags='-Zlink=so'
7676

7777
# Configure imagines that it sees a pw_quota field, but it is really in a
78-
# different structure than the one it thinks it is looking at. WARNING:
79-
# Setting this here in the hints file doesn't help. You need to fix this by
80-
# editing config.sh after Configure asks you to fix things with a shell
81-
# escape! (Maybe Configure should actually try to compile a routine to
82-
# test each field, but what a pain that would be...).
83-
#
84-
# Perhaps I should create a config.over file and add this to it now?
85-
#
78+
# different structure than the one it thinks it is looking at.
8679
d_pwquota='undef'
87-
echo ''
88-
echo ''
89-
echo WARNING: Edit config.sh when Configure offers to let you do so at the
90-
echo end of the configuration process and manually change d_pwquota from
91-
echo define to undef \(or you may want to create a config.over file now\).
92-
echo ''
93-
echo ''
94-
95-
# The following silly shell variable is set just so it will be printed out
96-
# immediately prior to asking the user to edit config.sh :-).
97-
#
98-
dont_forget_to_fix_d_pwquota_in_config_to_be_undef="really"
9980

100-
101-
# Configure sometime finds what it believes to be ndbm header files on the
81+
# Configure sometimes finds what it believes to be ndbm header files on the
10282
# system and imagines that we have the NDBM library, but we really don't.
10383
# There is something there that once resembled ndbm, but it is purely
10484
# for internal use in some tool and has been hacked beyond recognition
@@ -110,3 +90,12 @@ i_ndbm='undef'
11090
#
11191
d_mymalloc='undef'
11292
usemymalloc='n'
93+
94+
cat <<'EOM'
95+
96+
You will get a failure on lib/posix.t test 16 because ungetc() on
97+
stdin does not work if no characters have been read from stdin.
98+
If you type a character at the terminal where you are running
99+
the tests, you can fool it into thinking it worked.
100+
101+
EOM

hints/epix.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ if [ -r /usr/ucblib/libucb.a ]; then # If using BSD-compat. library:
6161
fi
6262

6363
lddlflags="-G $ldflags" # Probably needed for dynamic loading
64+
# We _do_ want the -L paths in ldflags, but we don't want the -non_shared.
65+
lddlflags=`echo $lddlflags | sed 's/-non_shared//'`
6466

6567
cat <<'EOM' >&4
6668

hints/next_3_2.sh renamed to hints/next_3.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# This file has been put together by Anno Siegel <siegel@zrz.TU-Berlin.DE>
22
# and Andreas Koenig <k@franz.ww.TU-Berlin.DE>. Comments, questions, and
33
# improvements welcome!
4+
#
5+
# These hints work for NeXT 3.2 and 3.3. 3.0 has it's own
6+
# special hint file.
7+
48
ccflags='-DUSE_NEXT_CTYPE'
59
POSIX_cflags='ccflags="-posix $ccflags"'
610
ldflags='-u libsys_s'
@@ -35,4 +39,3 @@ ranlib='sleep 5; /bin/ranlib'
3539
if [ `arch` = "hppa" ]; then
3640
pp_cflags='optimize="-g"'
3741
fi
38-

lib/Benchmark.pm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ September 8th, 1994; by Tim Bunce.
242242
# Last updated: Sept 8th 94 by Tim Bunce
243243
#
244244

245+
use Carp;
245246
use Exporter;
246247
@ISA=(Exporter);
247248
@EXPORT=qw(timeit timethis timethese timediff timestr);
@@ -315,6 +316,10 @@ sub timedebug{
315316

316317
sub runloop {
317318
my($n, $c) = @_;
319+
320+
$n+=0; # force numeric now, so garbage won't creep into the eval
321+
croak "negativ loopcount $n" if $n<0;
322+
confess "Usage: runloop(number, string)" unless defined $c;
318323
my($t0, $t1, $td); # before, after, difference
319324

320325
# find package of caller so we can execute code there
@@ -326,7 +331,7 @@ sub runloop {
326331

327332
my $subcode = "sub { package $pack; my(\$_i)=$n; while (\$_i--){$c;} }";
328333
my $subref = eval $subcode;
329-
die "runloop unable to compile '$c': $@\ncode: $subcode\n" if $@;
334+
croak "runloop unable to compile '$c': $@\ncode: $subcode\n" if $@;
330335
print STDERR "runloop $n '$subcode'\n" if ($debug);
331336

332337
$t0 = &new;

op.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2627,7 +2627,7 @@ CV *cv;
26272627
SAVESPTR(curpad);
26282628
curpad = 0;
26292629

2630-
if (!SvFLAGS(cv) & SVpcv_CLONED)
2630+
if (!(SvFLAGS(cv) & SVpcv_CLONED))
26312631
op_free(CvROOT(cv));
26322632
CvROOT(cv) = Nullop;
26332633
if (CvPADLIST(cv)) {
@@ -2761,6 +2761,7 @@ OP *block;
27612761
CvOUTSIDE(cv) = CvOUTSIDE(compcv);
27622762
CvOUTSIDE(compcv) = 0;
27632763
CvPADLIST(cv) = CvPADLIST(compcv);
2764+
CvPADLIST(compcv) = 0;
27642765
SvREFCNT_dec(compcv);
27652766
}
27662767
else {

0 commit comments

Comments
 (0)