Commit 64e7adb0 authored by Marc G. Fournier's avatar Marc G. Fournier

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.
parent e3f22246
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.33 1998/01/27 03:24:51 scrappy Exp $ # $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.34 1998/02/13 05:09:12 scrappy Exp $
# #
# NOTES # NOTES
# Essentially all Postgres make files include this file and use the # Essentially all Postgres make files include this file and use the
...@@ -48,6 +48,11 @@ ...@@ -48,6 +48,11 @@
# compiling to a.out (which means you're using the dld dynamic loading # compiling to a.out (which means you're using the dld dynamic loading
# library), set LINUX_ELF to null in Makefile.custom. # library), set LINUX_ELF to null in Makefile.custom.
LINUX_ELF= true LINUX_ELF= true
#
# Ignore BSD_SHLIB if you're not using one of the BSD ports. But if you
# are, and it's one that doesn't have shared libraries (NetBSD/vax is an
# example of this), set BSD_SHLIB to null in Makefile.custom.
BSD_SHLIB= true
LIBPQDIR:= $(SRCDIR)/interfaces/libpq LIBPQDIR:= $(SRCDIR)/interfaces/libpq
......
/* A lexical scanner generated by flex */ /* A lexical scanner generated by flex */
/* Scanner skeleton version: /* Scanner skeleton version:
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.12 1998/02/11 03:56:08 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.13 1998/02/13 05:09:15 scrappy Exp $
*/ */
#define FLEX_SCANNER #define FLEX_SCANNER
...@@ -539,7 +539,7 @@ char *yytext; ...@@ -539,7 +539,7 @@ char *yytext;
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.12 1998/02/11 03:56:08 thomas Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.13 1998/02/13 05:09:15 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -61,7 +61,7 @@ BSD44_derived_dlerror(void) ...@@ -61,7 +61,7 @@ BSD44_derived_dlerror(void)
void * void *
BSD44_derived_dlopen(const char *file, int num) BSD44_derived_dlopen(const char *file, int num)
{ {
#ifdef __mips__ #if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
sprintf(error_message, "dlopen (%s) not supported", file); sprintf(error_message, "dlopen (%s) not supported", file);
return NULL; return NULL;
#else #else
...@@ -78,7 +78,7 @@ BSD44_derived_dlopen(const char *file, int num) ...@@ -78,7 +78,7 @@ BSD44_derived_dlopen(const char *file, int num)
void * void *
BSD44_derived_dlsym(void *handle, const char *name) BSD44_derived_dlsym(void *handle, const char *name)
{ {
#ifdef __mips__ #if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
sprintf(error_message, "dlsym (%s) failed", name); sprintf(error_message, "dlsym (%s) failed", name);
return NULL; return NULL;
#else #else
...@@ -101,7 +101,8 @@ BSD44_derived_dlsym(void *handle, const char *name) ...@@ -101,7 +101,8 @@ BSD44_derived_dlsym(void *handle, const char *name)
void void
BSD44_derived_dlclose(void *handle) BSD44_derived_dlclose(void *handle)
{ {
#ifndef __mips__ #if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
#else
dlclose(handle); dlclose(handle);
#endif #endif
} }
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
#endif #endif
#if defined(vax)
#define NEED_VAX_TAS_ASM
#define HAS_TEST_AND_SET
#endif
#if defined(ns32k) #if defined(ns32k)
#define NEED_NS32k_TAS_ASM #define NEED_NS32k_TAS_ASM
#define HAS_TEST_AND_SET #define HAS_TEST_AND_SET
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.24 1998/02/05 03:31:01 scrappy Exp $ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.25 1998/02/13 05:09:50 scrappy Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -287,6 +287,18 @@ tas_dummy() ...@@ -287,6 +287,18 @@ tas_dummy()
#endif /* NEED_SPARC_TAS_ASM */ #endif /* NEED_SPARC_TAS_ASM */
/*
* VAXen -- even multiprocessor ones
*/
#if defined(NEED_VAX_TAS_ASM)
#define S_LOCK(addr) __asm__("1: bbssi $0,(%0),1b": :"r"(addr))
#define S_UNLOCK(addr) (*(addr) = 0)
#define S_INIT_LOCK(addr) (*(addr) = 0)
#endif /* NEED_VAX_TAS_ASM */
/* /*
* i386 based things * i386 based things
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.2 1998/01/17 23:33:32 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.3 1998/02/13 05:09:57 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -42,10 +42,12 @@ ifeq ($(PORTNAME), linux) ...@@ -42,10 +42,12 @@ ifeq ($(PORTNAME), linux)
endif endif
ifeq ($(PORTNAME), bsd) ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
shlib := libpgtcl.so.1.0 shlib := libpgtcl.so.1.0
LDFLAGS_SL = -x -Bshareable -Bforcearchive LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL) CFLAGS += $(CFLAGS_SL)
endif
endif endif
ifeq ($(PORTNAME), i386_solaris) ifeq ($(PORTNAME), i386_solaris)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# #
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.5 1998/01/26 01:42:24 scrappy Exp $ # $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.6 1998/02/13 05:10:06 scrappy Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
...@@ -43,10 +43,12 @@ ifeq ($(PORTNAME), linux) ...@@ -43,10 +43,12 @@ ifeq ($(PORTNAME), linux)
endif endif
endif endif
ifeq ($(PORTNAME), bsd) ifeq ($(PORTNAME), bsd)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -x -Bshareable -Bforcearchive LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL) CFLAGS += $(CFLAGS_SL)
endif
endif endif
ifeq ($(PORTNAME), i386_solaris) ifeq ($(PORTNAME), i386_solaris)
install-shlib-dep := install-shlib install-shlib-dep := install-shlib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment