From: ville.mattila@... Date: 2006-02-02T00:44:50+09:00 Subject: Re: [PATCH] solaris 10 isinf and ruby_setenv fixes >From: H.Yamamoto >Date: 01.02.2006 16:07:15 >Subject: Re: [PATCH] solaris 10 isinf and ruby_setenv fixes > >Hello. > >>This patch works correctly for me. However there is still the isinf trouble >>(e.g. configure cannot find isinf on solaris 10) > >Well, should I commit your patch [ruby-core:7273], >or define isinf/isnan in [ruby-core:7151] somewhere? The below thing seems to be bit kludge to me. I can test it if you can send me a patch that has it put somewhere. > >| #include >| >| # define isnan(x) \ >| (sizeof (x) == sizeof (long double) ? isnan_ld (x) \ >| : sizeof (x) == sizeof (double) ? isnan_d (x) \ >| : isnan_f (x)) >| 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 >| >| # define isinf(x) \ >| (sizeof (x) == sizeof (long double) ? isinf_ld (x) \ >| : sizeof (x) == sizeof (double) ? isinf_d (x) \ >| : isinf_f (x)) >| 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 > >