Skip to content

Commit 64e7adb

Browse files
committed
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
Apart from this Makefile hack, all I've done is to make dynamically loaded code modules fail properly (as was already done for __mips__, although I think this is too loose: I believe NetBSD for the pmax can do dynamic linking), and to add test-and-set lock handling. As Bruce suggested, this is done in a maximally efficient inlined way: I was not aware that this code was so important, speed-wise.
1 parent e3f2224 commit 64e7adb

File tree

7 files changed

+44
-17
lines changed

7 files changed

+44
-17
lines changed

src/Makefile.global.in

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.33 1998/01/27 03:24:51 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.34 1998/02/13 05:09:12 scrappy Exp $
1111
#
1212
# NOTES
1313
# Essentially all Postgres make files include this file and use the
@@ -48,6 +48,11 @@
4848
# compiling to a.out (which means you're using the dld dynamic loading
4949
# library), set LINUX_ELF to null in Makefile.custom.
5050
LINUX_ELF= true
51+
#
52+
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
53+
# are, and it's one that doesn't have shared libraries (NetBSD/vax is an
54+
# example of this), set BSD_SHLIB to null in Makefile.custom.
55+
BSD_SHLIB= true
5156

5257
LIBPQDIR:= $(SRCDIR)/interfaces/libpq
5358

src/backend/parser/scan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* A lexical scanner generated by flex */
22

33
/* Scanner skeleton version:
4-
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.12 1998/02/11 03:56:08 thomas Exp $
4+
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.13 1998/02/13 05:09:15 scrappy Exp $
55
*/
66

77
#define FLEX_SCANNER
@@ -539,7 +539,7 @@ char *yytext;
539539
*
540540
*
541541
* IDENTIFICATION
542-
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.12 1998/02/11 03:56:08 thomas Exp $
542+
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.13 1998/02/13 05:09:15 scrappy Exp $
543543
*
544544
*-------------------------------------------------------------------------
545545
*/

src/backend/port/dynloader/bsd.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ BSD44_derived_dlerror(void)
6161
void *
6262
BSD44_derived_dlopen(const char *file, int num)
6363
{
64-
#ifdef __mips__
64+
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
6565
sprintf(error_message, "dlopen (%s) not supported", file);
6666
return NULL;
6767
#else
@@ -78,7 +78,7 @@ BSD44_derived_dlopen(const char *file, int num)
7878
void *
7979
BSD44_derived_dlsym(void *handle, const char *name)
8080
{
81-
#ifdef __mips__
81+
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
8282
sprintf(error_message, "dlsym (%s) failed", name);
8383
return NULL;
8484
#else
@@ -101,7 +101,8 @@ BSD44_derived_dlsym(void *handle, const char *name)
101101
void
102102
BSD44_derived_dlclose(void *handle)
103103
{
104-
#ifndef __mips__
104+
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
105+
#else
105106
dlclose(handle);
106107
#endif
107108
}

src/include/port/bsd.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
#define HAS_TEST_AND_SET
1111
#endif
1212

13+
#if defined(vax)
14+
#define NEED_VAX_TAS_ASM
15+
#define HAS_TEST_AND_SET
16+
#endif
17+
1318
#if defined(ns32k)
1419
#define NEED_NS32k_TAS_ASM
1520
#define HAS_TEST_AND_SET

src/include/storage/s_lock.h

Lines changed: 13 additions & 1 deletion
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.24 1998/02/05 03:31:01 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.25 1998/02/13 05:09:50 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -287,6 +287,18 @@ tas_dummy()
287287

288288
#endif /* NEED_SPARC_TAS_ASM */
289289

290+
/*
291+
* VAXen -- even multiprocessor ones
292+
*/
293+
294+
#if defined(NEED_VAX_TAS_ASM)
295+
296+
#define S_LOCK(addr) __asm__("1: bbssi $0,(%0),1b": :"r"(addr))
297+
#define S_UNLOCK(addr) (*(addr) = 0)
298+
#define S_INIT_LOCK(addr) (*(addr) = 0)
299+
300+
#endif /* NEED_VAX_TAS_ASM */
301+
290302
/*
291303
* i386 based things
292304
*/

src/interfaces/libpgtcl/Makefile.in

Lines changed: 7 additions & 5 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.2 1998/01/17 23:33:32 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.3 1998/02/13 05:09:57 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -42,10 +42,12 @@ ifeq ($(PORTNAME), linux)
4242
endif
4343

4444
ifeq ($(PORTNAME), bsd)
45-
install-shlib-dep := install-shlib
46-
shlib := libpgtcl.so.1.0
47-
LDFLAGS_SL = -x -Bshareable -Bforcearchive
48-
CFLAGS += $(CFLAGS_SL)
45+
ifdef BSD_SHLIB
46+
install-shlib-dep := install-shlib
47+
shlib := libpgtcl.so.1.0
48+
LDFLAGS_SL = -x -Bshareable -Bforcearchive
49+
CFLAGS += $(CFLAGS_SL)
50+
endif
4951
endif
5052

5153
ifeq ($(PORTNAME), i386_solaris)

src/interfaces/libpq/Makefile.in

Lines changed: 7 additions & 5 deletions
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.5 1998/01/26 01:42:24 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.6 1998/02/13 05:10:06 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -43,10 +43,12 @@ ifeq ($(PORTNAME), linux)
4343
endif
4444
endif
4545
ifeq ($(PORTNAME), bsd)
46-
install-shlib-dep := install-shlib
47-
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
48-
LDFLAGS_SL = -x -Bshareable -Bforcearchive
49-
CFLAGS += $(CFLAGS_SL)
46+
ifdef BSD_SHLIB
47+
install-shlib-dep := install-shlib
48+
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
49+
LDFLAGS_SL = -x -Bshareable -Bforcearchive
50+
CFLAGS += $(CFLAGS_SL)
51+
endif
5052
endif
5153
ifeq ($(PORTNAME), i386_solaris)
5254
install-shlib-dep := install-shlib

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy