diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 3 | ||||
-rw-r--r-- | src/Makefile.shlib | 23 | ||||
-rw-r--r--[-rwxr-xr-x] | src/backend/port/dynloader/solaris.c (renamed from src/backend/port/dynloader/solaris_i386.c) | 2 | ||||
-rw-r--r-- | src/backend/port/dynloader/solaris.h | 16 | ||||
-rwxr-xr-x | src/backend/port/dynloader/solaris_i386.h | 35 | ||||
-rwxr-xr-x | src/backend/port/dynloader/solaris_sparc.c | 4 | ||||
-rwxr-xr-x | src/backend/port/dynloader/solaris_sparc.h | 39 | ||||
-rw-r--r-- | src/backend/tioga/tgRecipe.c | 6 | ||||
-rw-r--r-- | src/include/port/solaris.h | 64 | ||||
-rwxr-xr-x | src/include/port/solaris_i386.h | 41 | ||||
-rwxr-xr-x | src/include/port/solaris_sparc.h | 18 | ||||
-rw-r--r-- | src/makefiles/Makefile.solaris | 4 | ||||
-rw-r--r-- | src/makefiles/Makefile.solaris_i386 | 2 | ||||
-rw-r--r-- | src/makefiles/Makefile.solaris_sparc | 5 | ||||
-rw-r--r-- | src/template/solaris (renamed from src/template/solaris_sparc) | 3 | ||||
-rw-r--r-- | src/template/solaris_i386 | 11 |
16 files changed, 102 insertions, 174 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 9b2f3987c41..38db13d0694 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -1,5 +1,5 @@ # -*-makefile-*- -# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.99 2000/10/10 13:04:46 momjian Exp $ +# $Header: /cvsroot/pgsql/src/Makefile.global.in,v 1.100 2000/10/10 21:22:21 petere Exp $ #------------------------------------------------------------------------------ # All PostgreSQL makefiles include this file and use the variables it sets, @@ -157,6 +157,7 @@ LDREL = -r LDOUT = -o DLSUFFIX = @DLSUFFIX@ RANLIB = @RANLIB@ +LORDER = @LORDER@ X = @EXEEXT@ # Miscellaneous diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 58937230455..1a050aaa481 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -6,7 +6,7 @@ # Copyright (c) 1998, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.24 2000/10/07 14:39:06 momjian Exp $ +# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.25 2000/10/10 21:22:21 petere Exp $ # #------------------------------------------------------------------------- @@ -70,7 +70,7 @@ ifeq ($(PORTNAME), aix) SHLIB_LINK += -lc endif -ifeq ($(PORTNAME), bsd) +ifeq ($(PORTNAME), openbsd) ifdef BSD_SHLIB shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) ifdef ELF_SYSTEM @@ -149,21 +149,14 @@ ifeq ($(PORTNAME), linux) CFLAGS += $(CFLAGS_SL) endif -ifeq ($(PORTNAME), solaris_i386) +ifeq ($(PORTNAME), solaris) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LDFLAGS_SL := -G SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc CFLAGS += $(CFLAGS_SL) endif -ifeq ($(PORTNAME), solaris_sparc) - shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LDFLAGS_SL := -G - SHLIB_LINK += -ldl -lsocket -lresolv -lnsl -lm -lc - CFLAGS += $(CFLAGS_SL) -endif - -ifeq ($(PORTNAME), alpha) +ifeq ($(PORTNAME), osf) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) LDFLAGS_SL += -shared -expect_unresolved '*' endif @@ -219,11 +212,15 @@ all-lib: lib$(NAME).a $(shlib) ifneq ($(PORTNAME), win) +ifndef LORDER +MK_NO_LORDER := true +endif + lib$(NAME).a: $(OBJS) ifdef MK_NO_LORDER - $(AR) $(AROPT) $@ $(OBJS) + $(AR) $(AROPT) $@ $^ else - $(AR) $(AROPT) $@ `lorder $(OBJS) | tsort` + $(AR) $(AROPT) $@ `$(LORDER) $^ | tsort` endif $(RANLIB) $@ diff --git a/src/backend/port/dynloader/solaris_i386.c b/src/backend/port/dynloader/solaris.c index 4adf3093c1c..2e92cd372c5 100755..100644 --- a/src/backend/port/dynloader/solaris_i386.c +++ b/src/backend/port/dynloader/solaris.c @@ -1,4 +1,4 @@ /* Dummy file used for nothing at this point * - * see solaris_i386.h + * see solaris.h */ diff --git a/src/backend/port/dynloader/solaris.h b/src/backend/port/dynloader/solaris.h new file mode 100644 index 00000000000..7232418b13e --- /dev/null +++ b/src/backend/port/dynloader/solaris.h @@ -0,0 +1,16 @@ +/* $Header: /cvsroot/pgsql/src/backend/port/dynloader/solaris.h,v 1.1 2000/10/10 21:22:23 petere Exp $ */ + +#ifndef DYNLOADER_SOLARIS_H +#define DYNLOADER_SOLARIS_H + +#include "config.h" +#include <dlfcn.h> +#include "fmgr.h" +#include "utils/dynamic_loader.h" + +#define pg_dlopen(f) dlopen(f,1) +#define pg_dlsym dlsym +#define pg_dlclose dlclose +#define pg_dlerror dlerror + +#endif /* DYNLOADER_SOLARIS_H */ diff --git a/src/backend/port/dynloader/solaris_i386.h b/src/backend/port/dynloader/solaris_i386.h deleted file mode 100755 index ed1cebaf2ce..00000000000 --- a/src/backend/port/dynloader/solaris_i386.h +++ /dev/null @@ -1,35 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port_protos.h - * port-specific prototypes for SunOS 4 - * - * - * Portions Copyright (c) 1996-2000, PostgreSQL, Inc - * Portions Copyright (c) 1994, Regents of the University of California - * - * $Id: solaris_i386.h,v 1.5 2000/01/26 05:56:44 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef PORT_PROTOS_H -#define PORT_PROTOS_H - -#include <dlfcn.h> -#include "fmgr.h" -#include "utils/dynamic_loader.h" - -/* dynloader.c */ -/* - * Dynamic Loader on SunOS 4. - * - * this dynamic loader uses the system dynamic loading interface for shared - * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared - * library as the file to be dynamically loaded. - * - */ -#define pg_dlopen(f) dlopen(f,1) -#define pg_dlsym dlsym -#define pg_dlclose dlclose -#define pg_dlerror dlerror - -#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/dynloader/solaris_sparc.c b/src/backend/port/dynloader/solaris_sparc.c deleted file mode 100755 index 4adf3093c1c..00000000000 --- a/src/backend/port/dynloader/solaris_sparc.c +++ /dev/null @@ -1,4 +0,0 @@ -/* Dummy file used for nothing at this point - * - * see solaris_i386.h - */ diff --git a/src/backend/port/dynloader/solaris_sparc.h b/src/backend/port/dynloader/solaris_sparc.h deleted file mode 100755 index 61b6b998b66..00000000000 --- a/src/backend/port/dynloader/solaris_sparc.h +++ /dev/null @@ -1,39 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port_protos.h - * port-specific prototypes for SunOS 4 - * - * - * Portions Copyright (c) 1996-2000, PostgreSQL, Inc - * Portions Copyright (c) 1994, Regents of the University of California - * - * $Id: solaris_sparc.h,v 1.5 2000/01/26 05:56:44 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#ifndef PORT_PROTOS_H -#define PORT_PROTOS_H - -#include <netinet/in.h> /* For struct in_addr */ -#include <arpa/inet.h> - -#include <dlfcn.h> - -#include "fmgr.h" -#include "utils/dynamic_loader.h" - -/* dynloader.c */ -/* - * Dynamic Loader on SunOS 4. - * - * this dynamic loader uses the system dynamic loading interface for shared - * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared - * library as the file to be dynamically loaded. - * - */ -#define pg_dlopen(f) dlopen(f,1) -#define pg_dlsym dlsym -#define pg_dlclose dlclose -#define pg_dlerror dlerror - -#endif /* PORT_PROTOS_H */ diff --git a/src/backend/tioga/tgRecipe.c b/src/backend/tioga/tgRecipe.c index 938f893d8be..4304b4a1eaa 100644 --- a/src/backend/tioga/tgRecipe.c +++ b/src/backend/tioga/tgRecipe.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.16 2000/01/26 05:57:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.17 2000/10/10 21:22:24 petere Exp $ * *------------------------------------------------------------------------- */ @@ -92,12 +92,12 @@ first character\n", ARRAY_LEFT_DELIM); return result; } - if ((beginQuote = index(str, ARRAY_ELEM_LEFT)) == NULL) + if ((beginQuote = strchr(str, ARRAY_ELEM_LEFT)) == NULL) { elog(NOTICE, "textArray2ArrTgString: missing a begin quote\n"); return result; } - if ((endQuote = index(beginQuote + 1, '"')) == NULL) + if ((endQuote = strchr(beginQuote + 1, '"')) == NULL) { elog(NOTICE, "textArray2ArrTgString: missing an end quote\n"); return result; diff --git a/src/include/port/solaris.h b/src/include/port/solaris.h new file mode 100644 index 00000000000..83e3d6f8c15 --- /dev/null +++ b/src/include/port/solaris.h @@ -0,0 +1,64 @@ +/* $Header: /cvsroot/pgsql/src/include/port/solaris.h,v 1.1 2000/10/10 21:22:26 petere Exp $ */ + +#define USE_POSIX_TIME +#define NO_EMPTY_STMTS +#define SYSV_DIRENT +#define HAS_TEST_AND_SET +typedef unsigned char slock_t; + +/* + * Sort this out for all operting systems some time. The __xxx + * symbols are defined on both GCC and Solaris CC, although GCC + * doesn't document them. The __xxx__ symbols are only on GCC. + */ +#if defined(__i386) && !defined(__i386__) +# define __i386__ +#endif + +#if defined(__sparc) && !defined(__sparc__) +# define __sparc__ +#endif + +#if defined(__i386__) +# include <sys/isa_defs.h> +#endif + +#ifndef BIG_ENDIAN +#define BIG_ENDIAN 4321 +#endif +#ifndef LITTLE_ENDIAN +#define LITTLE_ENDIAN 1234 +#endif +#ifndef PDP_ENDIAN +#define PDP_ENDIAN 3412 +#endif + +#ifndef BYTE_ORDER +# ifdef __sparc__ +# define BYTE_ORDER BIG_ENDIAN +# endif +# ifdef __i386__ +# define BYTE_ORDER LITTLE_ENDIAN +# endif +#endif + + +#ifndef NAN + +# if defined(__GNUC__) && defined(__i386__) + +# ifndef __nan_bytes +# define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } +# endif + +# define NAN \ + (__extension__ ((union { unsigned char __c[8]; double __d; }) \ + { __nan_bytes }).__d) + +# else /* not GNUC and i386 */ + +# define NAN (0.0/0.0) + +# endif /* GCC. */ + +#endif /* not NAN */ diff --git a/src/include/port/solaris_i386.h b/src/include/port/solaris_i386.h deleted file mode 100755 index 722cbd94e68..00000000000 --- a/src/include/port/solaris_i386.h +++ /dev/null @@ -1,41 +0,0 @@ -#define USE_POSIX_TIME -#define NO_EMPTY_STMTS -#define SYSV_DIRENT -#define HAS_TEST_AND_SET -typedef unsigned char slock_t; - -#include "sys/isa_defs.h" - -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 -#endif -#ifndef BYTE_ORDER -#define BYTE_ORDER LITTLE_ENDIAN -#endif - -#ifndef NAN - -#ifndef __nan_bytes -#define __nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f } -#endif /* __nan_bytes */ - -#ifdef __GNUC__ -#define NAN \ - (__extension__ ((union { unsigned char __c[8]; \ - double __d; }) \ - { __nan_bytes }).__d) - -#else /* Not GCC. */ -#define NAN (*(__const double *) __nan) -#endif /* GCC. */ -#endif /* NAN */ - -#ifndef index -#define index strchr -#endif diff --git a/src/include/port/solaris_sparc.h b/src/include/port/solaris_sparc.h deleted file mode 100755 index 6a19148126d..00000000000 --- a/src/include/port/solaris_sparc.h +++ /dev/null @@ -1,18 +0,0 @@ -#define USE_POSIX_TIME -#define NO_EMPTY_STMTS -#define SYSV_DIRENT -#define HAS_TEST_AND_SET -typedef unsigned char slock_t; - -#ifndef BIG_ENDIAN -#define BIG_ENDIAN 4321 -#endif -#ifndef LITTLE_ENDIAN -#define LITTLE_ENDIAN 1234 -#endif -#ifndef PDP_ENDIAN -#define PDP_ENDIAN 3412 -#endif -#ifndef BYTE_ORDER -#define BYTE_ORDER BIG_ENDIAN -#endif diff --git a/src/makefiles/Makefile.solaris b/src/makefiles/Makefile.solaris new file mode 100644 index 00000000000..034e4e224f4 --- /dev/null +++ b/src/makefiles/Makefile.solaris @@ -0,0 +1,4 @@ +# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.1 2000/10/10 21:22:28 petere Exp $ + +%.so: %.o + $(LD) -G -Bdynamic -o $@ $< diff --git a/src/makefiles/Makefile.solaris_i386 b/src/makefiles/Makefile.solaris_i386 deleted file mode 100644 index b67d7ed5e21..00000000000 --- a/src/makefiles/Makefile.solaris_i386 +++ /dev/null @@ -1,2 +0,0 @@ -%.so: %.o - $(LD) -G -Bdynamic -o $@ $< diff --git a/src/makefiles/Makefile.solaris_sparc b/src/makefiles/Makefile.solaris_sparc deleted file mode 100644 index e3adfe3d15b..00000000000 --- a/src/makefiles/Makefile.solaris_sparc +++ /dev/null @@ -1,5 +0,0 @@ -%.so: %.o - $(LD) -G -Bdynamic -o $@ $< - -MK_NO_LORDER=true - diff --git a/src/template/solaris_sparc b/src/template/solaris index 1863d97c816..d77bec50b2f 100644 --- a/src/template/solaris_sparc +++ b/src/template/solaris @@ -5,6 +5,7 @@ if test "$GCC" = yes ; then CFLAGS= SHARED_LIB=-fPIC else - CFLAGS='-Xa -v -D__sparc__ -D__sun__' + CC="$CC -Xa" # relaxed ISO C mode + CFLAGS=-v # -v is like gcc -Wall SHARED_LIB=-KPIC fi diff --git a/src/template/solaris_i386 b/src/template/solaris_i386 deleted file mode 100644 index c9e70260c15..00000000000 --- a/src/template/solaris_i386 +++ /dev/null @@ -1,11 +0,0 @@ -DLSUFFIX=.so - -if test "$GCC" = yes ; then - AROPT=crs - CFLAGS= - SHARED_LIB=-fPIC -else - AROPT=cq - CFLAGS= - SHARED_LIB=-KPIC -fi |