From eb348bf41cb231d1f808a91f3367bfbb96af27d5 Mon Sep 17 00:00:00 2001 From: "Marc G. Fournier" Date: Tue, 3 Feb 1998 01:25:47 +0000 Subject: [PATCH] Clean up the alpha port, remove the backend/port/alpha subdirectory structure, and move the init_address_fixup() code directly into backend/main/main.c with appropriate #ifdefs around it... --- src/backend/main/main.c | 29 +++++++++++++++++++--- src/backend/port/alpha/Makefile | 34 ------------------------- src/backend/port/alpha/port-protos.h | 19 -------------- src/backend/port/alpha/port.c | 37 ---------------------------- src/backend/port/hpux/Makefile | 34 ------------------------- src/backend/port/hpux/port.c | 32 ------------------------ src/backend/port/ultrix4/port.c | 26 ------------------- 7 files changed, 25 insertions(+), 186 deletions(-) delete mode 100644 src/backend/port/alpha/Makefile delete mode 100644 src/backend/port/alpha/port-protos.h delete mode 100644 src/backend/port/alpha/port.c delete mode 100644 src/backend/port/hpux/Makefile delete mode 100644 src/backend/port/hpux/port.c delete mode 100644 src/backend/port/ultrix4/port.c diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 2777ff061d..8cfce24e1a 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.11 1997/12/19 02:05:42 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.12 1998/02/03 01:25:23 scrappy Exp $ * *------------------------------------------------------------------------- */ @@ -38,9 +38,18 @@ main(int argc, char *argv[]) { int len; +#if defined(alpha) +# ifdef NOFIXADE + int buffer[] = {SSIN_UACPROC, UAC_SIGBUS}; +# endif /* NOFIXADE */ +# ifdef NOPRINTADE + int buffer[] = {SSIN_UACPROC, UAC_NOPRINT}; +# endif /* NOPRINTADE */ +#endif + #ifdef USE_LOCALE setlocale(LC_CTYPE, ""); /* take locale information from an - * environment */ + * environment */ setlocale(LC_COLLATE, ""); setlocale(LC_MONETARY, ""); #endif @@ -50,8 +59,20 @@ main(int argc, char *argv[]) * Must be first so that the bootstrap code calls it, too. (Only * needed on some RISC architectures.) */ - init_address_fixup(); -#endif /* NOFIXADE || NOPRINTADE */ + +#if defined(ultrix4) + syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL); +#endif + +#if defined(alpha) + if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL, + (unsigned long) NULL) < 0) + { + elog(NOTICE, "setsysinfo failed: %d\n", errno); + } +#endif + +#endif /* NOFIXADE || NOPRINTADE */ /* * use one executable for both postgres and postmaster, invoke one or diff --git a/src/backend/port/alpha/Makefile b/src/backend/port/alpha/Makefile deleted file mode 100644 index bc98146f88..0000000000 --- a/src/backend/port/alpha/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile-- -# Makefile for port/alpha -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/Makefile,v 1.3 1997/12/20 00:25:13 scrappy Exp $ -# -#------------------------------------------------------------------------- - -SRCDIR = ../../.. -include ../../../Makefile.global - -INCLUDE_OPT = -I../.. - -CFLAGS+=$(INCLUDE_OPT) - -OBJS = port.o - -all: SUBSYS.o - -SUBSYS.o: $(OBJS) - $(LD) -r -o SUBSYS.o $(OBJS) - -depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend - -clean: - rm -f SUBSYS.o $(OBJS) - -ifeq (depend,$(wildcard depend)) -include depend -endif - diff --git a/src/backend/port/alpha/port-protos.h b/src/backend/port/alpha/port-protos.h deleted file mode 100644 index 51d3bddd70..0000000000 --- a/src/backend/port/alpha/port-protos.h +++ /dev/null @@ -1,19 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port-protos.h-- - * prototypes for OSF/1-specific routines - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: port-protos.h,v 1.4 1998/02/02 03:49:07 scrappy Exp $ - * - *------------------------------------------------------------------------- - */ - -#ifndef PORT_PROTOS_H -#define PORT_PROTOS_H - -extern void init_address_fixup(void); - -#endif /* PORT_PROTOS_H */ diff --git a/src/backend/port/alpha/port.c b/src/backend/port/alpha/port.c deleted file mode 100644 index e01ca93dc8..0000000000 --- a/src/backend/port/alpha/port.c +++ /dev/null @@ -1,37 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port.c-- - * OSF/1-specific routines - * - * Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/alpha/Attic/port.c,v 1.3 1997/09/08 02:25:50 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#include -#include -#include -#include "c.h" -#include "utils/elog.h" - -void -init_address_fixup() -{ -#ifdef NOFIXADE - int buffer[] = {SSIN_UACPROC, UAC_SIGBUS}; - -#endif /* NOFIXADE */ -#ifdef NOPRINTADE - int buffer[] = {SSIN_UACPROC, UAC_NOPRINT}; - -#endif /* NOPRINTADE */ - - if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL, - (unsigned long) NULL) < 0) - { - elog(NOTICE, "setsysinfo failed: %d\n", errno); - } -} diff --git a/src/backend/port/hpux/Makefile b/src/backend/port/hpux/Makefile deleted file mode 100644 index 8bc1a1e307..0000000000 --- a/src/backend/port/hpux/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -#------------------------------------------------------------------------- -# -# Makefile-- -# Makefile for port/hpux -# -# IDENTIFICATION -# $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/Makefile,v 1.3 1997/12/20 00:25:34 scrappy Exp $ -# -#------------------------------------------------------------------------- - -SRCDIR = ../../.. -include ../../../Makefile.global - -INCLUDE_OPT = -I../.. - -CFLAGS+=$(INCLUDE_OPT) - -OBJS = port.o dynloader.o tas.o - -all: SUBSYS.o - -SUBSYS.o: $(OBJS) - $(LD) -r -o SUBSYS.o $(OBJS) - -depend dep: - $(CC) -MM $(INCLUDE_OPT) *.c >depend - -clean: - rm -f SUBSYS.o $(OBJS) - -ifeq (depend,$(wildcard depend)) -include depend -endif - diff --git a/src/backend/port/hpux/port.c b/src/backend/port/hpux/port.c deleted file mode 100644 index 1c82a09999..0000000000 --- a/src/backend/port/hpux/port.c +++ /dev/null @@ -1,32 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port.c-- - * port-specific routines for HP-UX - * - * Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/hpux/Attic/port.c,v 1.4 1997/12/19 02:45:44 scrappy Exp $ - * - * NOTES - * For the most part, this file gets around some non-POSIX calls - * in POSTGRES. - * - *------------------------------------------------------------------------- - */ -#include /* for rand()/srand() prototypes */ -#include /* for pow() prototype */ -#include /* for syscall #defines */ - -#include "c.h" - -void -init_address_fixup() -{ - - /* - * On PA-RISC, unaligned access fixup is handled by the compiler, not - * by the kernel. - */ -} diff --git a/src/backend/port/ultrix4/port.c b/src/backend/port/ultrix4/port.c deleted file mode 100644 index b009073f78..0000000000 --- a/src/backend/port/ultrix4/port.c +++ /dev/null @@ -1,26 +0,0 @@ -/*------------------------------------------------------------------------- - * - * port.c-- - * Ultrix-specific routines - * - * Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/port/ultrix4/Attic/port.c,v 1.3 1997/09/07 04:47:27 momjian Exp $ - * - *------------------------------------------------------------------------- - */ -#include -#include - -#include "c.h" -#include "port-protos.h" - -void -init_address_fixup() -{ -#ifdef NOFIXADE - syscall(SYS_sysmips, MIPS_FIXADE, 0, NULL, NULL, NULL); -#endif /* NOFIXADE */ -}