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

Commit4d76a80

Browse files
committed
Unify solaris_i386 and solaris_sparc templates. They were almost identical
anyway, the rest being due to them not being kept in sync. Add configuretest for lorder and use it (on Solaris) when found.
1 parentcbe5f73 commit4d76a80

18 files changed

+506
-552
lines changed

‎configure

Lines changed: 394 additions & 364 deletions
Large diffs are not rendered by default.

‎configure.in

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ nextstep*) template=nextstep ;;
7070
osf*) template=osf ;;
7171
qnx*) template=qnx4 ;;
7272
sco*) template=sco ;;
73-
solaris*)
74-
case $host_cpu in
75-
sparc) template=solaris_sparc ;;
76-
i?86) template=solaris_i386 ;;
77-
esac ;;
73+
solaris*) template=solaris ;;
7874
sunos*) template=sunos4 ;;
7975
sysv4.2*)
8076
case $host_vendor in
@@ -83,7 +79,6 @@ nextstep*) template=nextstep ;;
8379
sysv4*) template=svr4 ;;
8480
sysv5uw*) template=unixware ;;
8581
ultrix*) template=ultrix4 ;;
86-
beos*) template=beos ;;
8782
esac
8883

8984
if test x"$template" = x"" ; then
@@ -112,15 +107,15 @@ AC_LINK_FILES([src/backend/port/dynloader/${template}.h], [src/include/dynloader
112107
AC_LINK_FILES([src/include/port/${template}.h], [src/include/os.h])
113108
AC_LINK_FILES([src/makefiles/Makefile.${template}], [src/Makefile.port])
114109

115-
# Pick right test-and-set (TAS) code. Most platforms have inline
116-
# assembler code intheir portinclude file, so we just use a dummy
117-
# file here.
110+
# Pick right test-and-set (TAS) code.Most platforms have inline
111+
# assembler code insrc/include/storage/s_lock.h, so we just use
112+
#a dummyfile here.
118113
tas_file=dummy.s
119114
need_tas=no
120-
case $template in
121-
hpux) need_tas=yes; tas_file=hpux.s ;;
122-
solaris_sparc) need_tas=yes; tas_file=solaris_sparc.s ;;
123-
solaris_i386) need_tas=yes; tas_file=solaris_i386.s ;;
115+
case $host in
116+
*-*-hpux*) need_tas=yes; tas_file=hpux.s ;;
117+
sparc-*-solaris*) need_tas=yes; tas_file=solaris_sparc.s ;;
118+
i?86-*-solaris) need_tas=yes; tas_file=solaris_i386.s ;;
124119
esac
125120

126121
if test "$need_tas" = yes ; then
@@ -593,8 +588,9 @@ AC_PROG_AWK
593588
PGAC_PATH_FLEX
594589
AC_PROG_LN_S
595590
AC_PROG_RANLIB
591+
AC_CHECK_PROGS(LORDER, lorder)
596592
AC_PATH_PROG(TAR, tar)
597-
AC_CHECK_PROGS(PERL, perl,)
593+
AC_CHECK_PROGS(PERL, perl)
598594
AC_PROG_YACC
599595
AC_SUBST(YFLAGS)
600596
if test "$with_tk" = yes; then

‎src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.99 2000/10/1013:04:46 momjian Exp $
2+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.100 2000/10/1021:22:21 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -157,6 +157,7 @@ LDREL = -r
157157
LDOUT = -o
158158
DLSUFFIX = @DLSUFFIX@
159159
RANLIB = @RANLIB@
160+
LORDER = @LORDER@
160161
X = @EXEEXT@
161162

162163
# Miscellaneous

‎src/Makefile.shlib

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.24 2000/10/07 14:39:06 momjian Exp $
9+
# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.25 2000/10/10 21:22:21 petere Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -70,7 +70,7 @@ ifeq ($(PORTNAME), aix)
7070
SHLIB_LINK+= -lc
7171
endif
7272

73-
ifeq ($(PORTNAME),bsd)
73+
ifeq ($(PORTNAME),openbsd)
7474
ifdef BSD_SHLIB
7575
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
7676
ifdef ELF_SYSTEM
@@ -149,21 +149,14 @@ ifeq ($(PORTNAME), linux)
149149
CFLAGS+= $(CFLAGS_SL)
150150
endif
151151

152-
ifeq ($(PORTNAME),solaris_i386)
152+
ifeq ($(PORTNAME),solaris)
153153
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
154154
LDFLAGS_SL:= -G
155155
SHLIB_LINK+= -ldl -lsocket -lresolv -lnsl -lm -lc
156156
CFLAGS+= $(CFLAGS_SL)
157157
endif
158158

159-
ifeq ($(PORTNAME), solaris_sparc)
160-
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
161-
LDFLAGS_SL:= -G
162-
SHLIB_LINK+= -ldl -lsocket -lresolv -lnsl -lm -lc
163-
CFLAGS+= $(CFLAGS_SL)
164-
endif
165-
166-
ifeq ($(PORTNAME), alpha)
159+
ifeq ($(PORTNAME), osf)
167160
shlib:= lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
168161
LDFLAGS_SL+= -shared -expect_unresolved '*'
169162
endif
@@ -219,11 +212,15 @@ all-lib: lib$(NAME).a $(shlib)
219212

220213
ifneq ($(PORTNAME), win)
221214

215+
ifndef LORDER
216+
MK_NO_LORDER := true
217+
endif
218+
222219
lib$(NAME).a: $(OBJS)
223220
ifdef MK_NO_LORDER
224-
$(AR) $(AROPT) $@ $(OBJS)
221+
$(AR) $(AROPT) $@ $^
225222
else
226-
$(AR) $(AROPT) $@ `lorder $(OBJS) | tsort`
223+
$(AR) $(AROPT) $@ `$(LORDER) $^ | tsort`
227224
endif
228225
$(RANLIB) $@
229226

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/* Dummy file used for nothing at this point
22
*
3-
* seesolaris_i386.h
3+
* seesolaris.h
44
*/

‎src/backend/port/dynloader/solaris.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/solaris.h,v 1.1 2000/10/10 21:22:23 petere Exp $ */
2+
3+
#ifndefDYNLOADER_SOLARIS_H
4+
#defineDYNLOADER_SOLARIS_H
5+
6+
#include"config.h"
7+
#include<dlfcn.h>
8+
#include"fmgr.h"
9+
#include"utils/dynamic_loader.h"
10+
11+
#definepg_dlopen(f)dlopen(f,1)
12+
#definepg_dlsymdlsym
13+
#definepg_dlclosedlclose
14+
#definepg_dlerrordlerror
15+
16+
#endif/* DYNLOADER_SOLARIS_H */

‎src/backend/port/dynloader/solaris_i386.h

Lines changed: 0 additions & 35 deletions
This file was deleted.

‎src/backend/port/dynloader/solaris_sparc.c

Lines changed: 0 additions & 4 deletions
This file was deleted.

‎src/backend/port/dynloader/solaris_sparc.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

‎src/backend/tioga/tgRecipe.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.16 2000/01/26 05:57:10 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.17 2000/10/10 21:22:24 petere Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -92,12 +92,12 @@ first character\n", ARRAY_LEFT_DELIM);
9292
returnresult;
9393
}
9494

95-
if ((beginQuote=index(str,ARRAY_ELEM_LEFT))==NULL)
95+
if ((beginQuote=strchr(str,ARRAY_ELEM_LEFT))==NULL)
9696
{
9797
elog(NOTICE,"textArray2ArrTgString: missing a begin quote\n");
9898
returnresult;
9999
}
100-
if ((endQuote=index(beginQuote+1,'"'))==NULL)
100+
if ((endQuote=strchr(beginQuote+1,'"'))==NULL)
101101
{
102102
elog(NOTICE,"textArray2ArrTgString: missing an end quote\n");
103103
returnresult;

‎src/include/port/solaris.h

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/* $Header: /cvsroot/pgsql/src/include/port/solaris.h,v 1.1 2000/10/10 21:22:26 petere Exp $ */
2+
3+
#defineUSE_POSIX_TIME
4+
#defineNO_EMPTY_STMTS
5+
#defineSYSV_DIRENT
6+
#defineHAS_TEST_AND_SET
7+
typedefunsignedcharslock_t;
8+
9+
/*
10+
* Sort this out for all operting systems some time. The __xxx
11+
* symbols are defined on both GCC and Solaris CC, although GCC
12+
* doesn't document them. The __xxx__ symbols are only on GCC.
13+
*/
14+
#if defined(__i386)&& !defined(__i386__)
15+
# define__i386__
16+
#endif
17+
18+
#if defined(__sparc)&& !defined(__sparc__)
19+
# define__sparc__
20+
#endif
21+
22+
#if defined(__i386__)
23+
# include<sys/isa_defs.h>
24+
#endif
25+
26+
#ifndefBIG_ENDIAN
27+
#defineBIG_ENDIAN4321
28+
#endif
29+
#ifndefLITTLE_ENDIAN
30+
#defineLITTLE_ENDIAN1234
31+
#endif
32+
#ifndefPDP_ENDIAN
33+
#definePDP_ENDIAN3412
34+
#endif
35+
36+
#ifndefBYTE_ORDER
37+
# ifdef__sparc__
38+
# defineBYTE_ORDERBIG_ENDIAN
39+
# endif
40+
# ifdef__i386__
41+
# defineBYTE_ORDERLITTLE_ENDIAN
42+
# endif
43+
#endif
44+
45+
46+
#ifndefNAN
47+
48+
# if defined(__GNUC__)&& defined(__i386__)
49+
50+
# ifndef__nan_bytes
51+
# define__nan_bytes{ 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
52+
# endif
53+
54+
# defineNAN \
55+
(__extension__ ((union { unsigned char __c[8]; double __d; }) \
56+
{ __nan_bytes }).__d)
57+
58+
# else/* not GNUC and i386 */
59+
60+
# defineNAN (0.0/0.0)
61+
62+
# endif/* GCC. */
63+
64+
#endif/* not NAN */

‎src/include/port/solaris_i386.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

‎src/include/port/solaris_sparc.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎src/makefiles/Makefile.solaris

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.1 2000/10/10 21:22:28 petere Exp $
2+
3+
%.so: %.o
4+
$(LD) -G -Bdynamic -o $@ $<

‎src/makefiles/Makefile.solaris_i386

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎src/makefiles/Makefile.solaris_sparc

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp