isinf and isnan causing build failure on solaris
Status: Inactive
Brought to you by:
ruhler
Build fails on solaris because isnan and isinf aren't found. I ran into this problem before and fixed it in the makefile by adding -D__C99FEATURES__. The switch to autoconf got rid of that fix.
We can solve the problem the same way as a decent temporary solution. In the long run, it has been suggested to me a good solution would be to add isnan and isinf to gnulib and use that.
Logged In: YES
user_id=1884147
Originator: YES
Adding -D__C99FEATURES__ didn't fix the problem, so I guess it's not a decent temporary solution.
Logged In: YES
user_id=1884147
Originator: YES
Adding the following, taken from the autoconf manual, fixed the isnan and isinf problems:
static inline int isnan_f (float x) { return x != x; }
static inline int isnan_d (double x) { return x != x; }
static inline int isnan_ld (long double x) { return x != x; }
#endif
static inline int isinf_f (float x) { return isnan (x - x); }
static inline int isinf_d (double x) { return isnan (x - x); }
static inline int isinf_ld (long double x) { return isnan (x - x); }
#endif
Though admittedly, I didn't manage to run them and see if they worked.
The ideal solution would be add this to gnulib, and then use that.