diff options
Diffstat (limited to 'databases/postgresql80/files')
-rw-r--r-- | databases/postgresql80/files/GNUmakefile.libpgtcl | 20 | ||||
-rw-r--r-- | databases/postgresql80/files/GNUmakefile.libpq | 20 | ||||
-rw-r--r-- | databases/postgresql80/files/Makefile.custom | 15 | ||||
-rw-r--r-- | databases/postgresql80/files/netbsd.c | 73 | ||||
-rw-r--r-- | databases/postgresql80/files/netbsd.h | 45 |
5 files changed, 173 insertions, 0 deletions
diff --git a/databases/postgresql80/files/GNUmakefile.libpgtcl b/databases/postgresql80/files/GNUmakefile.libpgtcl new file mode 100644 index 00000000000..b1ea47d2775 --- /dev/null +++ b/databases/postgresql80/files/GNUmakefile.libpgtcl @@ -0,0 +1,20 @@ +# $NetBSD: GNUmakefile.libpgtcl,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $ +# +# This GNUmakefile overrides the `all' target of $(libpgtcl_srcdir)/Makefile +# to be empty if INSTALLED_LIBPGTCL is defined. This handles the submake +# targets sprinkled throughout the PostgreSQL Makefiles that execute +# +# @$(MAKE) -C $(libpgtcl_builddir) all +# +# to ensure that the libpgtcl libraries are built first. If INSTALLED_LIBPGTCL +# is defined, then have the `all' target simple return success. + +ifdef INSTALLED_LIBPGTCL +all: + @test -f libpgtcl.a || touch libpgtcl.a +endif + +%: force + @$(MAKE) -f Makefile $@ + +force: ; diff --git a/databases/postgresql80/files/GNUmakefile.libpq b/databases/postgresql80/files/GNUmakefile.libpq new file mode 100644 index 00000000000..16a1e9834fc --- /dev/null +++ b/databases/postgresql80/files/GNUmakefile.libpq @@ -0,0 +1,20 @@ +# $NetBSD: GNUmakefile.libpq,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $ +# +# This GNUmakefile overrides the `all' target of $(libpq_srcdir)/Makefile +# to be empty if INSTALLED_LIBPQ is defined. This handles the submake +# targets sprinkled throughout the PostgreSQL Makefiles that execute +# +# @$(MAKE) -C $(libpq_builddir) all +# +# to ensure that the libpq libraries are built first. If INSTALLED_LIBPQ +# is defined, then have the `all' target simple return success. + +ifdef INSTALLED_LIBPQ +all: + @test -f libpq.a || touch libpq.a +endif + +%: force + @$(MAKE) -f Makefile $@ + +force: ; diff --git a/databases/postgresql80/files/Makefile.custom b/databases/postgresql80/files/Makefile.custom new file mode 100644 index 00000000000..2c27efbc3a4 --- /dev/null +++ b/databases/postgresql80/files/Makefile.custom @@ -0,0 +1,15 @@ +# $NetBSD: Makefile.custom,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $ +# +# This file is included by Makefile.global, which is included by every +# sub-Makefile in the build tree. Makefiles for shared libraries include +# Makefile.global then Makefile.shlib. + +pkglibdir = $(exec_prefix)/lib/postgresql + +ifdef INSTALLED_LIBPQ +libpq = -lpq +endif + +ifdef INSTALLED_LIBPGTCL +libpgtcl = -lpgtcl +endif diff --git a/databases/postgresql80/files/netbsd.c b/databases/postgresql80/files/netbsd.c new file mode 100644 index 00000000000..d2ef8e70699 --- /dev/null +++ b/databases/postgresql80/files/netbsd.c @@ -0,0 +1,73 @@ +/*- + * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group + * Portions Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91"; +#endif /* LIBC_SCCS and not lint */ + +#include "postgres.h" + +#include <nlist.h> +#include <link.h> +#include <dlfcn.h> + +#include "dynloader.h" + +#ifndef HAVE_DLOPEN + +char * +pg_dlerror(void) +{ + return "dynaloader unsupported"; +} + +void * +pg_dlopen(const char *file, int num) +{ + elog(ERROR, "dynamic load not supported"); + return NULL; +} + +void * +pg_dlsym(void *handle, const char *name) +{ + return NULL; +} + +void +pg_dlclose(void *handle) +{ +} + +#endif /* ! HAVE_DLOPEN */ diff --git a/databases/postgresql80/files/netbsd.h b/databases/postgresql80/files/netbsd.h new file mode 100644 index 00000000000..b9ac224d9e5 --- /dev/null +++ b/databases/postgresql80/files/netbsd.h @@ -0,0 +1,45 @@ +/*------------------------------------------------------------------------- + * + * netbsd.h + * port-specific prototypes for NetBSD + * + * + * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * $Id: netbsd.h,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef PORT_PROTOS_H +#define PORT_PROTOS_H + +#include <sys/types.h> +#include <nlist.h> +#include <link.h> +#include <dlfcn.h> + +#include "utils/dynamic_loader.h" + +#ifdef HAVE_DLOPEN +/* + * In some older systems, the RTLD_NOW flag isn't defined and the mode + * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted + * if available, but it doesn't exist everywhere. + * If it doesn't exist, set it to 0 so it has no effect. + */ +#ifndef RTLD_NOW +#define RTLD_NOW 1 +#endif +#ifndef RTLD_GLOBAL +#define RTLD_GLOBAL 0 +#endif + +#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL) +#define pg_dlsym dlsym +#define pg_dlclose dlclose +#define pg_dlerror dlerror + +#endif /* HAVE_DLOPEN */ + +#endif /* PORT_PROTOS_H */ |