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

Commit0624f3d

Browse files
committed
My mailer munged the intro text in my last post. Here is the text
in a more readable form. -- I am submitting the following patchesto the June 6, 1998 snapshot of PostgreSQL. These patches implementa port of PostgreSQL to SCO UnixWare 7, and updates the Univel port(UnixWare 2.x). The patched files, and the reason for the patch are:File Reason for the patch ------------------------------------------------------------------------------src/backend/port/dynloader/unixware.c src/backend/port/dynloader/unixware.hsrc/include/port/unixware.h src/makefiles/Makefile.unixwaresrc/template/unixwareCreated for the UNIXWARE port.src/include/port/univel.hModifed this file to work with the changes made tos_lock.[ch].src/backend/storage/buffer/s_lock.c src/include/storage/s_lock.hMoved the UNIXWARE (and Univel) tas() function froms_lock.c to s_lock.h. The UnixWare compiler asmconstruct is treated as a macro and needs to be inthe s_lock.h file. I also reworked the tas()function to correct some errors in the code.src/include/version.h.inThe use of the ## operator with quoted strings inthe VERSION macro caused problems with the UnixWareC compiler. I removed the ## operators since theywere not needed in this case. The macro expandsinto a sequence of quoted strings that will beconcatenated by any ANSI C compiler.src/config.guessThis script was modified to recognize SCO UnixWare7.src/configure src/configure.inThe configure script was modified to recognize SCOUnixWare 7.Billy G. Allie
1 parent5b4ca67 commit0624f3d

File tree

10 files changed

+103
-14
lines changed

10 files changed

+103
-14
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* Dummy file used for nothing at this point
2+
*
3+
* see unixware.h
4+
*/

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

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* unixware.h--
4+
* port-specific prototypes for Intel x86/UNIXWARE 7
5+
*
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* unixware.h,v 1.2 1995/03/17 06:40:18 andrew Exp
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
#ifndefPORT_PROTOS_H
14+
#definePORT_PROTOS_H
15+
16+
#include<dlfcn.h>
17+
#include"fmgr.h"/* for func_ptr */
18+
#include"utils/dynamic_loader.h"
19+
20+
/* dynloader.c */
21+
/*
22+
* Dynamic Loader on Intel x86/Intel SVR4.
23+
*
24+
* this dynamic loader uses the system dynamic loading interface for shared
25+
* libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
26+
* library as the file to be dynamically loaded.
27+
*
28+
*/
29+
#definepg_dlopen(f)dlopen(f,RTLD_LAZY)
30+
#definepg_dlsymdlsym
31+
#definepg_dlclosedlclose
32+
#definepg_dlerrordlerror
33+
34+
#endif/* PORT_PROTOS_H */

‎src/config.guess

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ EOF
450450
i?86:DYNIX/ptx:4*:*)
451451
echo i386-sequent-sysv4
452452
exit 0 ;;
453+
i[34]86:UnixWare:*:*)
454+
echo${UNAME_MACHINE}-unixware-sysv${UNAME_RELEASE}
455+
exit 0 ;;
453456
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
454457
if grep Novell /usr/include/link.h>/dev/null2>/dev/null;then
455458
echo${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}

‎src/configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ nextstep*) os=nextstep need_tas=no ;;
626626
*) os=unknown need_tas=no ;;
627627
esac ;;
628628
sysv4*) os=svr4 need_tas=no ;;
629+
sysv5*) os=unixware need_tas=no ;;
629630
*)echo""
630631
echo"*************************************************************"
631632
echo"configure does not currently recognize your operating system,"

‎src/configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ nextstep*) os=nextstep need_tas=no ;;
3232
*) os=unknown need_tas=no ;;
3333
esac ;;
3434
sysv4*) os=svr4 need_tas=no ;;
35+
sysv5*) os=unixware need_tas=no ;;
3536
*) echo ""
3637
echo "*************************************************************"
3738
echo "configure does not currently recognize your operating system,"

‎src/include/port/unixware.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#defineUSE_POSIX_TIME
2+
#defineNO_EMPTY_STMTS
3+
#defineUSE_POSIX_SIGNALS
4+
#defineSYSV_DIRENT
5+
6+
#defineHAS_TEST_AND_SET
7+
#defineNEED_I386_TAS_ASM
8+
/***************************************
9+
* Define this if you are compiling with
10+
* the native UNIXWARE C compiler.
11+
***************************************/
12+
#defineUNIXWARE
13+
typedefunsignedcharslock_t;
14+
15+
/***************************************************************
16+
* The following include will get the needed prototype for the
17+
* strcasecmp() function.
18+
***************************************************************/
19+
#include<strings.h>
20+
21+
#ifndefBIG_ENDIAN
22+
#defineBIG_ENDIAN4321
23+
#endif
24+
#ifndefLITTLE_ENDIAN
25+
#defineLITTLE_ENDIAN1234
26+
#endif
27+
#ifndefPDP_ENDIAN
28+
#definePDP_ENDIAN3412
29+
#endif
30+
#ifndefBYTE_ORDER
31+
#defineBYTE_ORDERLITTLE_ENDIAN
32+
#endif

‎src/include/storage/s_lock.h

Lines changed: 11 additions & 12 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.40 1998/07/1901:19:54 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.41 1998/07/1904:16:59 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -188,23 +188,22 @@ tas(volatile slock_t *lock)
188188
#if defined(NEED_I386_TAS_ASM)
189189
/* non gcc i386 based things */
190190

191-
#if defined(USE_UNIVEL_CC)
191+
#if defined(USE_UNIVEL_CC)|| defined(UNIXWARE)
192192
#defineTAS(lock)tas(lock)
193193

194-
asmint
194+
asmint
195195
tas(slock_t*s_lock)
196196
{
197-
%lablocked;
198-
/* Upon entry, %eax will contain the pointer to the lock byte */
199-
pushl %ebx
200-
xchgl %eax, %ebx
201-
xor %eax, %eax
202-
movb$255, %al
197+
%mems_lock
198+
pushl%ebx
199+
movls_lock,%ebx
200+
movl$255,%eax
203201
lock
204-
xchgb %al,(%ebx)
205-
popl %ebx
202+
xchgb%al,(%ebx)
203+
popl%ebx
206204
}
207-
#endif/* USE_UNIVEL_CC */
205+
206+
#endif/* USE_UNIVEL_CC || UNIXWARE */
208207

209208
#endif/* NEED_I386_TAS_ASM */
210209

‎src/include/version.h.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* this file contains the interface to version.c.
55
* Also some parameters.
66
*
7-
* $Header: /cvsroot/pgsql/src/include/Attic/version.h.in,v 1.2 1998/06/09 22:59:04 momjian Exp $
7+
* $Header: /cvsroot/pgsql/src/include/Attic/version.h.in,v 1.3 1998/07/19 04:16:53 momjian Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
@@ -20,6 +20,6 @@ void SetPgVersion(const char *path, char **reason_p);
2020

2121
#definePG_VERFILE"PG_VERSION"
2222

23-
#definePG_VERSION_STR "PostgreSQL "##PG_RELEASE##"."##PG_VERSION##"."##PG_SUBVERSION ## " on @host@, compiled by @CC@ @CC_VERSION@"
23+
#definePG_VERSION_STR "PostgreSQL " PG_RELEASE "." PG_VERSION "." PG_SUBVERSION " on @host@, compiled by @CC@ @CC_VERSION@"
2424

2525
#endif

‎src/makefiles/Makefile.unixware

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
LDFLAGS+= -Wl,-Bexport
2+
3+
%.so: %.o
4+
$(LD) -G -Bdynamic -o $@ $<
5+
6+
INSTALL= /usr/ucb/install
7+

‎src/template/unixware

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
AROPT:crs
2+
CFLAGS:-Xa -v -O -K i486,host,inline,loop_unroll,alloca -Dsvr4
3+
SHARED_LIB:-K PIC
4+
SRCH_INC:
5+
SRCH_LIB:
6+
USE_LOCALE:no
7+
DLSUFFIX:.so
8+
CC:cc

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp