Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid to use std::ceil #3713

Merged
merged 2 commits into from
Oct 14, 2019
Merged

avoid to use std::ceil #3713

merged 2 commits into from
Oct 14, 2019

Conversation

mdionisio
Copy link
Contributor

avoid to used "ceil" has the good collateral effect that math library is not used any more and if we build libzmq with statically linked stdc++ we can avoid to add "-lm"

Signed-off-by: Michele Dionisio <michele.dionisio@gmail.com>
@bluca
Copy link
Member

bluca commented Oct 14, 2019

Can you remove the -lm given it's no longer necessary? Also please fix the indentation:

-    _max_counters (
-      (_max_size + msg_t::max_vsm_size - 1)
-      / msg_t::max_vsm_size)
+    _max_counters ((_max_size + msg_t::max_vsm_size - 1) / msg_t::max_vsm_size)

ceil function is usually in math library that can be avoided as dependency
@mdionisio
Copy link
Contributor Author

I will fix the indentation, but I cannot remove the "-lm" because it is an implicit dependency of libstdc++

@bluca bluca merged commit 683bf1d into zeromq:master Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants