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

bug on Solaris10 (gcc version 4.4.2) #69

Open
takmatumot opened this issue Sep 16, 2015 · 1 comment
Open

bug on Solaris10 (gcc version 4.4.2) #69

takmatumot opened this issue Sep 16, 2015 · 1 comment

Comments

@takmatumot
Copy link

Hello,

I tried to use picojson.h(version1.3.0) on Solaris 10 (gcc version 4.4.2)
And I got the following errors.

Is it possible to fix the bug on picojson.h?

---->
In file included from ./ms_conf.cpp:24:
./picojson.h: In constructor 'picojson::value::value(double)':
./picojson.h:200: error: 'isnan' is not a member of 'std'
./picojson.h:200: error: 'isinf' is not a member of 'std'
*** Error code 1
The following command caused the error:
<---

@takmatumot
Copy link
Author

Hello,

If I modified the functions of picojson.h around line 200 like below,
I could avoid the error.

#elif defined(__sun) && defined(__SVR4)
isnan(n)
==> this part was added

I would appreciate if these updates were considered.

regards,
matumot

----->

inline value::value(double n) : type_(number_type) {
if (

#ifdef _MSC_VER
! _finite(n)
#elif defined(__sun) && defined(__SVR4)
isnan(n)
#elif __cplusplus>=201103L || !(defined(isnan) && defined(isinf))
std::isnan(n) || std::isinf(n)
#else
isnan(n) || isinf(n)
#endif

    ) {
  throw std::overflow_error("");
}
u_.number_ = n;

}

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

No branches or pull requests

1 participant