Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>
Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the replacement function in the header file. Use -KPIC, not -K PIC. Use CC to link C++ libraries, not ld/ar. Eliminate file not found warnings in tcl build code.
This commit is contained in:
parent
3513f4d162
commit
385470f8c6
@ -696,7 +696,7 @@ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
|
||||
then
|
||||
AC_CHECK_LIB(bsd, main)
|
||||
fi
|
||||
AC_CHECK_LIB(util, main)
|
||||
AC_CHECK_LIB(util, setproctitle)
|
||||
AC_CHECK_LIB(m, main)
|
||||
AC_CHECK_LIB(dl, main)
|
||||
AC_CHECK_LIB(socket, main)
|
||||
@ -709,9 +709,9 @@ AC_CHECK_LIB(ln, main)
|
||||
AC_CHECK_LIB(ld, main)
|
||||
AC_CHECK_LIB(compat, main)
|
||||
AC_CHECK_LIB(BSD, main)
|
||||
AC_CHECK_LIB(crypt, main)
|
||||
AC_CHECK_LIB(gen, main)
|
||||
AC_CHECK_LIB(PW, main)
|
||||
AC_SEARCH_LIBS(crypt, crypt)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
@ -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
|
||||
* ----------------------------------------------------------------
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
AROPT:cq
|
||||
CFLAGS:
|
||||
SHARED_LIB:-K PIC
|
||||
SHARED_LIB:-KPIC
|
||||
ALL:
|
||||
SRCH_INC:
|
||||
SRCH_LIB:
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user