[Top][All Lists]

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

Re: Old patches from Red Hat

From: Daniel J Sebald
Subject: Re: Old patches from Red Hat
Date: Thu, 28 Apr 2005 16:22:10 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

John W. Eaton wrote:
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>
| +#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

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?

Can some of these definitions and routines be replaced with something from the header file "ieee754.h"? In there are a variety of helper routines and structures for accessing the sign bit.


reply via email to

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