octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Old patches from Red Hat


From: John W. Eaton
Subject: Old patches from Red Hat
Date: Thu, 28 Apr 2005 16:21:26 -0400

On 28-Apr-2005, Quentin Spencer wrote:

| Since octave is being removed from Fedora for the upcoming release, I'm 
| working on importing it into Fedora Extras. They are currently packaging 
| 2.1.57 with some old patches, and I thought I should at least look at 
| the patches before I update it to a more recent version and dump the 
| patches. One originated at 2.1.57 and is related to some signbit 
| problems that I remember being reported on the list.

The signbit patch below tries to get signbit as a macro instead of
falling back on calling copysign.  I don't like messes like this:

| -#define lo_ieee_signbit(x) 0
| +#ifndef _GNU_SOURCE
| +#define _GNU_SOURCE 1
| +#define _UNSET_GNU_SOURCE 1
| +#endif
| +#include <math.h>
| +#ifdef _UNSET_GNU_SOURCE
| +#undef _UNSET_GNU_SOURCE
| +#undef _GNU_SOURCE
| +#endif
| +#ifndef signbit
| +#error "No signbit definition?!"
| +#else
| +#define lo_ieee_signbit(x) signbit(x)
| +#endif
|  #endif

very much (I have a feeling this will quit working at some point, and
then we will have to screw around with finding some other kluge).  But
whatever.

If you look at the current sources, you'll see that they don't try to
define lo_ieee_signbit as a macro.  Instead, it is always a function
call, defined in lo-cieee.c.  So we always have the overhead of a
function call anyway.  Does it really matter?  Should we move the mess
of #defines and #undefs to lo-cieee.c?

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]