Skip to content

Commit

Permalink
Merge pull request #303 from nobu/extconf
Browse files Browse the repository at this point in the history
Reduce unnecessary checks
  • Loading branch information
nobu authored Sep 9, 2024
2 parents 33b5374 + 8fa7712 commit ad4fec6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ext/bigdecimal/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ def have_builtin_func(name, check_expr, opt = "", &b)
have_header("stdbool.h")
have_header("stdlib.h")

have_header("x86intrin.h")
have_func("_lzcnt_u32", "x86intrin.h")
have_func("_lzcnt_u64", "x86intrin.h")

have_header("intrin.h")
have_func("__lzcnt", "intrin.h")
have_func("__lzcnt64", "intrin.h")
have_func("_BitScanReverse", "intrin.h")
have_func("_BitScanReverse64", "intrin.h")
if have_header("x86intrin.h")
have_func("_lzcnt_u32", "x86intrin.h")
have_func("_lzcnt_u64", "x86intrin.h")
end

if have_header("intrin.h")
have_func("__lzcnt", "intrin.h")
have_func("__lzcnt64", "intrin.h")
have_func("_BitScanReverse", "intrin.h")
have_func("_BitScanReverse64", "intrin.h")
end

have_func("labs", "stdlib.h")
have_func("llabs", "stdlib.h")
Expand Down

0 comments on commit ad4fec6

Please sign in to comment.