aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2002-11-13 00:19:08 +0800
committerChristian Weisgerber <naddy@FreeBSD.org>2002-11-13 00:19:08 +0800
commitd52cf7245b1814e346cb065fe9ef6f7978933b7d (patch)
treee83adbc4c920b260f7ff7120d348924708475c34 /math
parent71df32f88fc6b05363d4cf9a9a08053ed26d21a7 (diff)
downloadfreebsd-ports-gnome-d52cf7245b1814e346cb065fe9ef6f7978933b7d.tar.gz
freebsd-ports-gnome-d52cf7245b1814e346cb065fe9ef6f7978933b7d.tar.zst
freebsd-ports-gnome-d52cf7245b1814e346cb065fe9ef6f7978933b7d.zip
Fix "billenium" bug.
PR: 44592 Submitted by: Ulrich Spoerlein <q@uni.de> Approved by: maintainer
Diffstat (limited to 'math')
-rw-r--r--math/concorde/Makefile1
-rw-r--r--math/concorde/files/patch-UTIL_urandom.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/math/concorde/Makefile b/math/concorde/Makefile
index ab62afda4e0b..d71e5d874b44 100644
--- a/math/concorde/Makefile
+++ b/math/concorde/Makefile
@@ -7,6 +7,7 @@
PORTNAME= concorde
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= math
MASTER_SITES= ftp://ftp.caam.rice.edu/pub/software/keck/
DISTNAME= co991215
diff --git a/math/concorde/files/patch-UTIL_urandom.c b/math/concorde/files/patch-UTIL_urandom.c
new file mode 100644
index 000000000000..f74abbd7ce03
--- /dev/null
+++ b/math/concorde/files/patch-UTIL_urandom.c
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- UTIL/urandom.c.orig Thu Dec 16 19:39:06 1999
++++ UTIL/urandom.c Tue Nov 12 17:10:02 2002
+@@ -22,7 +22,7 @@
+ /* */
+ /* Written by: DIMACS (modified for TSP) */
+ /* Date: February 7, 1995 (cofeb16) */
+-/* */
++/* September 18, 2001 (billenium fix) */
+ /* */
+ /* EXPORTED FUNCTIONS: */
+ /* */
+@@ -66,6 +66,9 @@
+ int i, ii;
+ int last, next;
+ int *arr = r->arr;
++
++ seed %= CC_PRANDMAX;
++ if (seed < 0) seed += CC_PRANDMAX;
+
+ arr[0] = last = seed;
+ next = 1;