diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/access/heap/heapam.c | 56 | ||||
-rw-r--r-- | src/bin/pgtclsh/Makefile | 6 | ||||
-rw-r--r-- | src/include/access/heapam.h | 181 | ||||
-rw-r--r-- | src/interfaces/libpq++/Makefile | 23 | ||||
-rw-r--r-- | src/pl/tcl/Makefile | 4 | ||||
-rw-r--r-- | src/template/solaris_i386_cc | 2 | ||||
-rw-r--r-- | src/template/solaris_sparc_cc | 4 |
7 files changed, 152 insertions, 124 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 7ca83587a4d..150005f8fbe 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.72 2000/06/28 03:31:04 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.73 2000/06/30 16:10:40 petere Exp $ * * * INTERFACE ROUTINES @@ -504,6 +504,60 @@ heapgettup(Relation relation, } +#if defined(DISABLE_COMPLEX_MACRO) +/* + * This is formatted so oddly so that the correspondence to the macro + * definition in access/heapam.h is maintained. + */ +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)->t_data + (tup)->t_data->t_hoff + + ( + ((attnum) != 1) ? + (tupleDesc)->attrs[(attnum) - 1]->attcacheoff + : + 0 + ) + ) + ) + : + nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) + ) + : + ( + att_isnull((attnum) - 1, (tup)->t_data->t_bits) ? + ( + ((isnull) ? (*(isnull) = true) : (dummyret) NULL), + (Datum) NULL + ) + : + ( + nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) + ) + ) + ) + : + ( + (Datum) NULL + ) + ); +} +#endif /* defined(DISABLE_COMPLEX_MACRO)*/ + + + /* ---------------------------------------------------------------- * heap access method interface * ---------------------------------------------------------------- diff --git a/src/bin/pgtclsh/Makefile b/src/bin/pgtclsh/Makefile index 0aeb56a7342..08b52b4d756 100644 --- a/src/bin/pgtclsh/Makefile +++ b/src/bin/pgtclsh/Makefile @@ -5,7 +5,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.28 2000/06/27 00:31:40 petere Exp $ +# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.29 2000/06/30 16:10:47 petere Exp $ # #------------------------------------------------------------------------- @@ -16,9 +16,9 @@ include ../../Makefile.global # # Include definitions from the tclConfig.sh file # -include Makefile.tcldefs +-include Makefile.tcldefs ifeq ($(USE_TK), true) -include Makefile.tkdefs +-include Makefile.tkdefs endif CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR) diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 9880d2aa321..ab30f09b308 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.53 2000/06/18 22:44:23 tgl Exp $ + * $Id: heapam.h,v 1.54 2000/06/30 16:10:49 petere Exp $ * *------------------------------------------------------------------------- */ @@ -100,91 +100,50 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum, #if !defined(DISABLE_COMPLEX_MACRO) -#define fastgetattr(tup, attnum, tupleDesc, isnull) \ -( \ - AssertMacro((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)->t_data + (tup)->t_data->t_hoff + \ - ( \ - ((attnum) != 1) ? \ - (tupleDesc)->attrs[(attnum)-1]->attcacheoff \ - : \ - 0 \ - ) \ - ) \ - ) \ - : \ - nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \ - ) \ - : \ - ( \ - att_isnull((attnum)-1, (tup)->t_data->t_bits) ? \ - ( \ - ((isnull) ? (*(isnull) = true) : (dummyret)NULL), \ - (Datum)NULL \ - ) \ - : \ - ( \ - nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \ - ) \ - ) \ +#define fastgetattr(tup, attnum, tupleDesc, isnull) \ +( \ + AssertMacro((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)->t_data + (tup)->t_data->t_hoff + \ + ( \ + ((attnum) != 1) ? \ + (tupleDesc)->attrs[(attnum)-1]->attcacheoff \ + : \ + 0 \ + ) \ + ) \ + ) \ + : \ + nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \ + ) \ + : \ + ( \ + att_isnull((attnum)-1, (tup)->t_data->t_bits) ? \ + ( \ + ((isnull) ? (*(isnull) = true) : (dummyret)NULL), \ + (Datum)NULL \ + ) \ + : \ + ( \ + nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \ + ) \ + ) \ ) -#else /* !defined(DISABLE_COMPLEX_MACRO) */ +#else /* defined(DISABLE_COMPLEX_MACRO) */ -static Datum +extern 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)->t_data + (tup)->t_data->t_hoff + - ( - ((attnum) != 1) ? - (tupleDesc)->attrs[(attnum) - 1]->attcacheoff - : - 0 - ) - ) - ) - : - nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) - ) - : - ( - att_isnull((attnum) - 1, (tup)->t_data->t_bits) ? - ( - ((isnull) ? (*(isnull) = true) : (dummyret) NULL), - (Datum) NULL - ) - : - ( - nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) - ) - ) - ) - : - ( - (Datum) NULL - ) - ); -} + bool *isnull); + +#endif /* defined(DISABLE_COMPLEX_MACRO) */ -#endif /* ---------------- * heap_getattr @@ -206,36 +165,36 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, * * ---------------- */ -#define heap_getattr(tup, attnum, tupleDesc, isnull) \ -( \ - AssertMacro((tup) != NULL && \ - (attnum) > FirstLowInvalidHeapAttributeNumber && \ - (attnum) != 0), \ - ((attnum) > (int) (tup)->t_data->t_natts) ? \ - ( \ - ((isnull) ? (*(isnull) = true) : (dummyret)NULL), \ - (Datum)NULL \ - ) \ - : \ - ( \ - ((attnum) > 0) ? \ - ( \ - fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \ - ) \ - : \ - ( \ - ((isnull) ? (*(isnull) = false) : (dummyret)NULL), \ - ((attnum) == SelfItemPointerAttributeNumber) ? \ - ( \ - (Datum)((char *)&((tup)->t_self)) \ - ) \ - : \ - ( \ - (Datum)*(unsigned int *) \ - ((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \ - ) \ - ) \ - ) \ +#define heap_getattr(tup, attnum, tupleDesc, isnull) \ +( \ + AssertMacro((tup) != NULL && \ + (attnum) > FirstLowInvalidHeapAttributeNumber && \ + (attnum) != 0), \ + ((attnum) > (int) (tup)->t_data->t_natts) ? \ + ( \ + ((isnull) ? (*(isnull) = true) : (dummyret)NULL), \ + (Datum)NULL \ + ) \ + : \ + ( \ + ((attnum) > 0) ? \ + ( \ + fastgetattr((tup), (attnum), (tupleDesc), (isnull)) \ + ) \ + : \ + ( \ + ((isnull) ? (*(isnull) = false) : (dummyret)NULL), \ + ((attnum) == SelfItemPointerAttributeNumber) ? \ + ( \ + (Datum)((char *)&((tup)->t_self)) \ + ) \ + : \ + ( \ + (Datum)*(unsigned int *) \ + ((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1]) \ + ) \ + ) \ + ) \ ) extern HeapAccessStatistics heap_access_stats; /* in stats.c */ diff --git a/src/interfaces/libpq++/Makefile b/src/interfaces/libpq++/Makefile index 44c008fb7c2..ad31cad6428 100644 --- a/src/interfaces/libpq++/Makefile +++ b/src/interfaces/libpq++/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.22 2000/06/28 18:29:48 petere Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.23 2000/06/30 16:10:54 petere Exp $ # #------------------------------------------------------------------------- @@ -30,9 +30,24 @@ endif # For CC on IRIX, must use CC as linker/archiver of C++ libraries ifeq ($(PORTNAME), irix5) ifeq ($(CXX), CC) - AR = CC - AROPT = -ar -o - LD = CC + AR := CC + AROPT := -ar -o + LD := CC + endif +endif +# Same for Solaris with native compiler +ifeq ($(PORTNAME), solaris_sparc) + ifeq ($(CXX), CC) + AR := CC + AROPT := -xar -o + LD := CC + endif +endif +ifeq ($(PORTNAME), solaris_i386) + ifeq ($(CXX), CC) + AR := CC + AROPT := -xar -o + LD := CC endif endif diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile index 44b7a390acd..b20a74f3d22 100644 --- a/src/pl/tcl/Makefile +++ b/src/pl/tcl/Makefile @@ -2,7 +2,7 @@ # # Makefile for the pltcl shared object # -# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.18 2000/06/27 00:32:06 petere Exp $ +# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.19 2000/06/30 16:10:56 petere Exp $ # #------------------------------------------------------------------------- @@ -10,7 +10,7 @@ subdir = src/pl/tcl top_builddir = ../../.. include ../../Makefile.global -include Makefile.tcldefs +-include Makefile.tcldefs # Find out whether Tcl was built as a shared library --- if not, we # can't link a shared library that depends on it, and have to forget diff --git a/src/template/solaris_i386_cc b/src/template/solaris_i386_cc index 138597a40ee..a6651580688 100644 --- a/src/template/solaris_i386_cc +++ b/src/template/solaris_i386_cc @@ -1,6 +1,6 @@ AROPT:cq CFLAGS: -SHARED_LIB:-K PIC +SHARED_LIB:-KPIC ALL: SRCH_INC: SRCH_LIB: diff --git a/src/template/solaris_sparc_cc b/src/template/solaris_sparc_cc index 79fb981925b..da7d77379bf 100644 --- a/src/template/solaris_sparc_cc +++ b/src/template/solaris_sparc_cc @@ -1,6 +1,6 @@ AROPT:crs -CFLAGS:-Xa -v -D__sparc__ -D__sun__ -DDISABLE_COMPLEX_MACRO -SHARED_LIB:-K PIC +CFLAGS:-Xa -v -D__sparc__ -D__sun__ +SHARED_LIB:-KPIC ALL: SRCH_INC: SRCH_LIB: |