From d52cf7245b1814e346cb065fe9ef6f7978933b7d Mon Sep 17 00:00:00 2001 From: Christian Weisgerber Date: Tue, 12 Nov 2002 16:19:08 +0000 Subject: Fix "billenium" bug. PR: 44592 Submitted by: Ulrich Spoerlein Approved by: maintainer --- math/concorde/Makefile | 1 + math/concorde/files/patch-UTIL_urandom.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 math/concorde/files/patch-UTIL_urandom.c (limited to 'math') 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; -- cgit