EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: isfinite() on Linux
From: Andrew Johnson <[email protected]>
To: Ralph Lange <[email protected]>, EPICS Core-Talk <[email protected]>
Date: Tue, 22 Jul 2014 09:35:50 -0500
Hi Ralph,

On 07/22/2014 04:45 AM, Ralph Lange wrote:
> Working on a patch for Base I am having trouble trying to use isfinite()
> on Linux (gcc 4.9.0) - isinf() and isnan() work fine, but isfinite()
> gets me an "implicit declaration" warning and a missing symbol when
> linking.
> 
> Any ideas? All these macros should be POSIX and defined in math.h, right?

Looking at all the libCom/osi/os/*/epicsMath.h files, we ensure the
macro finite() should be defined on all architectures. On Darwin and iOS
that expands out to isfinite() but on other posix architectures
isfinite() is only used if the math.h defines it as a macro.

The glibc manpage says it only defines isfinite() when
    _XOPEN_SOURCE >= 600 || _ISOC99_SOURCE; or cc -std=c99
which I think is not true for EPICS builds. We do define _BSD_SOURCE
however, which is sufficient to ensure that finite() gets declared.

I note that the manpage for finite() says "these functions are obsolete"
but we do use it quite a lot in Base.

- Andrew
-- 
Advertising may be described as the science of arresting the human
intelligence long enough to get money from it. -- Stephen Leacock

Replies:
Re: isfinite() on Linux Ralph Lange
References:
isfinite() on Linux Ralph Lange

Navigate by Date:
Prev: Re: isfinite() on Linux Michael Davidsaver
Next: Re: isfinite() on Linux Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: isfinite() on Linux Michael Davidsaver
Next: Re: isfinite() on Linux Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 22 Jul 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·