Commit 385470f8 authored by Peter Eisentraut's avatar Peter Eisentraut

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.
parent 3513f4d1
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -696,7 +696,7 @@ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha" ...@@ -696,7 +696,7 @@ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
then then
AC_CHECK_LIB(bsd, main) AC_CHECK_LIB(bsd, main)
fi fi
AC_CHECK_LIB(util, main) AC_CHECK_LIB(util, setproctitle)
AC_CHECK_LIB(m, main) AC_CHECK_LIB(m, main)
AC_CHECK_LIB(dl, main) AC_CHECK_LIB(dl, main)
AC_CHECK_LIB(socket, main) AC_CHECK_LIB(socket, main)
...@@ -709,9 +709,9 @@ AC_CHECK_LIB(ln, main) ...@@ -709,9 +709,9 @@ AC_CHECK_LIB(ln, main)
AC_CHECK_LIB(ld, main) AC_CHECK_LIB(ld, main)
AC_CHECK_LIB(compat, main) AC_CHECK_LIB(compat, main)
AC_CHECK_LIB(BSD, main) AC_CHECK_LIB(BSD, main)
AC_CHECK_LIB(crypt, main)
AC_CHECK_LIB(gen, main) AC_CHECK_LIB(gen, main)
AC_CHECK_LIB(PW, main) AC_CHECK_LIB(PW, main)
AC_SEARCH_LIBS(crypt, crypt)
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_STDC AC_HEADER_STDC
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * 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 * INTERFACE ROUTINES
...@@ -504,6 +504,60 @@ heapgettup(Relation relation, ...@@ -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 * heap access method interface
* ---------------------------------------------------------------- * ----------------------------------------------------------------
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # 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 ...@@ -16,9 +16,9 @@ include ../../Makefile.global
# #
# Include definitions from the tclConfig.sh file # Include definitions from the tclConfig.sh file
# #
include Makefile.tcldefs -include Makefile.tcldefs
ifeq ($(USE_TK), true) ifeq ($(USE_TK), true)
include Makefile.tkdefs -include Makefile.tkdefs
endif endif
CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR) CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * 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 $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -136,55 +136,14 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum, ...@@ -136,55 +136,14 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum,
) \ ) \
) )
#else /* !defined(DISABLE_COMPLEX_MACRO) */ #else /* defined(DISABLE_COMPLEX_MACRO) */
static Datum extern Datum
fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
bool *isnull) bool *isnull);
{
return ( #endif /* defined(DISABLE_COMPLEX_MACRO) */
(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
/* ---------------- /* ----------------
* heap_getattr * heap_getattr
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# Copyright (c) 1994, Regents of the University of California # 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 ...@@ -30,9 +30,24 @@ endif
# For CC on IRIX, must use CC as linker/archiver of C++ libraries # For CC on IRIX, must use CC as linker/archiver of C++ libraries
ifeq ($(PORTNAME), irix5) ifeq ($(PORTNAME), irix5)
ifeq ($(CXX), CC) ifeq ($(CXX), CC)
AR = CC AR := CC
AROPT = -ar -o AROPT := -ar -o
LD = CC 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
endif endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Makefile for the pltcl shared object # 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 ...@@ -10,7 +10,7 @@ subdir = src/pl/tcl
top_builddir = ../../.. top_builddir = ../../..
include ../../Makefile.global include ../../Makefile.global
include Makefile.tcldefs -include Makefile.tcldefs
# Find out whether Tcl was built as a shared library --- if not, we # 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 # can't link a shared library that depends on it, and have to forget
......
AROPT:cq AROPT:cq
CFLAGS: CFLAGS:
SHARED_LIB:-K PIC SHARED_LIB:-KPIC
ALL: ALL:
SRCH_INC: SRCH_INC:
SRCH_LIB: SRCH_LIB:
......
AROPT:crs AROPT:crs
CFLAGS:-Xa -v -D__sparc__ -D__sun__ -DDISABLE_COMPLEX_MACRO CFLAGS:-Xa -v -D__sparc__ -D__sun__
SHARED_LIB:-K PIC SHARED_LIB:-KPIC
ALL: ALL:
SRCH_INC: SRCH_INC:
SRCH_LIB: SRCH_LIB:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment