[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

Re: [PATCH] solaris 10 isinf and ruby_setenv fixes

From: Tanaka Akira <akr@...17n.org>
Date: 2006-01-14 06:58:25 UTC
List: ruby-core #7151
In article <OFDC7A1FAA.CD90E9D1-ONC22570F5.004629FE-C22570F5.00470914@stonesoft.com>,
  ville.mattila@stonesoft.com writes:

>  1. The isinf is not regognized by autoconf library guesser, so it gets
> undefined and
>       the missing/isinf.c is used, which will get compilation error.
>       Solution is to force isinf to defined and -lm to be added to LIBS
> when solaris is configured.

I found a description about isinf in autoconf.texi.
It seems that AC_REPLACE_FUNCS is not appropriate for isinf.

http://cvs.savannah.gnu.org/viewcvs/autoconf/doc/?root=autoconf

| @item @code{isinf}
| @itemx @code{isnan}
| @c @fuindex isinf
| @c @fuindex isnan
| @prindex @code{isinf}
| @prindex @code{isnan}
| The ISO C99 standard specifies that @code{isinf} and @code{isnan} are
| macros.  On some systems just macros are available (e.g., HP-UX), on
| some systems both macros and functions (e.g., glibc 2.3.2), and on some
| systems only functions (e.g., IRIX 6 and Solaris 9).  In some cases
| these functions are declared in nonstandard headers like
| @code{<sunmath.h>} and defined in non-default libraries like
| @option{-lm} or @option{-lsunmath}.
| 
| The C99 @code{isinf} and @code{isnan} macros work correctly with
| @code{long double} arguments, but pre-C99 systems that use functions
| typically assume @code{double} arguments.  On such a system,
| @code{isinf} incorrectly returns true for a finite @code{long double}
| argument that is outside the range of @code{double}.
| 
| To work around this porting mess, you can use code like the following.
| 
| @smallexample
| #include <math.h>
| 
| #ifndef isnan
| # 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
| 
| #ifndef isinf
| # 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
| @end smallexample
| 
| Use @code{AC_C_INLINE} (@pxref{C Compiler}) so that this code works on
| compilers that lack the @code{inline} keyword.  Some optimizing
| compilers mishandle these definitions, but systems with that bug
| typically have missing or broken @code{isnan} functions anyway, so it's
| probably not worth worrying about.
-- 
Tanaka Akira

In This Thread