From: Gurusamy Sarathy Date: Sun, 9 Jan 2000 22:27:19 +0000 (+0000) Subject: more changes for new-style version numbers (versions numbers on X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=273cf8d1f309172b4416e78e4a8e80c12d941254;p=p5sagit%2Fp5-mst-13.2.git more changes for new-style version numbers (versions numbers on the filesystem look like 5.5.640, except on DOS-DJGPP and VMS where they look like 5_5_640; delete @Config{pm_apiversion,xs_apiversion}; split $Config{apiversion} into three, @Config{apirevision,apiversion, apisubversion} for CPP friendliness; $Config{sitelib} now defaults to .../site_perl/$version, just like $Config{privlib}, making sitelib completely independent across versions and substantially eliminating chances of breaking older installations by overwriting newly built extensions; all this means compatibility inclusions for @INC will need to take into account older sitelib versions (this still TODO) windows, vms, dos tweaks for the above p4raw-id: //depot/perl@4773 --- diff --git a/Changes b/Changes index c30b7fd..d7e27c4 100644 --- a/Changes +++ b/Changes @@ -79,6 +79,59 @@ Version v5.5.640 Development release working toward 5.6 ---------------- ____________________________________________________________________________ +[ 4772] By: gsar on 2000/01/09 19:05:33 + Log: s/usethreads/use5005threads/g + Branch: perl + ! myconfig.SH t/lib/english.t t/lib/thread.t t/op/nothread.t +____________________________________________________________________________ +[ 4771] By: gsar on 2000/01/09 18:51:50 + Log: Configure changes for new-style version numbers (from Andy Dougherty, + slightly altered) + Branch: perl + ! Configure INSTALL Porting/Glossary Porting/config.sh + ! Porting/config_H config_h.SH perl.h win32/Makefile + ! win32/config.bc win32/config.gc win32/config.vc + ! win32/makefile.mk +____________________________________________________________________________ +[ 4770] By: gsar on 2000/01/07 22:18:54 + Log: fix for 'make utest' failures (from Ilya Zakharevich) + Branch: perl + ! regexec.c +____________________________________________________________________________ +[ 4769] By: gsar on 2000/01/07 18:23:16 + Log: cygwin update (from Eric Fifer ) + Branch: perl + + ext/IPC/SysV/hints/cygwin.pl ext/NDBM_File/hints/cygwin.pl + + ext/ODBM_File/hints/cygwin.pl + ! Configure INSTALL MANIFEST ext/POSIX/Makefile.PL + ! hints/cygwin.sh installman installperl lib/Cwd.pm + ! lib/ExtUtils/MakeMaker.pm lib/File/Spec/Unix.pm lib/perl5db.pl + ! perlsdio.h t/op/magic.t t/op/stat.t utils/perlcc.PL +____________________________________________________________________________ +[ 4768] By: gsar on 2000/01/07 18:12:15 + Log: typo on h2xs.PL (from Helmut Jarausch) + Branch: perl + ! utils/h2xs.PL +____________________________________________________________________________ +[ 4767] By: gsar on 2000/01/07 17:58:45 + Log: VMS update (from Peter Prymmer ) + Branch: perl + ! README.vms configure.com vms/subconfigure.com +____________________________________________________________________________ +[ 4766] By: gsar on 2000/01/07 17:54:05 + Log: os2/POSIX.mkfifo not needed (from Yitzchak Scott-Thoennes + ) + Branch: perl + - os2/POSIX.mkfifo + ! MANIFEST README.os2 +____________________________________________________________________________ +[ 4765] By: gsar on 2000/01/06 20:11:46 + Log: add workaround for dlopen() bug on OpenBSD (relative paths that + match /^lib/ won't load properly) + Branch: perl + + ext/DynaLoader/hints/openbsd.pl + ! Changes MANIFEST ext/DynaLoader/dl_dlopen.xs +____________________________________________________________________________ [ 4764] By: gsar on 2000/01/06 19:51:08 Log: add undocumented globals for compatibility--find.pl, and find2perl generated code need them (from Helmut Jarausch ) diff --git a/Configure b/Configure index 5b3b6d5..c9e4e0d 100755 --- a/Configure +++ b/Configure @@ -746,6 +746,8 @@ ranlib='' package='' spackage='' pager='' +apirevision='' +apisubversion='' apiversion='' patchlevel='' subversion='' @@ -881,8 +883,6 @@ vendorprefix='' vendorprefixexp='' defvoidused='' voidflags='' -pm_apiversion='' -xs_apiversion='' CONFIG='' define='define' @@ -4647,20 +4647,23 @@ prefixit='case "$3" in esac;; esac' -: set the base revision -baserev=5.0 - -: get the patchlevel +: get the revision, patchlevel, subversion echo " " echo "Getting the current patchlevel..." >&4 if $test -r $rsrc/patchlevel.h;then + baserev=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` - apiversion=`awk '/define[ ]+PERL_APIVERSION/ {print $3}' $rsrc/patchlevel.h` + apirevision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` + apiversion=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` + apisubversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` else + baserev=0 patchlevel=0 subversion=0 + apirevision=0 apiversion=0 + apisubversion=0 fi $echo $n "(You have $package" $c case "$package" in @@ -4671,10 +4674,15 @@ $echo $n " patchlevel $patchlevel" $c test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c echo ".)" -version=`LC_ALL=C; export LC_ALL; \ - echo $baserev $patchlevel $subversion | \ - $awk '{ printf "%.6f\n", $1 + $2/1000.0 + $3/1000000.0 }' | \ - sed -e 's/0*$//'` +if $test -n $osname -a "$osname" = "dos"; then + version=`LC_ALL=C; export LC_ALL; \ + echo $baserev $patchlevel $subversion | \ + $awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'` +else + version=`LC_ALL=C; export LC_ALL; \ + echo $baserev $patchlevel $subversion | \ + $awk '{ printf "%d.%d.%d\n", $1, $2, $3 }'` +fi : determine installation style : For now, try to deduce it from prefix unless it is already set. @@ -6824,13 +6832,13 @@ siteprefix="$ans" siteprefixexp="$ansexp" : determine where site specific libraries go. -: Usual default is /usr/local/lib/perl5/site_perl +: Usual default is /usr/local/lib/perl5/site_perl/$version : The default "style" setting is made in installstyle.U : XXX No longer works with Prefixit stuff. prog=`echo $package | $sed 's/-*[0-9.]*$//'` case "$installstyle" in -*lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog ;; -*) dflt=$siteprefix/lib/site_$prog ;; +*lib/perl5*) dflt=$siteprefix/lib/$package/site_$prog/$version ;; +*) dflt=$siteprefix/lib/site_$prog/$version ;; esac $cat < below for more details. +the /usr/local hierarchy. + +The entire installed library hierarchy is installed in locations with +version numbers, keeping the installations of different versions distinct. +However, later installations of Perl can still be configured to search the +installed libraries corresponding to compatible earlier versions. +See L<"Coexistence with earlier versions of perl5"> below for more details +on how Perl can be made to search older version directories. Of course you may use these directories however you see fit. For example, you may wish to use $siteprefix for site-specific files that diff --git a/Porting/config.sh b/Porting/config.sh index 711b3d4..f037880 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -30,15 +30,17 @@ afs='false' alignbytes='4' ansi2knr='' aphostname='' -apiversion='5.00564' +apirevision='5' +apisubversion='640' +apiversion='5' ar='ar' -archlib='/opt/perl/lib/5.00564/i686-linux-thread' -archlibexp='/opt/perl/lib/5.00564/i686-linux-thread' +archlib='/opt/perl/lib/5.5.640/i686-linux-thread' +archlibexp='/opt/perl/lib/5.5.640/i686-linux-thread' archname64='' archname='i686-linux-thread' archobjs='' awk='awk' -baserev='5.0' +baserev='5' bash='' bin='/opt/perl/bin' bincompat5005='undef' @@ -478,17 +480,17 @@ i_vfork='undef' ignore_versioned_solibs='y' incpath='' inews='' -installarchlib='/opt/perl/lib/5.00564/i686-linux-thread' +installarchlib='/opt/perl/lib/5.5.640/i686-linux-thread' installbin='/opt/perl/bin' installman1dir='/opt/perl/man/man1' installman3dir='/opt/perl/man/man3' installprefix='/opt/perl' installprefixexp='/opt/perl' -installprivlib='/opt/perl/lib/5.00564' +installprivlib='/opt/perl/lib/5.5.640' installscript='/opt/perl/script' -installsitearch='/opt/perl/lib/site_perl/5.00564/i686-linux-thread' +installsitearch='/opt/perl/lib/site_perl/5.5.640/i686-linux-thread' installsitebin='/opt/perl/bin' -installsitelib='/opt/perl/lib/site_perl' +installsitelib='/opt/perl/lib/site_perl/5.5.640' installstyle='lib' installusrbinperl='define' installvendorbin='' @@ -582,13 +584,12 @@ pg='pg' phostname='' pidtype='pid_t' plibpth='' -pm_apiversion='5.005' pmake='' pr='' prefix='/opt/perl' prefixexp='/opt/perl' -privlib='/opt/perl/lib/5.00564' -privlibexp='/opt/perl/lib/5.00564' +privlib='/opt/perl/lib/5.5.640' +privlibexp='/opt/perl/lib/5.5.640' prototype='define' ptrsize='4' quadkind='3' @@ -634,12 +635,12 @@ sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE" sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 -1 6 17 29 ' sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, -1, 6, 17, 29, 0' signal_t='void' -sitearch='/opt/perl/lib/site_perl/5.00564/i686-linux-thread' -sitearchexp='/opt/perl/lib/site_perl/5.00564/i686-linux-thread' +sitearch='/opt/perl/lib/site_perl/5.5.640/i686-linux-thread' +sitearchexp='/opt/perl/lib/site_perl/5.5.640/i686-linux-thread' sitebin='/opt/perl/bin' sitebinexp='/opt/perl/bin' -sitelib='/opt/perl/lib/site_perl' -sitelibexp='/opt/perl/lib/site_perl' +sitelib='/opt/perl/lib/site_perl/5.5.640' +sitelibexp='/opt/perl/lib/site_perl/5.5.640' siteprefix='/opt/perl' siteprefixexp='/opt/perl' sizetype='size_t' @@ -728,11 +729,10 @@ vendorlib='' vendorlibexp='' vendorprefix='' vendorprefixexp='' -version='5.00564' +version='5.5.640' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' -xs_apiversion='5.00564' zcat='' zip='zip' # Configure command line arguments. @@ -753,5 +753,7 @@ config_arg11='-dE' PERL_REVISION=5 PERL_VERSION=5 PERL_SUBVERSION=640 -PERL_APIVERSION=5.00564 +PERL_API_REVISION=5 +PERL_API_VERSION=5 +PERL_API_SUBVERSION=640 CONFIGDOTSH=true diff --git a/Porting/config_H b/Porting/config_H index eb4e9d0..1a33778 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -1427,8 +1427,8 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "/opt/perl/lib/5.00564/i686-linux-thread" /**/ -#define ARCHLIB_EXP "/opt/perl/lib/5.00564/i686-linux-thread" /**/ +#define ARCHLIB "/opt/perl/lib/5.5.640/i686-linux-thread" /**/ +#define ARCHLIB_EXP "/opt/perl/lib/5.5.640/i686-linux-thread" /**/ /* BIN: * This symbol holds the path of the bin directory where the package will @@ -1457,8 +1457,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "/opt/perl/lib/5.00564" /**/ -#define PRIVLIB_EXP "/opt/perl/lib/5.00564" /**/ +#define PRIVLIB "/opt/perl/lib/5.5.640" /**/ +#define PRIVLIB_EXP "/opt/perl/lib/5.5.640" /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. @@ -1475,8 +1475,8 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "/opt/perl/lib/site_perl/5.00564/i686-linux-thread" /**/ -#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.00564/i686-linux-thread" /**/ +#define SITEARCH "/opt/perl/lib/site_perl/5.5.640/i686-linux-thread" /**/ +#define SITEARCH_EXP "/opt/perl/lib/site_perl/5.5.640/i686-linux-thread" /**/ /* SITELIB: * This symbol contains the name of the private library for this package. @@ -2594,41 +2594,6 @@ /*#define USE_SOCKS / **/ #endif -/* PERL_XS_APIVERSION: - * This variable contains the version of the oldest perl binary - * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in /opt/perl/lib/site_perl/5.00564/i686-linux-thread for older - * directories across major versions back to xs_apiversion. - * This is only useful if you have a perl library directory tree - * structured like the default one. - * See INSTALL for how this works. - * The versioned site_perl directory was introduced in 5.005, - * so that is the lowest possible value. - * Since this can depend on compile time options (such as - * bincompat) it is set by Configure. Other non-default sources - * of potential incompatibility, such as multiplicity, threads, - * debugging, 64bits, sfio, etc., are not checked for currently, - * though in principle we could go snooping around in old - * Config.pm files. - */ -/* PERL_PM_APIVERSION: - * This variable contains the version of the oldest perl - * compatible with the present perl. (That is, pure perl modules - * written for pm_apiversion will still work for the current - * version). perl.c:incpush() and lib/lib.pm will automatically - * search in /opt/perl/lib/site_perl for older directories across major versions - * back to pm_apiversion. This is only useful if you have a perl - * library directory tree structured like the default one. The - * versioned site_perl library was introduced in 5.005, so that's - * the default setting for this variable. It's hard to imagine - * it changing before Perl6. It is included here for symmetry - * with xs_apiveprsion -- the searching algorithms will - * (presumably) be similar. - * See the INSTALL file for how this works. - */ -#define PERL_XS_APIVERSION 5.00564 /* Change to string for tuples?*/ -#define PERL_PM_APIVERSION 5.005 /* Change to string for tuples?*/ - /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up diff --git a/config_h.SH b/config_h.SH index 58dc53f..2ecf108 100644 --- a/config_h.SH +++ b/config_h.SH @@ -2608,41 +2608,6 @@ sed <config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #$usesocks USE_SOCKS /**/ #endif -/* PERL_XS_APIVERSION: - * This variable contains the version of the oldest perl binary - * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in $sitearch for older - * directories across major versions back to xs_apiversion. - * This is only useful if you have a perl library directory tree - * structured like the default one. - * See INSTALL for how this works. - * The versioned site_perl directory was introduced in 5.005, - * so that is the lowest possible value. - * Since this can depend on compile time options (such as - * bincompat) it is set by Configure. Other non-default sources - * of potential incompatibility, such as multiplicity, threads, - * debugging, 64bits, sfio, etc., are not checked for currently, - * though in principle we could go snooping around in old - * Config.pm files. - */ -/* PERL_PM_APIVERSION: - * This variable contains the version of the oldest perl - * compatible with the present perl. (That is, pure perl modules - * written for pm_apiversion will still work for the current - * version). perl.c:incpush() and lib/lib.pm will automatically - * search in $sitelib for older directories across major versions - * back to pm_apiversion. This is only useful if you have a perl - * library directory tree structured like the default one. The - * versioned site_perl library was introduced in 5.005, so that's - * the default setting for this variable. It's hard to imagine - * it changing before Perl6. It is included here for symmetry - * with xs_apiveprsion -- the searching algorithms will - * (presumably) be similar. - * See the INSTALL file for how this works. - */ -#define PERL_XS_APIVERSION $xs_apiversion /* Change to string for tuples?*/ -#define PERL_PM_APIVERSION $pm_apiversion /* Change to string for tuples?*/ - /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up diff --git a/configure.com b/configure.com index 87c1b81..a77bec8 100644 --- a/configure.com +++ b/configure.com @@ -984,7 +984,7 @@ $! $ ENDIF !%Config-I-VMS, skip "where install" questions $! $!: set the base revision -$ baserev="5.0" +$ baserev="5" $!: get the patchlevel $ echo "" $ echo4 "Getting the current patchlevel..." !>&4 @@ -1032,7 +1032,7 @@ $ ENDIF $ ELSE subversion = "" $ ENDIF $! -$ version = F$EXTRACT(0,1,baserev) + "_" + patchlevel + subversion +$ version = baserev + "_" + patchlevel + "_" + subversion $! $ IF (.NOT.vms_skip_install) $ THEN diff --git a/dosish.h b/dosish.h index 58c3816..7b2a1bd 100644 --- a/dosish.h +++ b/dosish.h @@ -19,6 +19,7 @@ # ifdef USE_THREADS # define OLD_PTHREADS_API # endif +# define PERL_FS_VER_FMT "%d_%d_%d" #else /* DJGPP */ # ifdef WIN32 # define PERL_SYS_INIT(c,v) Perl_win32_init(c,v) diff --git a/installman b/installman index cf5c45d..c9fb0fe 100755 --- a/installman +++ b/installman @@ -12,9 +12,9 @@ require Cwd; $ENV{SHELL} = 'sh' if $^O eq 'os2'; -$ver = $]; -$release = substr($ver,0,3); # Not used presently. -$patchlevel = substr($ver,3,2); +$ver = $Config{version}; +$release = substr($],0,3); # Not used presently. +$patchlevel = substr($],3,2); die "Patchlevel of perl ($patchlevel)", "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n" if $patchlevel != $Config{'PERL_VERSION'}; diff --git a/installperl b/installperl index 1bc5a8e..0ddbf38 100755 --- a/installperl +++ b/installperl @@ -40,10 +40,10 @@ my $exe_ext = $Config{exe_ext}; # Allow ``make install PERLNAME=something_besides_perl'': my $perl = defined($ENV{PERLNAME}) ? $ENV{PERLNAME} : 'perl'; -# This is the base used for versioned names, like "perl5.005". +# This is the base used for versioned names, like "perl5.6.0". # It's separate because a common use of $PERLNAME is to install # perl as "perl5", if that's used as base for versioned files you -# get "perl55.005". +# get "perl55.6.0". my $perl_verbase = defined($ENV{PERLNAME_VERBASE}) ? $ENV{PERLNAME_VERBASE} : $perl; @@ -91,9 +91,9 @@ find(sub { } }, 'ext'); -my $ver = $]; -my $release = substr($ver,0,3); # Not used presently. -my $patchlevel = substr($ver,3,2); +my $ver = $Config{version}; +my $release = substr($],0,3); # Not used presently. +my $patchlevel = substr($],3,2); die "Patchlevel of perl ($patchlevel)", "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n" if $patchlevel != $Config{'PERL_VERSION'}; @@ -223,7 +223,7 @@ mkpath($installsitearch, 1, 0777) if ($installsitearch); if (chdir "lib") { $do_installarchlib = ! samepath($installarchlib, '.'); $do_installprivlib = ! samepath($installprivlib, '.'); - $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$]/); + $do_installprivlib = 0 if $versiononly && !($installprivlib =~ m/\Q$ver/); if ($do_installarchlib || $do_installprivlib) { find(\&installlib, '.'); @@ -238,7 +238,7 @@ else { mkpath("$installarchlib/CORE", 1, 0777); my @corefiles; if ($Is_VMS) { # We did core file selection during build - my $coredir = "lib/$Config{'arch'}/$]"; + my $coredir = "lib/$Config{'arch'}/$ver"; $coredir =~ tr/./_/; @corefiles = <$coredir/*.*>; } @@ -370,7 +370,7 @@ if (! $versiononly) { # ($installprivlib/pods for cygwin). my $pod = $Is_Cygwin ? 'pods' : 'pod'; -unless ( $versiononly && !($installprivlib =~ m/\Q$]/)) { +unless ( $versiononly && !($installprivlib =~ m/\Q$ver/)) { mkpath("${installprivlib}/$pod", 1, 0777); # If Perl 5.003's perldiag.pod is there, rename it. @@ -403,7 +403,7 @@ unless ( $versiononly && !($installprivlib =~ m/\Q$]/)) { # installed perl. if (!$versiononly) { - my ($path, @path); + my ($path, @path); my $dirsep = ($Is_OS2 || $Is_W32) ? ';' : ':' ; ($path = $ENV{"PATH"}) =~ s:\\:/:g ; @path = split(/$dirsep/, $path); diff --git a/patchlevel.h b/patchlevel.h index d0fa32d..e25b130 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -7,18 +7,17 @@ #define PERL_VERSION 5 /* epoch */ #define PERL_SUBVERSION 640 /* generation */ -/* Compatibility across versions: MakeMaker will install add-on - modules in a directory with the PERL_APIVERSION version number. +/* The following numbers describe the earliest compatible version of + Perl ("compatibility" here being defined as sufficient binary/API + compatibility to run XS code built with the older version). Normally this should not change across maintenance releases. - perl.c:incpush() and lib/lib.pm will automatically search older - directories across major versions back to to PERL_XS_APIVERSION - for XS modules and back to PERL_PM_APIVERSION for pure PERL modules. - (Since the versioned directory layout didn't start until 5.005, - that's the earliest these can go back. - See INSTALL for how this works. + This is used by Configure et al to figure out which version libraries + are legal to include in @INC. See INSTALL for how this works. */ -#define PERL_APIVERSION 5.00564 /* Adjust manually as needed. */ +#define PERL_API_REVISION 5 /* Adjust manually as needed. */ +#define PERL_API_VERSION 5 /* Adjust manually as needed. */ +#define PERL_API_SUBVERSION 640 /* Adjust manually as needed. */ #define __PATCHLEVEL_H_INCLUDED__ #endif diff --git a/perl.c b/perl.c index 8b4c59c..7005e2a 100644 --- a/perl.c +++ b/perl.c @@ -2263,8 +2263,8 @@ sed %s -e \"/^[^#]/b\" \ { /* try again */ PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT, BIN_EXP, - (UV)PERL_REVISION, (UV)PERL_VERSION, - (UV)PERL_SUBVERSION), PL_origargv); + (int)PERL_REVISION, (int)PERL_VERSION, + (int)PERL_SUBVERSION), PL_origargv); Perl_croak(aTHX_ "Can't do setuid\n"); } #endif @@ -2512,8 +2512,8 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); #ifndef IAMSUID /* try again */ PerlProc_execv(Perl_form(aTHX_ "%s/sperl"PERL_FS_VER_FMT, BIN_EXP, - (UV)PERL_REVISION, (UV)PERL_VERSION, - (UV)PERL_SUBVERSION), PL_origargv); + (int)PERL_REVISION, (int)PERL_VERSION, + (int)PERL_SUBVERSION), PL_origargv); #endif Perl_croak(aTHX_ "Can't do setuid\n"); } @@ -2596,8 +2596,8 @@ FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!\n"); fcntl(PerlIO_fileno(PL_rsfp),F_SETFD,0); /* ensure no close-on-exec */ #endif PerlProc_execv(Perl_form(aTHX_ "%s/perl"PERL_FS_VER_FMT, BIN_EXP, - (UV)PERL_REVISION, (UV)PERL_VERSION, - (UV)PERL_SUBVERSION), PL_origargv);/* try again */ + (int)PERL_REVISION, (int)PERL_VERSION, + (int)PERL_SUBVERSION), PL_origargv);/* try again */ Perl_croak(aTHX_ "Can't do setuid\n"); #endif /* IAMSUID */ #else /* !DOSUID */ @@ -3040,8 +3040,8 @@ S_incpush(pTHX_ char *p, int addsubdirs) #endif /* .../archname/version if -d .../archname/version/auto */ Perl_sv_setpvf(aTHX_ subdir, "%_/%s/"PERL_FS_VER_FMT"/auto", libdir, - ARCHNAME, (UV)PERL_REVISION, - (UV)PERL_VERSION, (UV)PERL_SUBVERSION); + ARCHNAME, (int)PERL_REVISION, + (int)PERL_VERSION, (int)PERL_SUBVERSION); if (PerlLIO_stat(SvPVX(subdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) av_push(GvAVn(PL_incgv), diff --git a/perl.h b/perl.h index be2bf4f..ab150a5 100644 --- a/perl.h +++ b/perl.h @@ -1609,8 +1609,9 @@ typedef pthread_key_t perl_key; #endif /* format to use for version numbers in file/directory names */ +/* XXX move to Configure? */ #ifndef PERL_FS_VER_FMT -# define PERL_FS_VER_FMT "%"UVuf".%"UVuf".%"UVuf +# define PERL_FS_VER_FMT "%d.%d.%d" #endif /* This defines a way to flush all output buffers. This may be a diff --git a/vms/vmsish.h b/vms/vmsish.h index bc8b79f..e9b47a0 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -252,6 +252,8 @@ #define HAS_KILL #define HAS_WAIT +#define PERL_FS_VER_FMT "%d_%d_%d" + /* VMS: * This symbol, if defined, indicates that the program is running under * VMS. It's a symbol automagically defined by all VMS C compilers I've seen. diff --git a/win32/Makefile b/win32/Makefile index 6cfb264..5808879 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -29,7 +29,7 @@ INST_TOP = $(INST_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -INST_VER = \5.00564 +INST_VER = \5.5.640 # # Comment this out if you DON'T want your perl installation to have diff --git a/win32/config.bc b/win32/config.bc index 915c733..8dba78c 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -19,7 +19,9 @@ afs='false' alignbytes='8' ansi2knr='' aphostname='' -apiversion='~PERL_APIVERSION~' +apirevision='~PERL_API_REVISION~' +apisubversion='~PERL_API_SUBVERSION~' +apiversion='~PERL_API_VERSION~' ar='tlib /P128' archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' @@ -27,7 +29,7 @@ archname64='' archname='MSWin32' archobjs='' awk='awk' -baserev='5.0' +baserev='5' bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bincompat5005='undef' @@ -572,7 +574,6 @@ pg='' phostname='hostname' pidtype='int' plibpth='' -pm_apiversion='5.005' pmake='' pr='' prefix='~INST_TOP~' @@ -722,12 +723,13 @@ version='~VERSION~' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' -xs_apiversion='~PERL_APIVERSION~' zcat='' zip='zip' PERL_REVISION='~PERL_REVISION~' -PERL_VERSION='~PERL_VERSION~' PERL_SUBVERSION='~PERL_SUBVERSION~' -PERL_APIVERSION='~PERL_APIVERSION~' +PERL_VERSION='~PERL_VERSION~' +PERL_API_REVISION='~PERL_API_REVISION~' +PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' +PERL_API_VERSION='~PERL_API_VERSION~' PATCHLEVEL='~PERL_VERSION~' SUBVERSION='~PERL_SUBVERSION~' diff --git a/win32/config.gc b/win32/config.gc index a5f8d40..556ba2b 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -19,7 +19,9 @@ afs='false' alignbytes='8' ansi2knr='' aphostname='' -apiversion='~PERL_APIVERSION~' +apirevision='~PERL_API_REVISION~' +apisubversion='~PERL_API_SUBVERSION~' +apiversion='~PERL_API_VERSION~' ar='ar' archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' @@ -27,7 +29,7 @@ archname64='' archname='MSWin32' archobjs='' awk='awk' -baserev='5.0' +baserev='5' bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bincompat5005='undef' @@ -572,7 +574,6 @@ pg='' phostname='hostname' pidtype='int' plibpth='' -pm_apiversion='5.005' pmake='' pr='' prefix='~INST_TOP~' @@ -722,12 +723,13 @@ version='~VERSION~' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' -xs_apiversion='~PERL_APIVERSION~' zcat='' zip='zip' PERL_REVISION='~PERL_REVISION~' -PERL_VERSION='~PERL_VERSION~' PERL_SUBVERSION='~PERL_SUBVERSION~' -PERL_APIVERSION='~PERL_APIVERSION~' +PERL_VERSION='~PERL_VERSION~' +PERL_API_REVISION='~PERL_API_REVISION~' +PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' +PERL_API_VERSION='~PERL_API_VERSION~' PATCHLEVEL='~PERL_VERSION~' SUBVERSION='~PERL_SUBVERSION~' diff --git a/win32/config.vc b/win32/config.vc index 4428c47..0e37b3c 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -19,7 +19,9 @@ afs='false' alignbytes='8' ansi2knr='' aphostname='' -apiversion='~PERL_APIVERSION~' +apirevision='~PERL_API_REVISION~' +apisubversion='~PERL_API_SUBVERSION~' +apiversion='~PERL_API_VERSION~' ar='lib' archlib='~INST_TOP~~INST_VER~\lib~INST_ARCH~' archlibexp='~INST_TOP~~INST_VER~\lib~INST_ARCH~' @@ -27,7 +29,7 @@ archname64='' archname='MSWin32' archobjs='' awk='awk' -baserev='5.0' +baserev='5' bash='' bin='~INST_TOP~~INST_VER~\bin~INST_ARCH~' bincompat5005='undef' @@ -572,7 +574,6 @@ pg='' phostname='hostname' pidtype='int' plibpth='' -pm_apiversion='5.005' pmake='' pr='' prefix='~INST_TOP~' @@ -722,12 +723,13 @@ version='~VERSION~' vi='' voidflags='15' xlibpth='/usr/lib/386 /lib/386' -xs_apiversion='~PERL_APIVERSION~' zcat='' zip='zip' PERL_REVISION='~PERL_REVISION~' PERL_VERSION='~PERL_VERSION~' PERL_SUBVERSION='~PERL_SUBVERSION~' -PERL_APIVERSION='~PERL_APIVERSION~' +PERL_API_REVISION='~PERL_API_REVISION~' +PERL_API_SUBVERSION='~PERL_API_SUBVERSION~' +PERL_API_VERSION='~PERL_API_VERSION~' PATCHLEVEL='~PERL_VERSION~' SUBVERSION='~PERL_SUBVERSION~' diff --git a/win32/config_H.bc b/win32/config_H.bc index de0fb35..1455fad 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -1429,7 +1429,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.00563\\lib\\MSWin32-x86" /**/ +#define ARCHLIB "c:\\perl\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define ARCHLIB_EXP "" /**/ /* BIN: @@ -1440,8 +1440,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ -#define BIN_EXP "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ +#define BIN "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ +#define BIN_EXP "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ /* INSTALL_USR_BIN_PERL: * This symbol, if defined, indicates that Perl is to be installed @@ -1459,8 +1459,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.00563\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.00563")) /**/ +#define PRIVLIB "c:\\perl\\5.5.640\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.5.640")) /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. @@ -1477,7 +1477,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.00563\\lib\\MSWin32-x86" /**/ +#define SITEARCH "c:\\perl\\site\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -1495,8 +1495,8 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITELIB "c:\\perl\\site\\5.00563\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.00563")) /**/ +#define SITELIB "c:\\perl\\site\\5.5.640\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.5.640")) /**/ /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used @@ -2599,41 +2599,6 @@ /*#define USE_SOCKS /**/ #endif -/* PERL_XS_APIVERSION: - * This variable contains the version of the oldest perl binary - * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.00563\\lib\\MSWin32-x86 for older - * directories across major versions back to xs_apiversion. - * This is only useful if you have a perl library directory tree - * structured like the default one. - * See INSTALL for how this works. - * The versioned site_perl directory was introduced in 5.005, - * so that is the lowest possible value. - * Since this can depend on compile time options (such as - * bincompat) it is set by Configure. Other non-default sources - * of potential incompatibility, such as multiplicity, threads, - * debugging, 64bits, sfio, etc., are not checked for currently, - * though in principle we could go snooping around in old - * Config.pm files. - */ -/* PERL_PM_APIVERSION: - * This variable contains the version of the oldest perl - * compatible with the present perl. (That is, pure perl modules - * written for pm_apiversion will still work for the current - * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.00563\\lib for older directories across major versions - * back to pm_apiversion. This is only useful if you have a perl - * library directory tree structured like the default one. The - * versioned site_perl library was introduced in 5.005, so that's - * the default setting for this variable. It's hard to imagine - * it changing before Perl6. It is included here for symmetry - * with xs_apiveprsion -- the searching algorithms will - * (presumably) be similar. - * See the INSTALL file for how this works. - */ -#define PERL_XS_APIVERSION 5.00563 /* Change to string for tuples?*/ -#define PERL_PM_APIVERSION 5.005 /* Change to string for tuples?*/ - /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up diff --git a/win32/config_H.gc b/win32/config_H.gc index cd4efc2..77187f6 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -1429,7 +1429,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.00563\\lib\\MSWin32-x86" /**/ +#define ARCHLIB "c:\\perl\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define ARCHLIB_EXP "" /**/ /* BIN: @@ -1440,8 +1440,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ -#define BIN_EXP "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ +#define BIN "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ +#define BIN_EXP "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ /* INSTALL_USR_BIN_PERL: * This symbol, if defined, indicates that Perl is to be installed @@ -1459,8 +1459,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.00563\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.00563")) /**/ +#define PRIVLIB "c:\\perl\\5.5.640\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.5.640")) /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. @@ -1477,7 +1477,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.00563\\lib\\MSWin32-x86" /**/ +#define SITEARCH "c:\\perl\\site\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -1495,8 +1495,8 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITELIB "c:\\perl\\site\\5.00563\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.00563")) /**/ +#define SITELIB "c:\\perl\\site\\5.5.640\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.5.640")) /**/ /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used @@ -2599,41 +2599,6 @@ /*#define USE_SOCKS /**/ #endif -/* PERL_XS_APIVERSION: - * This variable contains the version of the oldest perl binary - * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.00563\\lib\\MSWin32-x86 for older - * directories across major versions back to xs_apiversion. - * This is only useful if you have a perl library directory tree - * structured like the default one. - * See INSTALL for how this works. - * The versioned site_perl directory was introduced in 5.005, - * so that is the lowest possible value. - * Since this can depend on compile time options (such as - * bincompat) it is set by Configure. Other non-default sources - * of potential incompatibility, such as multiplicity, threads, - * debugging, 64bits, sfio, etc., are not checked for currently, - * though in principle we could go snooping around in old - * Config.pm files. - */ -/* PERL_PM_APIVERSION: - * This variable contains the version of the oldest perl - * compatible with the present perl. (That is, pure perl modules - * written for pm_apiversion will still work for the current - * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.00563\\lib for older directories across major versions - * back to pm_apiversion. This is only useful if you have a perl - * library directory tree structured like the default one. The - * versioned site_perl library was introduced in 5.005, so that's - * the default setting for this variable. It's hard to imagine - * it changing before Perl6. It is included here for symmetry - * with xs_apiveprsion -- the searching algorithms will - * (presumably) be similar. - * See the INSTALL file for how this works. - */ -#define PERL_XS_APIVERSION 5.00563 /* Change to string for tuples?*/ -#define PERL_PM_APIVERSION 5.005 /* Change to string for tuples?*/ - /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up diff --git a/win32/config_H.vc b/win32/config_H.vc index 032a9c8..44c2bb3 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -1429,7 +1429,7 @@ * This symbol contains the ~name expanded version of ARCHLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define ARCHLIB "c:\\perl\\5.00563\\lib\\MSWin32-x86" /**/ +#define ARCHLIB "c:\\perl\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define ARCHLIB_EXP "" /**/ /* BIN: @@ -1440,8 +1440,8 @@ * This symbol is the filename expanded version of the BIN symbol, for * programs that do not want to deal with that at run-time. */ -#define BIN "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ -#define BIN_EXP "c:\\perl\\5.00563\\bin\\MSWin32-x86" /**/ +#define BIN "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ +#define BIN_EXP "c:\\perl\\5.5.640\\bin\\MSWin32-x86" /**/ /* INSTALL_USR_BIN_PERL: * This symbol, if defined, indicates that Perl is to be installed @@ -1459,8 +1459,8 @@ * This symbol contains the ~name expanded version of PRIVLIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define PRIVLIB "c:\\perl\\5.00563\\lib" /**/ -#define PRIVLIB_EXP (win32_get_privlib("5.00563")) /**/ +#define PRIVLIB "c:\\perl\\5.5.640\\lib" /**/ +#define PRIVLIB_EXP (win32_get_privlib("5.5.640")) /**/ /* SITEARCH: * This symbol contains the name of the private library for this package. @@ -1477,7 +1477,7 @@ * This symbol contains the ~name expanded version of SITEARCH, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITEARCH "c:\\perl\\site\\5.00563\\lib\\MSWin32-x86" /**/ +#define SITEARCH "c:\\perl\\site\\5.5.640\\lib\\MSWin32-x86" /**/ /*#define SITEARCH_EXP "" /**/ /* SITELIB: @@ -1495,8 +1495,8 @@ * This symbol contains the ~name expanded version of SITELIB, to be used * in programs that are not prepared to deal with ~ expansion at run-time. */ -#define SITELIB "c:\\perl\\site\\5.00563\\lib" /**/ -#define SITELIB_EXP (win32_get_sitelib("5.00563")) /**/ +#define SITELIB "c:\\perl\\site\\5.5.640\\lib" /**/ +#define SITELIB_EXP (win32_get_sitelib("5.5.640")) /**/ /* PERL_VENDORLIB_EXP: * This symbol contains the ~name expanded version of VENDORLIB, to be used @@ -2599,41 +2599,6 @@ /*#define USE_SOCKS /**/ #endif -/* PERL_XS_APIVERSION: - * This variable contains the version of the oldest perl binary - * compatible with the present perl. perl.c:incpush() and - * lib/lib.pm will automatically search in c:\\perl\\site\\5.00563\\lib\\MSWin32-x86 for older - * directories across major versions back to xs_apiversion. - * This is only useful if you have a perl library directory tree - * structured like the default one. - * See INSTALL for how this works. - * The versioned site_perl directory was introduced in 5.005, - * so that is the lowest possible value. - * Since this can depend on compile time options (such as - * bincompat) it is set by Configure. Other non-default sources - * of potential incompatibility, such as multiplicity, threads, - * debugging, 64bits, sfio, etc., are not checked for currently, - * though in principle we could go snooping around in old - * Config.pm files. - */ -/* PERL_PM_APIVERSION: - * This variable contains the version of the oldest perl - * compatible with the present perl. (That is, pure perl modules - * written for pm_apiversion will still work for the current - * version). perl.c:incpush() and lib/lib.pm will automatically - * search in c:\\perl\\site\\5.00563\\lib for older directories across major versions - * back to pm_apiversion. This is only useful if you have a perl - * library directory tree structured like the default one. The - * versioned site_perl library was introduced in 5.005, so that's - * the default setting for this variable. It's hard to imagine - * it changing before Perl6. It is included here for symmetry - * with xs_apiveprsion -- the searching algorithms will - * (presumably) be similar. - * See the INSTALL file for how this works. - */ -#define PERL_XS_APIVERSION 5.00563 /* Change to string for tuples?*/ -#define PERL_PM_APIVERSION 5.005 /* Change to string for tuples?*/ - /* HAS_DRAND48_PROTO: * This symbol, if defined, indicates that the system provides * a prototype for the drand48() function. Otherwise, it is up diff --git a/win32/config_h.PL b/win32/config_h.PL index 16e467e..17f3fc2 100644 --- a/win32/config_h.PL +++ b/win32/config_h.PL @@ -13,8 +13,8 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) } my $patchlevel = $opt{INST_VER}; $patchlevel =~ s|^[\\/]||; -$patchlevel =~ s|~VERSION~|$]|g; -$patchlevel ||= $]; +$patchlevel =~ s|~VERSION~|$Config{version}|g; +$patchlevel ||= $Config{version}; $patchlevel = qq["$patchlevel"]; open(SH,"<$name") || die "Cannot open $name:$!"; diff --git a/win32/config_sh.PL b/win32/config_sh.PL index b1c7b9f..0e1d351 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -42,8 +42,6 @@ while (@{$optref} && $optref->[0] =~ /^([\w_]+)=(.*)$/) { my $pl_h = '../patchlevel.h'; -$opt{VERSION} = $]; -$opt{INST_VER} =~ s|~VERSION~|$]|g; if (-e $pl_h) { open PL, "<$pl_h" or die "Can't open $pl_h: $!"; while () { @@ -53,17 +51,11 @@ if (-e $pl_h) { } close PL; } -elsif ($] =~ /^(\d+)\.(\d\d\d)?(\d\d)?$/) { # should always be true - $opt{PERL_REVISION} = $1; - $opt{PERL_VERSION} = int($2 || 0); - $opt{PERL_SUBVERSION} = $3; - $opt{PERL_APIVERSION} = $]; -} else { - die "Can't parse perl version ($])"; + die "Can't find $pl_h: $!"; } - -$opt{PERL_SUBVERSION} ||= '00'; +$opt{VERSION} = "$opt{PERL_REVISION}.$opt{PERL_VERSION}.$opt{PERL_SUBVERSION}"; +$opt{INST_VER} =~ s|~VERSION~|$opt{VERSION}|g; $opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'}; $opt{'cf_email'} = $opt{'cf_by'} . '@' . (gethostbyname('localhost'))[0] diff --git a/win32/makefile.mk b/win32/makefile.mk index b7bf93f..01034bb 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -33,7 +33,7 @@ INST_TOP *= $(INST_DRV)\perl # versioned installation can be obtained by setting INST_TOP above to a # path that includes an arbitrary version string. # -INST_VER *= \5.00564 +INST_VER *= \5.5.640 # # Comment this out if you DON'T want your perl installation to have diff --git a/win32/win32.c b/win32/win32.c index 53288af..43e9b5e 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -176,12 +176,13 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) char *optr; char *strip; int oldsize, newsize; + STRLEN baselen; va_start(ap, trailing_path); strip = va_arg(ap, char *); - sprintf(base, "%5.3f", - (double)PERL_REVISION + ((double)PERL_VERSION / (double)1000)); + sprintf(base, "%d.%d", (int)PERL_REVISION, (int)PERL_VERSION); + baselen = strlen(base); if (!*w32_module_name) { GetModuleFileName((HMODULE)((w32_perldll_handle == INVALID_HANDLE_VALUE) @@ -213,10 +214,10 @@ get_emd_part(SV **prev_pathp, char *trailing_path, ...) /* avoid stripping component if there is no slash, * or it doesn't match ... */ if (!ptr || stricmp(ptr+1, strip) != 0) { - /* ... but not if component matches 5.00X* */ + /* ... but not if component matches m|5\.$patchlevel.*| */ if (!ptr || !(*strip == '5' && *(ptr+1) == '5' - && strncmp(strip, base, 5) == 0 - && strncmp(ptr+1, base, 5) == 0)) + && strncmp(strip, base, baselen) == 0 + && strncmp(ptr+1, base, baselen) == 0)) { *optr = '/'; ptr = optr; @@ -283,12 +284,6 @@ win32_get_sitelib(char *pl) * ";$EMD/" . ((-d $EMD/../../../$]) ? "../../.." : "../.."). "/site/$]/lib"; */ sprintf(pathstr, "site/%s/lib", pl); (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, Nullch); - if (!sv1 && strlen(pl) == 7) { - /* pl may have been SUBVERSION-specific; try again without - * SUBVERSION */ - sprintf(pathstr, "site/%.5s/lib", pl); - (void)get_emd_part(&sv1, pathstr, ARCHNAME, "bin", pl, Nullch); - } /* $HKCU{'sitelib'} || $HKLM{'sitelib'} . ---; */ (void)get_regstr(sitelib, &sv2);