[libmath-random-perl] 03/04: Remove random-seed patch, applied upstream.
Charles Plessy
plessy at moszumanska.debian.org
Thu Sep 24 13:02:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
plessy pushed a commit to branch master
in repository libmath-random-perl.
commit 52bc110117c80743604ec11557e94eeed7ddbb5b
Author: Charles Plessy <plessy at debian.org>
Date: Thu Sep 24 21:57:30 2015 +0900
Remove random-seed patch, applied upstream.
---
debian/patches/random-seed.patch | 66 ----------------------------------------
debian/patches/series | 1 -
2 files changed, 67 deletions(-)
diff --git a/debian/patches/random-seed.patch b/debian/patches/random-seed.patch
deleted file mode 100644
index d9d4cbe..0000000
--- a/debian/patches/random-seed.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Description: Update seeding algorithm
- By default, this algorithm uses localtime to seed the random number
- generator, which provides poor randomness when Perl is executed many
- times sequentially. This patch replaces that with Don Armstrong's
- proposed solution, Perl_seed. See BTS#537952 for details.
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/537952
-Bug: https://rt.cpan.org/Ticket/Display.html?id=48080
-Forwarded: yes
-Author: Jonathan Yu <frequency at cpan.org>
-Reviewed-by: gregor herrmann <gregoa at debian.org>
-Last-Update: 2011-05-09
-
---- a/Random.pm
-+++ b/Random.pm
-@@ -73,7 +73,12 @@
-
-
- ### set seeds by default
--salfph(scalar(localtime()));
-+if ($] > 5.008001) {
-+ set_default_seed();
-+}
-+else {
-+ salfph(scalar localtime);
-+}
-
- #####################################################################
- # RANDOM DEVIATE GENERATORS #
---- a/Random.xs
-+++ b/Random.xs
-@@ -11,6 +11,23 @@
- #include "randlib.h"
- #include "helper.h"
-
-+#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.
-+ */
-+#define default_seed_mechanism \
-+ setall((long)(Perl_seed(aTHX) % 1073741824L), \
-+ (long)(Perl_seed(aTHX) % 1073741824L));
-+#else /* Perl < 5.8.1 */
-+#define default_seed_mechanism not_here("Perl_seed");
-+#endif
-+
- static int
- not_here(s)
- char *s;
-@@ -38,6 +55,10 @@
-
- MODULE = Math::Random PACKAGE = Math::Random
-
-+void
-+set_default_seed()
-+ CODE:
-+ default_seed_mechanism;
-
- double
- genbet (aa,bb)
diff --git a/debian/patches/series b/debian/patches/series
index f117702..fac1829 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
pod-errors.patch
-random-seed.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-random-perl.git
More information about the Pkg-perl-cvs-commits
mailing list