From 3a72a4dd2436f8f83fead53b441143fbf9249358 Mon Sep 17 00:00:00 2001
From: Alex Dupre <ale@FreeBSD.org>
Date: Fri, 12 May 2006 07:45:39 +0000
Subject: Try to fix breakage on 64 bit platforms.

---
 math/gmp/Makefile                           |  1 +
 math/gmp/files/patch-mpn_generic_addsub_n.c | 50 +++++++++++++++++++++++++++++
 2 files changed, 51 insertions(+)
 create mode 100644 math/gmp/files/patch-mpn_generic_addsub_n.c

(limited to 'math/gmp')

diff --git a/math/gmp/Makefile b/math/gmp/Makefile
index 7588ae18c93a..b038167fbf83 100644
--- a/math/gmp/Makefile
+++ b/math/gmp/Makefile
@@ -8,6 +8,7 @@
 
 PORTNAME=	libgmp
 PORTVERSION=	4.2.1
+PORTREVISION=	1
 CATEGORIES=	math devel
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	gmp
diff --git a/math/gmp/files/patch-mpn_generic_addsub_n.c b/math/gmp/files/patch-mpn_generic_addsub_n.c
new file mode 100644
index 000000000000..5e2091963d59
--- /dev/null
+++ b/math/gmp/files/patch-mpn_generic_addsub_n.c
@@ -0,0 +1,50 @@
+--- mpn/generic/addsub_n.c.orig	Fri May 12 09:31:03 2006
++++ mpn/generic/addsub_n.c	Fri May 12 09:32:06 2006
+@@ -58,13 +58,13 @@
+       for (off = 0; off < n; off += PART_SIZE)
+ 	{
+ 	  this_n = MIN (n - off, PART_SIZE);
+-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
++#if HAVE_NATIVE_mpn_add_nc
+ 	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+ #else
+ 	  acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
+ 	  acyo = acyn + mpn_add_1 (r1p + off, r1p + off, this_n, acyo);
+ #endif
+-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
++#if HAVE_NATIVE_mpn_sub_nc
+ 	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+ #else
+ 	  scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
+@@ -81,13 +81,13 @@
+       for (off = 0; off < n; off += PART_SIZE)
+ 	{
+ 	  this_n = MIN (n - off, PART_SIZE);
+-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
++#if HAVE_NATIVE_mpn_sub_nc
+ 	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+ #else
+ 	  scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
+ 	  scyo = scyn + mpn_sub_1 (r2p + off, r2p + off, this_n, scyo);
+ #endif
+-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
++#if HAVE_NATIVE_mpn_add_nc
+ 	  acyo = mpn_add_nc (r1p + off, s1p + off, s2p + off, this_n, acyo);
+ #else
+ 	  acyn = mpn_add_n (r1p + off, s1p + off, s2p + off, this_n);
+@@ -105,13 +105,13 @@
+       for (off = 0; off < n; off += PART_SIZE)
+ 	{
+ 	  this_n = MIN (n - off, PART_SIZE);
+-#if HAVE_NATIVE_mpn_add_nc || !HAVE_NATIVE_mpn_add_n
++#if HAVE_NATIVE_mpn_add_nc
+ 	  acyo = mpn_add_nc (tp, s1p + off, s2p + off, this_n, acyo);
+ #else
+ 	  acyn = mpn_add_n (tp, s1p + off, s2p + off, this_n);
+ 	  acyo = acyn + mpn_add_1 (tp, tp, this_n, acyo);
+ #endif
+-#if HAVE_NATIVE_mpn_sub_nc || !HAVE_NATIVE_mpn_sub_n
++#if HAVE_NATIVE_mpn_sub_nc
+ 	  scyo = mpn_sub_nc (r2p + off, s1p + off, s2p + off, this_n, scyo);
+ #else
+ 	  scyn = mpn_sub_n (r2p + off, s1p + off, s2p + off, this_n);
-- 
cgit v1.2.3