aboutsummaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-21 16:19:59 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-03-21 16:19:59 -0400
commitac3a02b80bf78c4212eab930243c1a2e0ca9c728 (patch)
tree4545c421c3a843b5abc5d2e99d8a902fe4f36731 /environment.c
parent0ef96cb3c0d79ecd1ca4a1f04b58ee6dd0e03586 (diff)
Add version check for GNU MP's prev_prime()
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/environment.c b/environment.c
index 7b4bb5bf..9f230cd0 100644
--- a/environment.c
+++ b/environment.c
@@ -120,7 +120,11 @@ env_t *global_env(void)
{"parse", "Int$parse", "func(text:Text -> Int?)"},
{"plus", "Int$plus", "func(x,y:Int -> Int)"},
{"power", "Int$power", "func(base:Int,exponent:Int -> Int)"},
+#if __GNU_MP_VERSION >= 6
+#if __GNU_MP_VERSION_MINOR >= 3
{"prev_prime", "Int$prev_prime", "func(x:Int -> Int)"},
+#endif
+#endif
{"right_shifted", "Int$right_shifted", "func(x,y:Int -> Int)"},
{"sqrt", "Int$sqrt", "func(x:Int -> Int?)"},
{"times", "Int$times", "func(x,y:Int -> Int)"},