Skip to content

Commit

Permalink
GMP: fix warning in init (#42062)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4598966)
  • Loading branch information
vtjnash authored and KristofferC committed Sep 3, 2021
1 parent 5e641b9 commit 7cdfa10
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/gmp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ const ALLOC_OVERFLOW_FUNCTION = Ref(false)
function __init__()
try
if version().major != VERSION.major || bits_per_limb() != BITS_PER_LIMB
msg = bits_per_limb() != BITS_PER_LIMB ? error : warn
msg("The dynamically loaded GMP library (v\"$(version())\" with __gmp_bits_per_limb == $(bits_per_limb()))\n",
"does not correspond to the compile time version (v\"$VERSION\" with __gmp_bits_per_limb == $BITS_PER_LIMB).\n",
"Please rebuild Julia.")
msg = """The dynamically loaded GMP library (v\"$(version())\" with __gmp_bits_per_limb == $(bits_per_limb()))
does not correspond to the compile time version (v\"$VERSION\" with __gmp_bits_per_limb == $BITS_PER_LIMB).
Please rebuild Julia."""
bits_per_limb() != BITS_PER_LIMB ? @error(msg) : @warn(msg)
end

ccall((:__gmp_set_memory_functions, :libgmp), Cvoid,
Expand Down

0 comments on commit 7cdfa10

Please sign in to comment.