Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit385470f

Browse files
committed
Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>
Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define thereplacement 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.
1 parent3513f4d commit385470f

File tree

9 files changed

+560
-509
lines changed

9 files changed

+560
-509
lines changed

‎configure

Lines changed: 406 additions & 383 deletions
Large diffs are not rendered by default.

‎configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
696696
then
697697
AC_CHECK_LIB(bsd, main)
698698
fi
699-
AC_CHECK_LIB(util,main)
699+
AC_CHECK_LIB(util,setproctitle)
700700
AC_CHECK_LIB(m, main)
701701
AC_CHECK_LIB(dl, main)
702702
AC_CHECK_LIB(socket, main)
@@ -709,9 +709,9 @@ AC_CHECK_LIB(ln, main)
709709
AC_CHECK_LIB(ld, main)
710710
AC_CHECK_LIB(compat, main)
711711
AC_CHECK_LIB(BSD, main)
712-
AC_CHECK_LIB(crypt, main)
713712
AC_CHECK_LIB(gen, main)
714713
AC_CHECK_LIB(PW, main)
714+
AC_SEARCH_LIBS(crypt, crypt)
715715

716716
dnl Checks for header files.
717717
AC_HEADER_STDC

‎src/backend/access/heap/heapam.c

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.72 2000/06/28 03:31:04 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.73 2000/06/30 16:10:40 petere Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -504,6 +504,60 @@ heapgettup(Relation relation,
504504
}
505505

506506

507+
#if defined(DISABLE_COMPLEX_MACRO)
508+
/*
509+
* This is formatted so oddly so that the correspondence to the macro
510+
* definition in access/heapam.h is maintained.
511+
*/
512+
Datum
513+
fastgetattr(HeapTupletup,intattnum,TupleDesctupleDesc,
514+
bool*isnull)
515+
{
516+
return (
517+
(attnum)>0 ?
518+
(
519+
((isnull) ? (*(isnull)= false) : (dummyret)NULL),
520+
HeapTupleNoNulls(tup) ?
521+
(
522+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff!=-1||
523+
(attnum)==1) ?
524+
(
525+
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
526+
(char*) (tup)->t_data+ (tup)->t_data->t_hoff+
527+
(
528+
((attnum)!=1) ?
529+
(tupleDesc)->attrs[(attnum)-1]->attcacheoff
530+
:
531+
0
532+
)
533+
)
534+
)
535+
:
536+
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
537+
)
538+
:
539+
(
540+
att_isnull((attnum)-1, (tup)->t_data->t_bits) ?
541+
(
542+
((isnull) ? (*(isnull)= true) : (dummyret)NULL),
543+
(Datum)NULL
544+
)
545+
:
546+
(
547+
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
548+
)
549+
)
550+
)
551+
:
552+
(
553+
(Datum)NULL
554+
)
555+
);
556+
}
557+
#endif/* defined(DISABLE_COMPLEX_MACRO)*/
558+
559+
560+
507561
/* ----------------------------------------------------------------
508562
* heap access method interface
509563
* ----------------------------------------------------------------

‎src/bin/pgtclsh/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.28 2000/06/27 00:31:40 petere Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/pgtclsh/Attic/Makefile,v 1.29 2000/06/30 16:10:47 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -16,9 +16,9 @@ include ../../Makefile.global
1616
#
1717
# Include definitions from the tclConfig.sh file
1818
#
19-
include Makefile.tcldefs
19+
-include Makefile.tcldefs
2020
ifeq ($(USE_TK), true)
21-
include Makefile.tkdefs
21+
-include Makefile.tkdefs
2222
endif
2323

2424
CFLAGS+=$(X_CFLAGS) -I$(LIBPGTCLDIR)

‎src/include/access/heapam.h

Lines changed: 70 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: heapam.h,v 1.53 2000/06/18 22:44:23 tgl Exp $
10+
* $Id: heapam.h,v 1.54 2000/06/30 16:10:49 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -100,91 +100,50 @@ extern Datum nocachegetattr(HeapTuple tup, int attnum,
100100

101101
#if !defined(DISABLE_COMPLEX_MACRO)
102102

103-
#definefastgetattr(tup,attnum,tupleDesc,isnull)\
104-
(\
105-
AssertMacro((attnum) > 0),\
106-
((isnull) ? (*(isnull) = false) : (dummyret)NULL),\
107-
HeapTupleNoNulls(tup) ?\
108-
(\
109-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||\
110-
(attnum) == 1) ?\
111-
(\
112-
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),\
113-
(char *) (tup)->t_data + (tup)->t_data->t_hoff +\
114-
(\
115-
((attnum) != 1) ?\
116-
(tupleDesc)->attrs[(attnum)-1]->attcacheoff\
117-
:\
118-
0\
119-
)\
120-
)\
121-
)\
122-
:\
123-
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))\
124-
)\
125-
:\
126-
(\
127-
att_isnull((attnum)-1, (tup)->t_data->t_bits) ?\
128-
(\
129-
((isnull) ? (*(isnull) = true) : (dummyret)NULL),\
130-
(Datum)NULL\
131-
)\
132-
:\
133-
(\
134-
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))\
135-
)\
136-
)\
103+
#definefastgetattr(tup,attnum,tupleDesc,isnull)\
104+
(\
105+
AssertMacro((attnum) > 0),\
106+
((isnull) ? (*(isnull) = false) : (dummyret)NULL),\
107+
HeapTupleNoNulls(tup) ?\
108+
(\
109+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 ||\
110+
(attnum) == 1) ?\
111+
(\
112+
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),\
113+
(char *) (tup)->t_data + (tup)->t_data->t_hoff +\
114+
(\
115+
((attnum) != 1) ?\
116+
(tupleDesc)->attrs[(attnum)-1]->attcacheoff\
117+
:\
118+
0\
119+
)\
120+
)\
121+
)\
122+
:\
123+
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))\
124+
)\
125+
:\
126+
(\
127+
att_isnull((attnum)-1, (tup)->t_data->t_bits) ?\
128+
(\
129+
((isnull) ? (*(isnull) = true) : (dummyret)NULL),\
130+
(Datum)NULL\
131+
)\
132+
:\
133+
(\
134+
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))\
135+
)\
136+
)\
137137
)
138138

139-
#else/*!defined(DISABLE_COMPLEX_MACRO) */
139+
#else/* defined(DISABLE_COMPLEX_MACRO) */
140140

141-
staticDatum
141+
externDatum
142142
fastgetattr(HeapTupletup,intattnum,TupleDesctupleDesc,
143-
bool*isnull)
144-
{
145-
return (
146-
(attnum)>0 ?
147-
(
148-
((isnull) ? (*(isnull)= false) : (dummyret)NULL),
149-
HeapTupleNoNulls(tup) ?
150-
(
151-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff!=-1||
152-
(attnum)==1) ?
153-
(
154-
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]),
155-
(char*) (tup)->t_data+ (tup)->t_data->t_hoff+
156-
(
157-
((attnum)!=1) ?
158-
(tupleDesc)->attrs[(attnum)-1]->attcacheoff
159-
:
160-
0
161-
)
162-
)
163-
)
164-
:
165-
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
166-
)
167-
:
168-
(
169-
att_isnull((attnum)-1, (tup)->t_data->t_bits) ?
170-
(
171-
((isnull) ? (*(isnull)= true) : (dummyret)NULL),
172-
(Datum)NULL
173-
)
174-
:
175-
(
176-
nocachegetattr((tup), (attnum), (tupleDesc), (isnull))
177-
)
178-
)
179-
)
180-
:
181-
(
182-
(Datum)NULL
183-
)
184-
);
185-
}
143+
bool*isnull);
144+
145+
#endif/* defined(DISABLE_COMPLEX_MACRO) */
186146

187-
#endif
188147

189148
/* ----------------
190149
*heap_getattr
@@ -206,36 +165,36 @@ fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc,
206165
*
207166
* ----------------
208167
*/
209-
#defineheap_getattr(tup,attnum,tupleDesc,isnull)\
210-
(\
211-
AssertMacro((tup) != NULL &&\
212-
(attnum) > FirstLowInvalidHeapAttributeNumber &&\
213-
(attnum) != 0),\
214-
((attnum) > (int) (tup)->t_data->t_natts) ?\
215-
(\
216-
((isnull) ? (*(isnull) = true) : (dummyret)NULL),\
217-
(Datum)NULL\
218-
)\
219-
:\
220-
(\
221-
((attnum) > 0) ?\
222-
(\
223-
fastgetattr((tup), (attnum), (tupleDesc), (isnull))\
224-
)\
225-
:\
226-
(\
227-
((isnull) ? (*(isnull) = false) : (dummyret)NULL),\
228-
((attnum) == SelfItemPointerAttributeNumber) ?\
229-
(\
230-
(Datum)((char *)&((tup)->t_self))\
231-
)\
232-
:\
233-
(\
234-
(Datum)*(unsigned int *)\
235-
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1])\
236-
)\
237-
)\
238-
)\
168+
#defineheap_getattr(tup,attnum,tupleDesc,isnull)\
169+
(\
170+
AssertMacro((tup) != NULL &&\
171+
(attnum) > FirstLowInvalidHeapAttributeNumber &&\
172+
(attnum) != 0),\
173+
((attnum) > (int) (tup)->t_data->t_natts) ?\
174+
(\
175+
((isnull) ? (*(isnull) = true) : (dummyret)NULL),\
176+
(Datum)NULL\
177+
)\
178+
:\
179+
(\
180+
((attnum) > 0) ?\
181+
(\
182+
fastgetattr((tup), (attnum), (tupleDesc), (isnull))\
183+
)\
184+
:\
185+
(\
186+
((isnull) ? (*(isnull) = false) : (dummyret)NULL),\
187+
((attnum) == SelfItemPointerAttributeNumber) ?\
188+
(\
189+
(Datum)((char *)&((tup)->t_self))\
190+
)\
191+
:\
192+
(\
193+
(Datum)*(unsigned int *)\
194+
((char *)(tup)->t_data + heap_sysoffset[-(attnum)-1])\
195+
)\
196+
)\
197+
)\
239198
)
240199

241200
externHeapAccessStatisticsheap_access_stats;/* in stats.c */

‎src/interfaces/libpq++/Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.22 2000/06/28 18:29:48 petere Exp $
7+
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.23 2000/06/30 16:10:54 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -30,9 +30,24 @@ endif
3030
# For CC on IRIX, must use CC as linker/archiver of C++ libraries
3131
ifeq ($(PORTNAME), irix5)
3232
ifeq ($(CXX), CC)
33-
AR = CC
34-
AROPT = -ar -o
35-
LD = CC
33+
AR:= CC
34+
AROPT:= -ar -o
35+
LD:= CC
36+
endif
37+
endif
38+
# Same for Solaris with native compiler
39+
ifeq ($(PORTNAME), solaris_sparc)
40+
ifeq ($(CXX), CC)
41+
AR:= CC
42+
AROPT:= -xar -o
43+
LD:= CC
44+
endif
45+
endif
46+
ifeq ($(PORTNAME), solaris_i386)
47+
ifeq ($(CXX), CC)
48+
AR:= CC
49+
AROPT:= -xar -o
50+
LD:= CC
3651
endif
3752
endif
3853

‎src/pl/tcl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
#
33
# Makefile for the pltcl shared object
44
#
5-
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.18 2000/06/27 00:32:06 petere Exp $
5+
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.19 2000/06/30 16:10:56 petere Exp $
66
#
77
#-------------------------------------------------------------------------
88

99
subdir = src/pl/tcl
1010
top_builddir = ../../..
1111
include ../../Makefile.global
1212

13-
include Makefile.tcldefs
13+
-include Makefile.tcldefs
1414

1515
# Find out whether Tcl was built as a shared library --- if not, we
1616
# can't link a shared library that depends on it, and have to forget

‎src/template/solaris_i386_cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AROPT:cq
22
CFLAGS:
3-
SHARED_LIB:-K PIC
3+
SHARED_LIB:-KPIC
44
ALL:
55
SRCH_INC:
66
SRCH_LIB:

‎src/template/solaris_sparc_cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AROPT:crs
2-
CFLAGS:-Xa -v -D__sparc__ -D__sun__ -DDISABLE_COMPLEX_MACRO
3-
SHARED_LIB:-K PIC
2+
CFLAGS:-Xa -v -D__sparc__ -D__sun__
3+
SHARED_LIB:-KPIC
44
ALL:
55
SRCH_INC:
66
SRCH_LIB:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp