2013-09-26 17:14:40 +02:00

19 lines
651 B
Plaintext

$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())
/* ------------------------------------------------------------------------- */