From: | "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org> |
---|---|
To: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart), hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Platforms with v6.3 trouble |
Date: | 1998-02-27 04:46:47 |
Message-ID: | m0y8HhA-0009hQC@bgalli.mug.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On the SCO UNIXWARE (UNIVEL) port, it is only necessary to replace the macro
definition of fastgetattr with a static function in heapam.h in order to get
the code to compile. I guess the people who wrote the compile could not
concieve of anyone nesting the trinary operator (?:) to such a depth :-). The
UNIXWARE compiler does an excellent job of in-lining the function on it's own
without the macro. The patch for the version of heapam.h I am using follows
(I am currently using USE_UNIVEL_CC_ASM as the trigger, but that can be
changed).
Bruce, will this change work? I am not as familiar with this section of code
as I would like to be.
----
*** src/include/access/heapam.h.orig Fri Feb 13 20:18:33 1998
--- src/include/access/heapam.h Sat Feb 14 09:03:40 1998
***************
*** 88,93 ****
--- 88,142 ----
*
* ----------------
*/
+ #if defined(USE_UNIVEL_CC_ASM)
+ extern Datum nocachegetattr(HeapTuple tup, int attnum,
+ TupleDesc att, bool *isnull);
+
+ static Datum fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
+ bool *isnull)
+ {
+ return (
+ (attnum) > 0 ?
+ (
+ ((isnull) ? (*(isnull) = false) : (dummyret)NULL),
+ HeapTupleNoNulls(tup) ?
+ (
+ ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||
+ (attnum) == 1) ?
+ (
+ (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
+ (char *) (tup) + (tup)->t_hoff +
+ (
+ ((attnum) != 1) ?
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff
+ :
+ 0
+ )
+ )
+ )
+ :
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ :
+ (
+ att_isnull((attnum)-1, (tup)->t_bits) ?
+ (
+ ((isnull) ? (*(isnull) = true) : (dummyret)NULL),
+ (Datum)NULL
+ )
+ :
+ (
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
+ )
+ )
+ )
+ :
+ (
+ (Datum)NULL
+ )
+ );
+ }
+ #else
#define fastgetattr(tup, attnum, tupleDesc, isnull) \
( \
AssertMacro((attnum) > 0) ? \
***************
*** 129,136 ****
(Datum)NULL \
) \
)
!
!
/* ----------------
* heap_getattr
--- 178,184 ----
(Datum)NULL \
) \
)
! #endif
/* ----------------
* heap_getattr
--
____ | Billy G. Allie | Domain....: Bill(dot)Allie(at)mug(dot)org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie(at)email(dot)msn(dot)com
|/ |LLIE | (313) 582-1540 |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-02-27 05:14:05 | Re: [HACKERS] Platforms with v6.3 trouble |
Previous Message | Bruce Momjian | 1998-02-27 04:45:24 | Re: [HACKERS] INT2OID, etc. |