diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-03-12 21:13:19 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-03-12 21:13:19 +0000 |
commit | 5dde558ce60db1f8747bbf745d56bd9cd5f4c7b7 (patch) | |
tree | 046cc029a35d6e30af46ea08f8eae259eb739a8d /src/backend/utils/adt/float.c | |
parent | b66569e41fdecab3903fd8af6cbc8bb12ae653cd (diff) | |
download | postgresql-5dde558ce60db1f8747bbf745d56bd9cd5f4c7b7.tar.gz postgresql-5dde558ce60db1f8747bbf745d56bd9cd5f4c7b7.zip |
From: Dan McGuirk <mcguirk@indirect.com>
Subject: [HACKERS] linux/alpha patches
These patches lay the groundwork for a Linux/Alpha port. The port doesn't
actually work unless you tweak the linker to put all the pointers in the
first 32 bits of the address space, but it's at least a start. It
implements the test-and-set instruction in Alpha assembly, and also fixes
a lot of pointer-to-integer conversions, which is probably good anyway.
Diffstat (limited to 'src/backend/utils/adt/float.c')
-rw-r--r-- | src/backend/utils/adt/float.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 52fc5f98e3a..509ce6ce6d4 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.12 1997/02/19 20:10:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.13 1997/03/12 21:09:11 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -100,6 +100,26 @@ extern double atof(const char *p); #define FLOAT8_MAX DBL_MAX #define FLOAT8_MIN DBL_MIN +/* + * if FLOAT8_MIN and FLOAT8_MAX are the limits of the range a + * double can store, then how are we ever going to wind up + * with something stored in a double that is outside those + * limits? (and similarly for FLOAT4_{MIN,MAX}/float.) + * doesn't make sense to me, and it causes a + * floating point exception on linuxalpha, so UNSAFE_FLOATS + * it is. + * (maybe someone wanted to allow for values other than DBL_MIN/ + * DBL_MAX for FLOAT8_MIN/FLOAT8_MAX?) + * --djm 12/12/96 + * according to Richard Henderson this is a known bug in gcc on + * the Alpha. might as well leave the workaround in + * until the distributions are updated. + * --djm 12/16/96 + */ +#if defined(linuxalpha) && !defined(UNSAFE_FLOATS) +#define UNSAFE_FLOATS +#endif + /* check to see if a float4 val is outside of the FLOAT4_MIN, FLOAT4_MAX bounds. |