mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
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.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.4 1997/01/10 20:19:45 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.5 1997/03/12 21:09:15 scrappy Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -37,14 +37,14 @@ Oid *oid8in(char *oidString)
|
||||
return(NULL);
|
||||
result = (Oid (*)[]) palloc(sizeof(Oid [8]));
|
||||
if ((nums = sscanf(oidString, "%d%d%d%d%d%d%d%d",
|
||||
*result,
|
||||
*result + 1,
|
||||
*result + 2,
|
||||
*result + 3,
|
||||
*result + 4,
|
||||
*result + 5,
|
||||
*result + 6,
|
||||
*result + 7)) != 8) {
|
||||
&(*result)[0],
|
||||
&(*result)[1],
|
||||
&(*result)[2],
|
||||
&(*result)[3],
|
||||
&(*result)[4],
|
||||
&(*result)[5],
|
||||
&(*result)[6],
|
||||
&(*result)[7])) != 8) {
|
||||
do
|
||||
(*result)[nums++] = 0;
|
||||
while (nums < 8);
|
||||
|
||||
Reference in New Issue
Block a user