r40495 - /trunk/libmath-random-perl/debian/patches/random-seed.patch
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Jul 22 15:42:12 UTC 2009
Author: jawnsy-guest
Date: Wed Jul 22 15:42:03 2009
New Revision: 40495
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=40495
Log:
check that Perl version is at least 5.8.1 for our special code
Modified:
trunk/libmath-random-perl/debian/patches/random-seed.patch
Modified: trunk/libmath-random-perl/debian/patches/random-seed.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmath-random-perl/debian/patches/random-seed.patch?rev=40495&op=diff
==============================================================================
--- trunk/libmath-random-perl/debian/patches/random-seed.patch (original)
+++ trunk/libmath-random-perl/debian/patches/random-seed.patch Wed Jul 22 15:42:03 2009
@@ -21,11 +21,17 @@
# RANDOM DEVIATE GENERATORS #
--- a/Random.xs
+++ b/Random.xs
-@@ -11,6 +11,22 @@
+@@ -11,6 +11,28 @@
#include "randlib.h"
#include "helper.h"
-+#ifdef Perl_seed
++#define PERL_VERSION_ATLEAST(a,b,c) \
++ (PERL_REVISION > (a) \
++ || (PERL_REVISION == (a) \
++ && (PERL_VERSION > (b) \
++ || (PERL_VERSION == (b) && PERL_SUBVERSION >= (c)))))
++
++#if PERL_VERSION_ATLEAST (5,8,1)
+/* For whatever reason, the random seeds need to be in 1..2^30; the below will
+ * be uniformly distributed assuming the seed value is uniformly distributed.
+ *
@@ -44,7 +50,7 @@
static int
not_here(s)
char *s;
-@@ -38,6 +54,12 @@
+@@ -38,6 +60,12 @@
MODULE = Math::Random PACKAGE = Math::Random
More information about the Pkg-perl-cvs-commits
mailing list