summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-16 04:09:47 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-16 04:09:47 +0000
commitcceca5ed003bac658cb0392a14bb2f26d434bd78 (patch)
tree286c2340276a7cbefe1899f0f01767791bb31ea4 /ext
parenta9fb271febef206f32659f8abc5f9029ae2f7a25 (diff)
downloadperl-cceca5ed003bac658cb0392a14bb2f26d434bd78.tar.gz
propagate PERL_VERSION everywhere, add to pod
p4raw-id: //depot/perl@2957
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B/C.pm3
-rw-r--r--ext/B/byteperl.c7
-rw-r--r--ext/DB_File/DB_File.xs7
-rw-r--r--ext/Data/Dumper/Dumper.xs5
-rw-r--r--ext/IO/IO.xs15
5 files changed, 11 insertions, 26 deletions
diff --git a/ext/B/B/C.pm b/ext/B/B/C.pm
index 3803c71a84..67b20b965a 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 6b53e3b174..313ca031e8 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 723454eea4..33f4b690f3 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 <sys/cdefs.h> (which will be
* shortly #included by the <db.h>) __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 a3da110453..ad7c5d435c 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 1d0e3567db..eb18f0c478 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)