summaryrefslogtreecommitdiff
path: root/math/gnumeric/patches/patch-aa
blob: 89931b577ae430537cddedc56731d06b2ffd6f59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-aa,v 1.20 2008/03/07 21:33:33 wiz Exp $

Sunpro doesn't like floating point comparisons in constant expressions.

--- plugins/numtheory/numtheory.c.orig	2007-01-01 03:40:18.000000000 +0100
+++ plugins/numtheory/numtheory.c	2007-11-23 16:17:34.395473000 +0100
@@ -33,7 +33,10 @@ GNM_PLUGIN_MODULE_HEADER;
 
 #define OUT_OF_BOUNDS "#LIMIT!"
 
-static const double bit_max = MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64);
+static inline double bit_max_fn(void) {
+	return MIN (1 / GNM_EPSILON, (gnm_float)G_MAXUINT64);
+}
+#define bit_max (bit_max_fn())
 
 /* ------------------------------------------------------------------------- */