From: Rouben R. <ros...@um...> - 2002-10-31 15:45:53
|
Brian, re your message: > In light of these two replies, maybe this would do it: > > > #if defined(isfinite) > #define IS_INF_OR_NAN(x) (!isfinite(x)) > #elif defined(finite) > #define IS_INF_OR_NAN(x) (!finite(x)) > #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > #define IS_INF_OR_NAN(x) (!isfinite(x)) > #else > #define IS_INF_OR_NAN(x) (!finite(x)) > #endif This may do it, but it comes across as a Band-Aid fix -- we don't know if it will work on all platforms or where it will break. A more robust solution would be to do away with preprocessor tests altogether and let autoconf test directly for the presence of finite() or isfinite() at compile time. I don't know enough about autoconf to provide the required invocation for it. Come to think of it, I can use such invocation in some of my own projects. Perhaps someone else on this list can help in this regard. -- Rouben Rostamian <ros...@um...> |