From bug-request at octave dot org Thu Dec 16 16:51:57 2004 Subject: Re: signbit on linux/gcc 3.2+ From: Orion Poplawski To: "John W. Eaton" CC: bug at octave dot org Date: Thu, 16 Dec 2004 16:43:01 -0600 John W. Eaton wrote: > On 16-Dec-2004, Orion Poplawski wrote: > > | Octave uses the autoconf mechanism AC_CHECK_FUNCS() to look for signbit. > | This doesn't work for linux with gcc 3.2+ because signbit is a macro > | in , and is only exposed if _GNU_SOURCE, _ISOC99_SOURCE, > | _ISOC9X_SOURCE, or __STDC_VERSION__ >= 199901L. To make things more > | complicated, in c++ if is included, the macro is turned off and > | it is replaced with the std::signbit() function. > > I didn't know there was a std::signbit function. If there was, then I > don't think we would need all the checks for signbit appearing in > various locations. > Well, it's a GNUism: #if _GLIBCPP_USE_C99 #if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC // These are possible macros imported from C99-land. For strict // conformance, remove possible C99-injected names from the global // namespace, and sequester them in the __gnu_cxx extension namespace. (which is then imported into std::) And with GNU you are pretty much stuck with std::signbit because it undefines the signbit macro. -- Orion Poplawski System Administrator 303-415-9701 x222 Colorado Research Associates/NWRA FAX: 303-415-9702 3380 Mitchell Lane, Boulder CO 80301 http://www.co-ra.com ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------