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.
This commit is contained in:
Marc G. Fournier 1998-02-13 05:10:06 +00:00
parent e3f2224664
commit 64e7adb07b
7 changed files with 44 additions and 17 deletions

View File

@ -7,7 +7,7 @@
#
#
# 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
# Essentially all Postgres make files include this file and use the
@ -48,6 +48,11 @@
# compiling to a.out (which means you're using the dld dynamic loading
# library), set LINUX_ELF to null in Makefile.custom.
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

View File

@ -1,7 +1,7 @@
/* A lexical scanner generated by flex */
/* 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
@ -539,7 +539,7 @@ char *yytext;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/

View File

@ -61,7 +61,7 @@ BSD44_derived_dlerror(void)
void *
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);
return NULL;
#else
@ -78,7 +78,7 @@ BSD44_derived_dlopen(const char *file, int num)
void *
BSD44_derived_dlsym(void *handle, const char *name)
{
#ifdef __mips__
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
sprintf(error_message, "dlsym (%s) failed", name);
return NULL;
#else
@ -101,7 +101,8 @@ BSD44_derived_dlsym(void *handle, const char *name)
void
BSD44_derived_dlclose(void *handle)
{
#ifndef __mips__
#if defined(__mips__) || (defined(__NetBSD__) && defined(vax))
#else
dlclose(handle);
#endif
}

View File

@ -10,6 +10,11 @@
#define HAS_TEST_AND_SET
#endif
#if defined(vax)
#define NEED_VAX_TAS_ASM
#define HAS_TEST_AND_SET
#endif
#if defined(ns32k)
#define NEED_NS32k_TAS_ASM
#define HAS_TEST_AND_SET

View File

@ -7,7 +7,7 @@
*
*
* 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()
#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
*/

View File

@ -7,7 +7,7 @@
#
#
# 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)
endif
ifeq ($(PORTNAME), bsd)
install-shlib-dep := install-shlib
shlib := libpgtcl.so.1.0
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
shlib := libpgtcl.so.1.0
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), i386_solaris)

View File

@ -7,7 +7,7 @@
#
#
# 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)
endif
endif
ifeq ($(PORTNAME), bsd)
install-shlib-dep := install-shlib
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
ifdef BSD_SHLIB
install-shlib-dep := install-shlib
shlib := libpq.so.$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
LDFLAGS_SL = -x -Bshareable -Bforcearchive
CFLAGS += $(CFLAGS_SL)
endif
endif
ifeq ($(PORTNAME), i386_solaris)
install-shlib-dep := install-shlib