blob: bebd22b2ed0e6bc0ba54bfb3a2629d22fe0c1bb7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$NetBSD: patch-aa,v 1.3 2015/08/05 21:34:17 he Exp $
Make bit_max be computed dynamically.
--- plugins/fn-numtheory/numtheory.c.orig 2013-04-17 23:57:13.000000000 +0000
+++ plugins/fn-numtheory/numtheory.c
@@ -38,7 +38,10 @@ GNM_PLUGIN_MODULE_HEADER;
* represented in a gnm_float _and_ in a guint64. (For regular "double",
* the latter part is irrelevant.)
*/
-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())
/* ------------------------------------------------------------------------- */
|