From: Gurusamy Sarathy Date: Tue, 16 Feb 1999 04:09:47 +0000 (+0000) Subject: propagate PERL_VERSION everywhere, add to pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cceca5ed003bac658cb0392a14bb2f26d434bd78;p=p5sagit%2Fp5-mst-13.2.git propagate PERL_VERSION everywhere, add to pod p4raw-id: //depot/perl@2957 --- diff --git a/Configure b/Configure index 47aa37e..27d3321 100755 --- a/Configure +++ b/Configure @@ -13159,7 +13159,7 @@ $test -f UU/cmdline.opt && $cat UU/cmdline.opt >> config.sh : add special variables $test -f $src/patchlevel.h && \ -awk '/^#define/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh +awk '/^#define[ ]+PERL_/ {printf "%s=%s\n",$2,$3}' $src/patchlevel.h >>config.sh echo "CONFIG=true" >>config.sh : propagate old symbols diff --git a/configpm b/configpm index ba07f14..9cf8103 100755 --- a/configpm +++ b/configpm @@ -44,8 +44,18 @@ $in_v = 0; while (<>) { next if m:^#!/bin/sh:; - # Catch CONFIG=true and PATCHLEVEL=n line from Configure. + # Catch CONFIG=true and PERL_VERSION=n line from Configure. s/^(\w+)=(true|\d+)\s*$/$1='$2'\n/; + my ($k,$v) = ($1,$2); + # grandfather PATCHLEVEL and SUBVERSION + if ($k) { + if ($k eq 'PERL_VERSION') { + push @v_others, "PATCHLEVEL='$v'\n"; + } + elsif ($k eq 'PERL_SUBVERSION') { + push @v_others, "SUBVERSION='$v'\n"; + } + } # We can delimit things in config.sh with either ' or ". unless ($in_v or m/^(\w+)=(['"])(.*\n)/){ push(@non_v, "#$_"); # not a name='value' line diff --git a/configure.com b/configure.com index 24ce886..70131e4 100644 --- a/configure.com +++ b/configure.com @@ -969,13 +969,13 @@ $ got_sub = "false" $ OPEN/READONLY CONFIG 'patchlevel_h' $Patchlevel_h_loop: $ READ/END_Of_File=Close_patch CONFIG line -$ IF ((F$LOCATE("#define PATCHLEVEL",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) +$ IF ((F$LOCATE("#define PERL_VERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_patch)) $ THEN $ line = F$EDIT(line,"COMPRESS, TRIM") $ patchlevel = F$EXTRACT(18,F$LENGTH(line)-18,line) $ got_patch = "true" $ ENDIF -$ IF ((F$LOCATE("#define SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) +$ IF ((F$LOCATE("#define PERL_SUBVERSION",line).NE.F$LENGTH(line)).AND.(.NOT.got_sub)) $ THEN $ line = F$EDIT(line,"COMPRESS, TRIM") $ subversion = F$EXTRACT(18,F$LENGTH(line)-18,line) diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm index 3803c71..67b20b9 100644 --- a/ext/B/B/C.pm +++ b/ext/B/B/C.pm @@ -1027,9 +1027,6 @@ sub output_boilerplate { print <<'EOT'; #include "EXTERN.h" #include "perl.h" -#ifndef PATCHLEVEL -#include "patchlevel.h" -#endif /* Workaround for mapstart: the only op which needs a different ppaddr */ #undef pp_mapstart diff --git a/ext/B/byteperl.c b/ext/B/byteperl.c index 6b53e3b..313ca03 100644 --- a/ext/B/byteperl.c +++ b/ext/B/byteperl.c @@ -1,8 +1,5 @@ #include "EXTERN.h" #include "perl.h" -#ifndef PATCHLEVEL -#include "patchlevel.h" -#endif static void xs_init _((void)); static PerlInterpreter *my_perl; @@ -28,11 +25,7 @@ main(int argc, char **argv, char **env) INIT_SPECIALSV_LIST; PERL_SYS_INIT(&argc,&argv); -#if PATCHLEVEL > 3 || (PATCHLEVEL == 3 && SUBVERSION >= 1) perl_init_i18nl10n(1); -#else - perl_init_i18nl14n(1); -#endif if (!PL_do_undump) { my_perl = perl_alloc(); diff --git a/ext/DB_File/DB_File.xs b/ext/DB_File/DB_File.xs index 723454e..33f4b69 100644 --- a/ext/DB_File/DB_File.xs +++ b/ext/DB_File/DB_File.xs @@ -70,6 +70,11 @@ #include "perl.h" #include "XSUB.h" +#ifndef PERL_VERSION +#include "patchlevel.h" +#define PERL_VERSION PATCHLEVEL +#endif + /* Being the Berkeley DB we prefer the (which will be * shortly #included by the ) __attribute__ to the possibly * already defined __attribute__, for example by GNUC or by Perl. */ @@ -335,7 +340,7 @@ GetVersionInfo() croak("DB_File needs Berkeley DB 2.0.5 or greater, you have %d.%d.%d\n", Major, Minor, Patch) ; -#if PATCHLEVEL > 3 +#if PERL_VERSION > 3 sv_setpvf(ver_sv, "%d.%d", Major, Minor) ; #else { diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs index a3da110..ad7c5d4 100644 --- a/ext/Data/Dumper/Dumper.xs +++ b/ext/Data/Dumper/Dumper.xs @@ -2,9 +2,12 @@ #include "perl.h" #include "XSUB.h" +#ifndef PERL_VERSION #include "patchlevel.h" +#defined PERL_VERSION PATCHLEVEL +#endif -#if PATCHLEVEL < 5 +#if PERL_VERSION < 5 # ifndef PL_sv_undef # define PL_sv_undef sv_undef # endif diff --git a/ext/IO/IO.xs b/ext/IO/IO.xs index 1d0e356..eb18f0c 100644 --- a/ext/IO/IO.xs +++ b/ext/IO/IO.xs @@ -27,20 +27,7 @@ typedef FILE * InputStream; typedef FILE * OutputStream; #endif -#include "patchlevel.h" - -#if (PATCHLEVEL < 3) || ((PATCHLEVEL == 3) && (SUBVERSION < 22)) - /* before 5.003_22 */ -# define MY_start_subparse(fmt,flags) start_subparse() -#else -# if (PATCHLEVEL == 3) && (SUBVERSION == 22) - /* 5.003_22 */ -# define MY_start_subparse(fmt,flags) start_subparse(flags) -# else - /* 5.003_23 onwards */ -# define MY_start_subparse(fmt,flags) start_subparse(fmt,flags) -# endif -#endif +#define MY_start_subparse(fmt,flags) start_subparse(fmt,flags) #ifndef gv_stashpvn #define gv_stashpvn(str,len,flags) gv_stashpv(str,flags) diff --git a/hints/freebsd.sh b/hints/freebsd.sh index 66f6ca0..f841d32 100644 --- a/hints/freebsd.sh +++ b/hints/freebsd.sh @@ -147,8 +147,8 @@ case "$osvers" in # the equivalent in the main Configure so we copy a little # from Configure XXX Configure should be fixed. if $test -r $src/patchlevel.h;then - patchlevel=`awk '/define[ ]+PATCHLEVEL/ {print $3}' $src/patchlevel.h` - subversion=`awk '/define[ ]+SUBVERSION/ {print $3}' $src/patchlevel.h` + patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $src/patchlevel.h` + subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $src/patchlevel.h` else patchlevel=0 subversion=0 diff --git a/installman b/installman index 6fa4231..51e2019 100755 --- a/installman +++ b/installman @@ -17,8 +17,8 @@ $ver = $]; $release = substr($ver,0,3); # Not used presently. $patchlevel = substr($ver,3,2); die "Patchlevel of perl ($patchlevel)", - "and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n" - if $patchlevel != $Config{'PATCHLEVEL'}; + "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n" + if $patchlevel != $Config{'PERL_VERSION'}; $usage = "Usage: installman --man1dir=/usr/wherever --man1ext=1 diff --git a/installperl b/installperl index 979000c..006a550 100755 --- a/installperl +++ b/installperl @@ -87,8 +87,8 @@ my $ver = $]; my $release = substr($ver,0,3); # Not used presently. my $patchlevel = substr($ver,3,2); die "Patchlevel of perl ($patchlevel)", - "and patchlevel of config.sh ($Config{'PATCHLEVEL'}) don't match\n" - if $patchlevel != $Config{'PATCHLEVEL'}; + "and patchlevel of config.sh ($Config{'PERL_VERSION'}) don't match\n" + if $patchlevel != $Config{'PERL_VERSION'}; # Fetch some frequently-used items from %Config my $installbin = $Config{installbin}; diff --git a/myconfig b/myconfig index 51991e6..02ee0a6 100755 --- a/myconfig +++ b/myconfig @@ -17,7 +17,7 @@ fi # Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm. $spitshell <>Makefile < $@ - echo DESCRIPTION "'Perl interpreter v$(PERL_VERSION), export autogenerated, built with $(CONFIG_ARGS)'" >>$@ + echo DESCRIPTION "'Perl interpreter v$(PERL_FULLVERSION), export autogenerated, built with $(CONFIG_ARGS)'" >>$@ echo STACKSIZE 32768 >>$@ echo CODE LOADONCALL >>$@ echo DATA LOADONCALL NONSHARED MULTIPLE >>$@ diff --git a/os2/os2.c b/os2/os2.c index 7084074..3103012 100644 --- a/os2/os2.c +++ b/os2/os2.c @@ -1315,7 +1315,7 @@ mod2fname(sv) #ifdef USE_THREADS sum++; /* Avoid conflict of DLLs in memory. */ #endif - sum += PATCHLEVEL * 200 + SUBVERSION * 2; /* */ + sum += PERL_VERSION * 200 + PERL_SUBVERSION * 2; /* */ fname[pos] = 'A' + (sum % 26); fname[pos + 1] = 'A' + (sum / 26 % 26); fname[pos + 2] = '\0'; diff --git a/patchlevel.h b/patchlevel.h index b561f11..2cfdec6 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -7,11 +7,6 @@ #define PERL_VERSION 5 /* epoch */ #define PERL_SUBVERSION 55 /* generation */ -/* these are the old terms of reference */ -#define PATCHLEVEL PERL_VERSION -#undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */ -#define SUBVERSION PERL_SUBVERSION - /* local_patches -- list of locally applied less-than-subversion patches. If you're distributing such a patch, please give it a name and a @@ -58,3 +53,11 @@ static char *local_patches[] = { # define __PATCHLEVEL_H_INCLUDED__ #endif + +/* the old terms of reference, add them only when explicitly included */ +#if !defined(PERL_PATCHLEVEL_H_IMPLICIT) && !defined(PATCHLEVEL) +#define PATCHLEVEL PERL_VERSION +#undef SUBVERSION /* OS/390 has a SUBVERSION in a system header */ +#define SUBVERSION PERL_SUBVERSION +#endif + diff --git a/perl.c b/perl.c index 69ded97..81d1f96 100644 --- a/perl.c +++ b/perl.c @@ -13,7 +13,6 @@ #include "EXTERN.h" #include "perl.h" -#include "patchlevel.h" /* XXX If this causes problems, set i_unistd=undef in the hint file. */ #ifdef I_UNISTD @@ -210,13 +209,13 @@ perl_construct(register PerlInterpreter *sv_interp) STATUS_ALL_SUCCESS; SET_NUMERIC_STANDARD(); -#if defined(SUBVERSION) && SUBVERSION > 0 - sprintf(PL_patchlevel, "%7.5f", (double) 5 - + ((double) PATCHLEVEL / (double) 1000) - + ((double) SUBVERSION / (double) 100000)); +#if defined(PERL_SUBVERSION) && PERL_SUBVERSION > 0 + sprintf(PL_patchlevel, "%7.5f", (double) PERL_REVISION + + ((double) PERL_VERSION / (double) 1000) + + ((double) PERL_SUBVERSION / (double) 100000)); #else - sprintf(PL_patchlevel, "%5.3f", (double) 5 + - ((double) PATCHLEVEL / (double) 1000)); + sprintf(PL_patchlevel, "%5.3f", (double) PERL_REVISION + + ((double) PERL_VERSION / (double) 1000)); #endif #if defined(LOCAL_PATCH_COUNT) @@ -1719,9 +1718,9 @@ moreswitches(char *s) s++; return s; case 'v': -#if defined(SUBVERSION) && SUBVERSION > 0 - printf("\nThis is perl, version 5.%03d_%02d built for %s", - PATCHLEVEL, SUBVERSION, ARCHNAME); +#if defined(PERL_SUBVERSION) && PERL_SUBVERSION > 0 + printf("\nThis is perl, version %d.%03d_%02d built for %s", + PERL_REVISION, PERL_VERSION, PERL_SUBVERSION, ARCHNAME); #else printf("\nThis is perl, version %s built for %s", PL_patchlevel, ARCHNAME); diff --git a/perl.h b/perl.h index eaa2194..42505f0 100644 --- a/perl.h +++ b/perl.h @@ -2796,6 +2796,8 @@ typedef struct am_table_short AMTS; #endif /* IAMSUID */ /* and finally... */ +#define PERL_PATCHLEVEL_H_IMPLICIT #include "patchlevel.h" +#undef PERL_PATCHLEVEL_H_IMPLICIT #endif /* Include guard */ diff --git a/plan9/genconfig.pl b/plan9/genconfig.pl index 458c4c3..d934659 100644 --- a/plan9/genconfig.pl +++ b/plan9/genconfig.pl @@ -261,12 +261,18 @@ foreach (sort keys %val_vars) { if (open(PL,"${outdir}patchlevel.h")) { while () { - if (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; } - elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; } + if (/^#define PERL_VERSION\s+(\S+)/) { + print OUT "PERL_VERSION='$1'\n"; + print OUT "PATCHLEVEL='$1'\n"; # XXX compat + } + elsif (/^#define PERL_SUBVERSION\s+(\S+)/) { + print OUT "PERL_SUBVERSION='$1'\n"; + print OUT "SUBVERSION='$1'\n"; # XXX compat + } } close PL; } -else { warn "Can't read ${outdir}patchlevel.h - skipping 'PATCHLEVEL'"; } +else { warn "Can't read ${outdir}patchlevel.h - skipping 'PERL_VERSION'"; } print OUT "pager='/bin/p'\n"; diff --git a/plan9/myconfig.plan9 b/plan9/myconfig.plan9 index f336a7c..59512d5c 100644 --- a/plan9/myconfig.plan9 +++ b/plan9/myconfig.plan9 @@ -15,7 +15,7 @@ $spitshell< "buildinfo"; diff --git a/pod/perldebug.pod b/pod/perldebug.pod index 760d517..ed77fd3 100644 --- a/pod/perldebug.pod +++ b/pod/perldebug.pod @@ -754,8 +754,8 @@ for different values of C: in @=Config::myconfig() from /dev/nul:0 in $=Config::FETCH(ref(Config), 'package') from lib/Config.pm:574 in $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574 - in $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574 - in $=Config::FETCH(ref(Config), 'SUBVERSION') from lib/Config.pm:574 + in $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574 + in $=Config::FETCH(ref(Config), 'PERL_SUBVERSION') from lib/Config.pm:574 in $=Config::FETCH(ref(Config), 'osname') from lib/Config.pm:574 in $=Config::FETCH(ref(Config), 'osvers') from lib/Config.pm:574 @@ -779,9 +779,9 @@ for different values of C: out $=Config::FETCH(ref(Config), 'package') from lib/Config.pm:574 in $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574 out $=Config::FETCH(ref(Config), 'baserev') from lib/Config.pm:574 - in $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574 - out $=Config::FETCH(ref(Config), 'PATCHLEVEL') from lib/Config.pm:574 - in $=Config::FETCH(ref(Config), 'SUBVERSION') from lib/Config.pm:574 + in $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574 + out $=Config::FETCH(ref(Config), 'PERL_VERSION') from lib/Config.pm:574 + in $=Config::FETCH(ref(Config), 'PERL_SUBVERSION') from lib/Config.pm:574 =item 14 diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 7f944c2..f597877 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -55,6 +55,26 @@ a C. =back +=head2 Compatible C Source API Changes + +=over + +=item C is now C + +The cpp macros C, C and C +are now available by default from perl.h, and reflect the base revision, +patchlevel and subversion respectively. C had no +prior equivalent, while C and C were +previously available as C and C. + +The new names cause less pollution of the cpp namespace, and reflect what +the numbers have come to stand for in common practice. For compatibility, +the old names are still supported when patchlevel.h is explicitly +included (as required before), so there is no source incompatibility +due to the change. + +=back + =head2 Binary Incompatibilities This release is not binary compatible with the 5.005 release and its diff --git a/vms/genconfig.pl b/vms/genconfig.pl index 45f50ca..e500e76 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -391,8 +391,14 @@ else { warn "Can't read ${outdir}crtl.opt - skipping 'libs' & 'libc'"; } if (open(PL,"${outdir}patchlevel.h")) { while () { - if (/^#define PATCHLEVEL\s+(\S+)/) { print OUT "PATCHLEVEL='$1'\n"; } - elsif (/^#define SUBVERSION\s+(\S+)/) { print OUT "SUBVERSION='$1'\n"; } + if (/^#define PERL_VERSION\s+(\S+)/) { + print OUT "PERL_VERSION='$1'\n"; + print OUT "PATCHLEVEL='$1'\n"; # XXX compat + } + elsif (/^#define PERL_SUBVERSION\s+(\S+)/) { + print OUT "PERL_SUBVERSION='$1'\n"; + print OUT "SUBVERSION='$1'\n"; # XXX compat + } } close PL; } diff --git a/vms/myconfig.com b/vms/myconfig.com index 6af0943..1429f86 100644 --- a/vms/myconfig.com +++ b/vms/myconfig.com @@ -120,13 +120,13 @@ $ endif $ open/read RATHER_LONG_CONFIG_FILE_HANDLE 'RATHER_LONG_FILENAME_SEARCH' $read_patchlevel_h: $ read/end_of_file = patchlevel_h_Done RATHER_LONG_CONFIG_FILE_HANDLE line -$ if f$locate("PATCHLEVEL",line).ne.f$length(line) +$ if f$locate("PERL_VERSION",line).ne.f$length(line) $ then $ line = f$edit(line,"TRIM,COMPRESS") $ $PATCHLEVEL = f$element(2," ",line) $ if f$type($SUBVERSION).nes."" then goto patchlevel_h_Done $ endif -$ if f$locate("SUBVERSION",line).ne.f$length(line) +$ if f$locate("PERL_SUBVERSION",line).ne.f$length(line) $ then $ line = f$edit(line,"TRIM,COMPRESS") $ $SUBVERSION = f$element(2," ",line) @@ -138,7 +138,7 @@ $patchlevel_h_Done: $ close RATHER_LONG_CONFIG_FILE_HANDLE $ if $PATCHLEVEL.eqs."" $ then -$ echo "warning: PATCHLEVEL was not found in ''RATHER_LONG_FILENAME_TO_FIND':" +$ echo "warning: PERL_VERSION was not found in ''RATHER_LONG_FILENAME_TO_FIND':" $ endif $look_for_genconfig_pl: @@ -297,7 +297,7 @@ $ endif $spit_it_out: $! $spitshell = ECHO !<d_has_uname? diff --git a/vms/subconfigure.com b/vms/subconfigure.com index 6f43c9e..ab5fdfb 100644 --- a/vms/subconfigure.com +++ b/vms/subconfigure.com @@ -2927,6 +2927,10 @@ $ WC "voidflags='" + perl_voidflags + "'" $ WC "d_eunice='" + perl_d_eunice + "'" $ WC "libs='" + perl_libs + "'" $ WC "libc='" + perl_libc + "'" +$ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'" +$ WC tempstring +$ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'" +$ WC tempstring $ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'" $ WC tempstring $ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'" diff --git a/win32/config.bc b/win32/config.bc index 7fe2222..1726a36 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -8,10 +8,12 @@ Id='$Id' Locker='' Log='$Log' Mcc='Mcc' -PATCHLEVEL='~PATCHLEVEL~' +PERL_VERSION='~PERL_VERSION~' +PERL_SUBVERSION='~PERL_SUBVERSION~' +PATCHLEVEL='~PERL_VERSION~' RCSfile='$RCSfile' Revision='$Revision' -SUBVERSION='~SUBVERSION~' +SUBVERSION='~PERL_SUBVERSION~' Source='' State='' _a='.lib' diff --git a/win32/config.gc b/win32/config.gc index 728f8dc..a1d5d0b 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -8,10 +8,12 @@ Id='$Id' Locker='' Log='$Log' Mcc='Mcc' -PATCHLEVEL='~PATCHLEVEL~' +PERL_VERSION='~PERL_VERSION~' +PERL_SUBVERSION='~PERL_SUBVERSION~' +PATCHLEVEL='~PERL_VERSION~' RCSfile='$RCSfile' Revision='$Revision' -SUBVERSION='~SUBVERSION~' +SUBVERSION='~PERL_SUBVERSION~' Source='' State='' _a='.a' diff --git a/win32/config.vc b/win32/config.vc index 78fb8c0..11aa47e 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -8,10 +8,12 @@ Id='$Id' Locker='' Log='$Log' Mcc='Mcc' -PATCHLEVEL='~PATCHLEVEL~' +PERL_VERSION='~PERL_VERSION~' +PERL_SUBVERSION='~PERL_SUBVERSION~' +PATCHLEVEL='~PERL_VERSION~' RCSfile='$RCSfile' Revision='$Revision' -SUBVERSION='~SUBVERSION~' +SUBVERSION='~PERL_SUBVERSION~' Source='' State='' _a='.lib' diff --git a/win32/config_sh.PL b/win32/config_sh.PL index 1d4b2fb..fc0daf0 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -20,8 +20,8 @@ while (@ARGV && $ARGV[0] =~ /^([\w_]+)=(.*)$/) $opt{VERSION} = $]; $opt{INST_VER} =~ s|~VERSION~|$]|g; if ($] =~ /\.(\d\d\d)?(\d\d)?$/) { # should always be true - $opt{PATCHLEVEL} = int($1 || 0); - $opt{SUBVERSION} = $2 || '00'; + $opt{PERL_VERSION} = int($1 || 0); + $opt{PERL_SUBVERSION} = $2 || '00'; } $opt{'cf_by'} = $ENV{USERNAME} unless $opt{'cf_by'}; diff --git a/win32/win32.c b/win32/win32.c index 7b328e9..408215c 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -38,8 +38,6 @@ #include "EXTERN.h" #include "perl.h" -#include "patchlevel.h" - #define NO_XSLOCKS #ifdef PERL_OBJECT extern CPerlObj* pPerl; @@ -189,7 +187,8 @@ get_emd_part(char *prev_path, char *trailing_path, ...) va_start(ap, trailing_path); strip = va_arg(ap, char *); - sprintf(base, "%5.3f", (double) 5 + ((double) PATCHLEVEL / (double) 1000)); + sprintf(base, "%5.3f", + (double)PERL_REVISION + ((double)PERL_VERSION / (double)1000)); GetModuleFileName((HMODULE)((w32_perldll_handle == INVALID_HANDLE_VALUE) ? GetModuleHandle(NULL) : w32_perldll_handle), diff --git a/x2p/a2py.c b/x2p/a2py.c index cb09fce..3976c86 100644 --- a/x2p/a2py.c +++ b/x2p/a2py.c @@ -35,7 +35,7 @@ static void usage(void); static void usage() { - printf("\nThis is the AWK to PERL translator, version 5.0, patchlevel %d\n", PATCHLEVEL); + printf("\nThis is the AWK to PERL translator, revision %d.0, version %d\n", PERL_REVISION, PERL_VERSION); printf("\nUsage: %s [-D] [-F] [-n] [-] filename\n", myname); printf("\n -D sets debugging flags." "\n -F the awk script to translate is always invoked with"