From bug-request at octave dot org Fri Dec 17 16:07:48 2004 Subject: Re: signbit on linux/gcc 3.2+ From: Orion Poplawski To: "John W. Eaton" CC: bug at octave dot org Date: Fri, 17 Dec 2004 15:30:32 -0600 John W. Eaton wrote: > > I thought the following change would be good > > liboctave/ChangeLog: > > 2004-12-17 John W. Eaton > > * lo-cieee.c (lo_ieee_signbit): New function. > * lo-ieee.h: Provide decl. > Don't define lo_ieee_signbit as a macro here. > From Orion Poplawski . > Seems good. Compiled and worked fine for me and allowed me to build octave-forge without issue. > > and it will work, but on my system (Debian, GCC 3.3.4) it will use the > > return (x < 0 || copysign (1.0, x) < 0); > > version, because signbit is only defined in math.h when the compiler > is in C99 mode. Do we want to try to enable that (I'd guess not yet) > or should we just check for __signbit in the configure script? Enabling C99 mode sounds good to me. I define _GNU_SOURCE in my builds which has the same effect on the headers. _ISOC99_SOURCE might be more portable. Don't know if you want to mess with using c99 or "gcc -std=c99" or the like because of problems finding compilers on different platforms. -- 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 -------------------------------------------------------------