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

Add missing #include <cmath> for std::isfinite #788

Closed
wants to merge 1 commit into from

Conversation

AMDmi3
Copy link

@AMDmi3 AMDmi3 commented Sep 10, 2016

Using std::isfinite() requires #include <cmath>, which doesn't exist in surrounding code. This results, for instance, in build failure of ZNC on FreeBSD 11.x (clang 3.8, libc++):

modperl/ZNC.cpp:2573:9: error: no member named 'isfinite' in namespace 'std'; did you mean simply 'isfinite'?
    if (SWIG_Float_Overflow_Check(v)) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
modperl/ZNC.cpp:2561:73: note: expanded from macro 'SWIG_Float_Overflow_Check'
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
                                                                        ^~~~~~~~~~~~~~~~
modperl/ZNC.cpp:2549:29: note: expanded from macro 'SWIG_isfinite'
#  define SWIG_isfinite(X) (std::isfinite(X))
                            ^~~~~
/usr/include/c++/v1/math.h:380:1: note: 'isfinite' declared here
isfinite(_A1 __lcpp_x) _NOEXCEPT
^
2 warnings and 1 error generated.

full log: http://beefy1.nyi.freebsd.org/data/110i386-quarterly/421620/logs/errors/znc-1.6.3.log

@ojwb
Copy link
Member

ojwb commented Sep 11, 2016

There's prior discussion in #615.

uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Sep 11, 2016
- Fix LICENSE and add LICENSE_FILE
- Remove long obsolete REINPLACE_CMD
- Silence patching and stipping

Upstream bugreport for reference: swig/swig#788

PR:		212196
Submitted by:	crees, amdmi3
Approved by:	maintainer timeout (sunpoet, 2 weeks)


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@421850 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this pull request Sep 11, 2016
- Fix LICENSE and add LICENSE_FILE
- Remove long obsolete REINPLACE_CMD
- Silence patching and stipping

Upstream bugreport for reference: swig/swig#788

PR:		212196
Submitted by:	crees, amdmi3
Approved by:	maintainer timeout (sunpoet, 2 weeks)
ojwb added a commit to ojwb/swig that referenced this pull request Dec 16, 2016
ojwb added a commit to ojwb/swig that referenced this pull request Dec 19, 2016
ojwb added a commit that referenced this pull request Dec 20, 2016
@wsfulton
Copy link
Member

Closing as superceded by #849. Please test it if you can before we release in the day or two!

@wsfulton wsfulton closed this Dec 21, 2016
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this pull request Jan 10, 2024
- Fix LICENSE and add LICENSE_FILE
- Remove long obsolete REINPLACE_CMD
- Silence patching and stipping

Upstream bugreport for reference: swig/swig#788

PR:		212196
Submitted by:	crees, amdmi3
Approved by:	maintainer timeout (sunpoet, 2 weeks)
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.

None yet

3 participants