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

Commit36c1c94

Browse files
committed
From: "Billy G. Allie" <Bill.Allie@mug.org>
The attached patches will allow postgreSQL to compile successfully on SCOUNIXWARE 2.1.x. The patches fix the following problems:1. Configure did not properly recognize the UNIXWARE system as needing the univel port. It used the sys4 port.2. Configure did not properly process the CC flag in the template file.3. There was no working test and set locking implementation for the native UNIXWARE compiler.4. The test and set locking used for Intel X86 that was selected by defining NEED_I386_TAS_ASM could fail in a multi-processor environment.5. The makefiles for libpq and libpgtcl did not make a shared library for the univel port.
1 parent98c7cb1 commit36c1c94

File tree

9 files changed

+70
-46
lines changed

9 files changed

+70
-46
lines changed

‎src/backend/port/univel/port-protos.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*-------------------------------------------------------------------------
22
*
33
* port-protos.h--
4-
* port-specific prototypes for Intel x86/Intel SVR4
4+
* port-specific prototypes for Intel x86/UNIXWARE
55
*
66
*
77
* Copyright (c) 1994, Regents of the University of California

‎src/configure

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,13 @@ nextstep*) os=nextstep;;
589589
hpux*) os=hpux;;
590590
osf*) os=alpha;;
591591
sco*) os=sco;;
592-
sysv4*) os=svr4;;
593592
machten*) os=machten;;
594593
sysv4.2*)
595594
case"$host_vendor"in
596595
univel) os=univel;;
597596
*) os=unknown;;
598597
esac ;;
598+
sysv4*) os=svr4;;
599599
*)echo""
600600
echo"*************************************************************"
601601
echo"configure does not currently recognize your operating system,"
@@ -682,16 +682,17 @@ fi
682682
export TEMPLATE
683683
echo""
684684

685-
AROPT=`grep AROPT$TEMPLATE| awk -F:'{print $2}'`
686-
SHARED_LIB=`grep SHARED_LIB$TEMPLATE| awk -F:'{print $2}'`
687-
CFLAGS=`grep CFLAGS$TEMPLATE| awk -F:'{print $2}'`
688-
SRCH_INC=`grep SRCH_INC$TEMPLATE| awk -F:'{print $2}'`
689-
SRCH_LIB=`grep SRCH_LIB$TEMPLATE| awk -F:'{print $2}'`
690-
USE_LOCALE=`grep USE_LOCALE$TEMPLATE| awk -F:'{print $2}'`
691-
DLSUFFIX=`grep DLSUFFIX$TEMPLATE| awk -F:'{print $2}'`
692-
DL_LIB=`grep DL_LIB$TEMPLATE| awk -F:'{print $2}'`
693-
YACC=`grep YACC$TEMPLATE| awk -F:'{print $2}'`
694-
YFLAGS=`grep YFLAGS$TEMPLATE| awk -F:'{print $2}'`
685+
AROPT=`grep'^AROPT:'$TEMPLATE| awk -F:'{print $2}'`
686+
SHARED_LIB=`grep'^SHARED_LIB:'$TEMPLATE| awk -F:'{print $2}'`
687+
CFLAGS=`grep'^CFLAGS:'$TEMPLATE| awk -F:'{print $2}'`
688+
SRCH_INC=`grep'^SRCH_INC:'$TEMPLATE| awk -F:'{print $2}'`
689+
SRCH_LIB=`grep'^SRCH_LIB:'$TEMPLATE| awk -F:'{print $2}'`
690+
USE_LOCALE=`grep'^USE_LOCALE:'$TEMPLATE| awk -F:'{print $2}'`
691+
DLSUFFIX=`grep'^DLSUFFIX:'$TEMPLATE| awk -F:'{print $2}'`
692+
DL_LIB=`grep'^DL_LIB:'$TEMPLATE| awk -F:'{print $2}'`
693+
YACC=`grep'^YACC:'$TEMPLATE| awk -F:'{print $2}'`
694+
YFLAGS=`grep'^YFLAGS:'$TEMPLATE| awk -F:'{print $2}'`
695+
CC=`grep'^CC:'$TEMPLATE| awk -F:'{print $2}'`
695696

696697

697698
echo"**************************************************************"

‎src/configure.in

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ nextstep*) os=nextstep;;
2525
hpux*) os=hpux;;
2626
osf*) os=alpha;;
2727
sco*) os=sco;;
28-
sysv4*) os=svr4;;
2928
machten*) os=machten;;
3029
sysv4.2*)
3130
case "$host_vendor" in
3231
univel) os=univel;;
3332
*) os=unknown;;
3433
esac ;;
34+
sysv4*) os=svr4;;
3535
*) echo ""
3636
echo "*************************************************************"
3737
echo "configure does not currently recognize your operating system,"
@@ -120,16 +120,17 @@ fi
120120
export TEMPLATE
121121
echo ""
122122

123-
AROPT=`grep AROPT $TEMPLATE | awk -F: '{print $2}'`
124-
SHARED_LIB=`grep SHARED_LIB $TEMPLATE | awk -F: '{print $2}'`
125-
CFLAGS=`grep CFLAGS $TEMPLATE | awk -F: '{print $2}'`
126-
SRCH_INC=`grep SRCH_INC $TEMPLATE | awk -F: '{print $2}'`
127-
SRCH_LIB=`grep SRCH_LIB $TEMPLATE | awk -F: '{print $2}'`
128-
USE_LOCALE=`grep USE_LOCALE $TEMPLATE | awk -F: '{print $2}'`
129-
DLSUFFIX=`grep DLSUFFIX $TEMPLATE | awk -F: '{print $2}'`
130-
DL_LIB=`grep DL_LIB $TEMPLATE | awk -F: '{print $2}'`
131-
YACC=`grep YACC $TEMPLATE | awk -F: '{print $2}'`
132-
YFLAGS=`grep YFLAGS $TEMPLATE | awk -F: '{print $2}'`
123+
AROPT=`grep '^AROPT:' $TEMPLATE | awk -F: '{print $2}'`
124+
SHARED_LIB=`grep '^SHARED_LIB:' $TEMPLATE | awk -F: '{print $2}'`
125+
CFLAGS=`grep '^CFLAGS:' $TEMPLATE | awk -F: '{print $2}'`
126+
SRCH_INC=`grep '^SRCH_INC:' $TEMPLATE | awk -F: '{print $2}'`
127+
SRCH_LIB=`grep '^SRCH_LIB:' $TEMPLATE | awk -F: '{print $2}'`
128+
USE_LOCALE=`grep '^USE_LOCALE:' $TEMPLATE | awk -F: '{print $2}'`
129+
DLSUFFIX=`grep '^DLSUFFIX:' $TEMPLATE | awk -F: '{print $2}'`
130+
DL_LIB=`grep '^DL_LIB:' $TEMPLATE | awk -F: '{print $2}'`
131+
YACC=`grep '^YACC:' $TEMPLATE | awk -F: '{print $2}'`
132+
YFLAGS=`grep '^YFLAGS:' $TEMPLATE | awk -F: '{print $2}'`
133+
CC=`grep '^CC:' $TEMPLATE | awk -F: '{print $2}'`
133134

134135

135136
dnl We now need to check for additional directories (include

‎src/include/port/univel.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
#defineUSE_POSIX_SIGNALS
44
#defineSYSV_DIRENT
55

6-
#if0
76
#defineHAS_TEST_AND_SET
7+
#defineNEED_I386_TAS_ASM
8+
#defineUSE_UNIVEL_CC_ASM/***************************************\
9+
| Define this if you are compiling with|
10+
| the native UNIXWARE C compiler.|
11+
\***************************************/
812
typedefunsignedcharslock_t;
913

10-
#endif
11-
12-
externlongrandom(void);
13-
externvoidsrandom(intseed);
14-
externintstrcasecmp(char*s1,char*s2);
15-
externintgethostname(char*name,intnamelen);
16-
1714
#ifndefBIG_ENDIAN
1815
#defineBIG_ENDIAN4321
1916
#endif

‎src/include/storage/s_lock.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.16 1998/01/13 19:28:39 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.17 1998/01/17 23:33:14 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -294,14 +294,31 @@ tas_dummy()
294294

295295
#if defined(NEED_I386_TAS_ASM)
296296

297+
#if defined(USE_UNIVEL_CC_ASM)
298+
asmvoidS_LOCK(char*lval)
299+
{
300+
%labagain;
301+
/* Upon entry, %eax will contain the pointer to the lock byte */
302+
pushl %ebx
303+
xchgl %eax,%ebx
304+
movb$-1,%al
305+
again:
306+
lock
307+
xchgb %al,(%ebx)
308+
cmpb$0,%al
309+
jneagain
310+
popl %ebx
311+
}
312+
#else
297313
#defineS_LOCK(lock)do \
298314
{ \
299315
slock_t_res; \
300316
do \
301317
{ \
302-
__asm__("xchgb %0,%1": "=q"(_res), "=m"(*lock):"0"(0x1)); \
318+
__asm__("lockxchgb %0,%1":"=q"(_res),"=m"(*lock):"0"(0x1)); \
303319
}while (_res!=0); \
304320
}while (0)
321+
#endif
305322

306323
#defineS_UNLOCK(lock)(*(lock) = 0)
307324

‎src/interfaces/libpgtcl/Makefile.in

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.1 1998/01/13 04:18:04 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.2 1998/01/17 23:33:32 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -51,7 +51,14 @@ endif
5151
ifeq ($(PORTNAME), i386_solaris)
5252
install-shlib-dep:= install-shlib
5353
shlib:= libpgtcl.so.1
54-
LDFLAGS_SL= -G -z text
54+
LDFLAGS_SL= -G -z text -L$(SRCDIR)/interfaces/libpq -lpq
55+
CFLAGS+=$(CFLAGS_SL)
56+
endif
57+
58+
ifeq ($(PORTNAME), univel)
59+
install-shlib-dep:= install-shlib
60+
shlib:= libpgtcl.so.1
61+
LDFLAGS_SL= -G -z text -L$(SRCDIR)/interfaces/libpq -lpq
5562
CFLAGS+=$(CFLAGS_SL)
5663
endif
5764

‎src/interfaces/libpq/Makefile.in

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.2 1998/01/13 04:20:51 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.3 1998/01/17 23:33:39 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -51,6 +51,12 @@ ifeq ($(PORTNAME), i386_solaris)
5151
LDFLAGS_SL = -G -z text
5252
CFLAGS +=$(CFLAGS_SL)
5353
endif
54+
ifeq ($(PORTNAME), univel)
55+
install-shlib-dep := install-shlib
56+
shlib := libpq.so.1
57+
LDFLAGS_SL = -G -z text
58+
CFLAGS +=$(CFLAGS_SL)
59+
endif
5460

5561
all: libpq.a$(shlib) c.h
5662

‎src/makefiles/Makefile.univel

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#
2-
#The univel port is almost guaranteed NOT to work yet.
3-
#
4-
# MAKE_EXPORTS is required for svr4 loaders that want a file of
5-
# symbol names to tell them what to export/import.
6-
#MAKE_EXPORTS= true
1+
LDFLAGS+= -lc89 -Wl,-Bexport
72

83
%.so: %.o
94
$(LD) -G -Bdynamic -o $@ $<

‎src/template/univel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
AROPT:crs
2-
CFLAGS:-I$(SRCDIR)/backend/port/univel
3-
SHARED_LIB:-fPIC
4-
ALL:-DHAVE_RUSAGE -m486 -Dsvr4
2+
CFLAGS:-I$(SRCDIR)/backend/port/univel -Xa -v -DHAVE_RUSAGE -O -K i486,host,inline,loop_unroll -Dsvr4
3+
SHARED_LIB:-K PIC
54
SRCH_INC:
65
SRCH_LIB:
76
USE_LOCALE:no
87
DLSUFFIX:.so
98
YFLAGS:-d
10-
YACC:bison -y
9+
YACC:yacc
10+
CC:cc

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp