aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBryan Henderson <bryanh@giraffe.netgate.net>1996-12-04 03:06:33 +0000
committerBryan Henderson <bryanh@giraffe.netgate.net>1996-12-04 03:06:33 +0000
commit9005a38bdb01bf3294bd9e30e645f00a6d569cd9 (patch)
treec01b8db168d720c8f3377cf7874604f36b6bd340 /src/include
parent071797f53942e3c2063e031803a91463a68f4d2a (diff)
downloadpostgresql-9005a38bdb01bf3294bd9e30e645f00a6d569cd9.tar.gz
postgresql-9005a38bdb01bf3294bd9e30e645f00a6d569cd9.zip
Change portname "sparc" to "sunos4" and change some portname dependencies to
feature dependencies. Thanks Kurt J. Lidl.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h4
-rw-r--r--src/include/config.h65
-rw-r--r--src/include/storage/buf_internals.h41
-rw-r--r--src/include/storage/ipc.h72
4 files changed, 68 insertions, 114 deletions
diff --git a/src/include/c.h b/src/include/c.h
index a4ba01ad3b9..1ba94d04a6c 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.4 1996/11/14 06:06:39 bryanh Exp $
+ * $Id: c.h,v 1.5 1996/12/04 03:06:21 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@@ -747,7 +747,7 @@ extern char *form(char *fmt, ...);
#include "port/hpux/fixade.h" /* for 8.07 unaligned access fixup */
#endif /* hpux */
-#if defined(sparc) && !defined(sparc_solaris)
+#if defined(sunos4)
#define memmove(d, s, l) bcopy(s, d, l)
#endif
diff --git a/src/include/config.h b/src/include/config.h
index b51e4b0ae70..f28a51c0127 100644
--- a/src/include/config.h
+++ b/src/include/config.h
@@ -25,6 +25,9 @@
# define NEED_SYS_SELECT_H
# define HAVE_TZSET
# define HAVE_ANSI_CPP
+# define SB_PAD 44
+# define HAS_TEST_AND_SET
+ typedef unsigned int slock_t;
#endif
#if defined(alpha)
@@ -34,18 +37,44 @@
# define NEED_ISINF
# define HAS_LONG_LONG
# define NEED_UNION_SEMUN
+# define SB_PAD 40
+# define HAS_TEST_AND_SET
+ typedef msemaphore slock_t;
#endif
-#if defined(BSD44_derived) || \
- defined(bsdi)
+#if defined(BSD44_derived)
# define USE_LIMITS_H
# define USE_POSIX_TIME
# define NEED_CBRT
+# define NEED_I386_TAS_ASM
+# define SB_PAD 56
+# define HAS_TEST_AND_SET
+# if defined(__mips__)
+# undef HAS_TEST_AND_SET
+# endif
+ typedef unsigned char slock_t;
+#endif
+
+#if defined(bsdi)
+# if defined(i386)
+# define NEED_I386_TAS_ASM
+# define SB_PAD 56
+# endif
+# if defined(sparc)
+# define NEED_SPARC_TAS_ASM
+# define SB_PAD 56
+# endif
# if defined(PRE_BSDI_2_1)
# define NEED_UNION_SEMUN
# endif
+# define USE_LIMITS_H
+# define USE_POSIX_TIME
+# define NEED_CBRT
+# define HAS_TEST_AND_SET
+ typedef unsigned char slock_t;
#endif
+
#if defined(dgux)
# define LINUX_ELF
# define NEED_UNION_SEMUN
@@ -60,6 +89,9 @@
# define NEED_CBRT
# define NEED_RINT
# define NEED_UNION_SEMUN
+# define SB_PAD 44
+# define HAS_TEST_AND_SET
+ typedef struct { int sem[4]; } slock_t;
#endif
#if defined(i386_solaris)
@@ -71,6 +103,10 @@
# define HAVE_TZSET
# define NEED_UNION_SEMUN
# define SYSV_DIRENT
+# define NEED_NOFILE_KLUDGE
+# define SB_PAD 56
+# define HAS_TEST_AND_SET
+ typedef unsigned char slock_t;
#endif
#if defined(irix5)
@@ -81,6 +117,9 @@
# define NO_VFORK
# define HAVE_TZSET
# define SYSV_DIRENT
+# define SB_PAD 44
+# define HAS_TEST_AND_SET
+ typedef abilock_t slock_t;
#endif
#if defined(linux)
@@ -94,22 +133,24 @@
# define USE_POSIX_TIME
# define HAVE_TZSET
# define NEED_CBRT
+# define NEED_I386_TAS_ASM
+# define SB_PAD 56
+# define HAS_TEST_AND_SET
+ typedef unsigned char slock_t;
#endif
+/* does anybody use this? */
#if defined(next)
# define SIGJMP_BUF
# define NEED_SIG_JMP
+# define SB_PAD 56
+ typedef struct mutex slock_t;
#endif
#if defined(sequent)
# define NEED_UNION_SEMUN
#endif
-#if defined(sparc) && !defined(sparc_solaris)
-# define USE_POSIX_TIME
-# undef HAVE_MEMMOVE
-#endif
-
#if defined(sparc_solaris)
# define USE_POSIX_TIME
# define USE_POSIX_SIGNALS
@@ -120,6 +161,15 @@
# define HAVE_TZSET
# define NEED_UNION_SEMUN
# define SYSV_DIRENT
+# define NEED_NOFILE_KLUDGE
+# define SB_PAD 56
+#endif
+
+#if defined(sunos4)
+# define USE_POSIX_TIME
+# define NEED_NOFILE_KLUDGE
+# define SB_PAD 56
+# undef HAVE_MEMMOVE
#endif
#if defined(svr4)
@@ -150,6 +200,7 @@
# define USE_POSIX_TIME
# define NEED_UNION_SEMUN
# define NEED_STRDUP
+# define SB_PAD 60
#endif
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index af7a57d0d9a..963c887ebc8 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf_internals.h,v 1.6 1996/11/10 03:05:53 momjian Exp $
+ * $Id: buf_internals.h,v 1.7 1996/12/04 03:06:27 bryanh Exp $
*
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
@@ -130,40 +130,11 @@ struct sbufdesc {
* going to make some of these types bigger soon anyway... -pma 1/2/93
*/
-/* NO spinlock */
-
-#if defined(ultrix4)
- char sb_pad[60]; /* no slock_t */
-#endif /* mips */
-
-/* HAS_TEST_AND_SET -- platform dependent size */
-
-#if defined(aix)
- char sb_pad[44]; /* typedef unsigned int slock_t; */
-#endif /* aix */
-#if defined(alpha)
- char sb_pad[40]; /* typedef msemaphore slock_t; */
-#endif /* alpha */
-#if defined(hpux)
- char sb_pad[44]; /* typedef struct { int sem[4]; } slock_t; */
-#endif /* hpux */
-#if defined(irix5)
- char sb_pad[44]; /* typedef abilock_t slock_t; */
-#endif /* irix5 */
-#if defined(next)
- char sb_pad[56]; /* typedef struct mutex slock_t; */
-#endif /* next */
-
-/* HAS_TEST_AND_SET -- default 1 byte spinlock */
-
-#if defined(BSD44_derived) || \
- defined(bsdi) || \
- defined(i386_solaris) || \
- defined(linux) || \
- defined(sparc) || \
- defined(sparc_solaris)
- char sb_pad[56]; /* has slock_t */
-#endif /* 1 byte slock_t */
+ /*
+ * NOTE: This is now defined in the ..../include/config.h file!
+ */
+
+ char sb_pad[SB_PAD];
};
/*
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 1fc38b81b82..85f24cecb27 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ipc.h,v 1.10 1996/11/27 08:16:38 bryanh Exp $
+ * $Id: ipc.h,v 1.11 1996/12/04 03:06:29 bryanh Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
@@ -24,78 +24,10 @@
#include <sys/types.h>
#include <sys/ipc.h> /* For IPC_PRIVATE */
-/*
- * Many architectures have support for user-level spinlocks (i.e., an
- * atomic test-and-set instruction). However, we have only written
- * spinlock code for the architectures listed.
- * NB: for operating systems like NetBSD (covered by BSD44_derived),
- * we may in fact have different architectures, thus make the tests
- * based on portnames somewhat misleading.
- */
-#if defined(aix) || \
- defined(alpha) || \
- defined(BSD44_derived) || \
- defined(bsdi) || \
- defined(hpux) || \
- defined(i386_solaris) || \
- defined(irix5) || \
- defined(linux) || \
- defined(next) || \
- defined(sparc) || \
- defined(sparc_solaris)
-#define HAS_TEST_AND_SET
-#endif
-
-#if defined(BSD44_derived) && defined(__mips__)
-#undef HAS_TEST_AND_SET
-#endif
+#include <config.h>
#if defined(HAS_TEST_AND_SET)
-#if defined(aix)
-/*
- * The AIX C library has the cs(3) builtin for compare-and-set that
- * operates on ints.
- */
-typedef unsigned int slock_t;
-#else /* aix */
-
-#if defined(alpha)
-typedef msemaphore slock_t;
-#else /* alpha */
-
-#if defined(hpux)
-/*
- * The PA-RISC "semaphore" for the LDWCX instruction is 4 bytes aligned
- * to a 16-byte boundary.
- */
-typedef struct { int sem[4]; } slock_t;
-#else /* hpux */
-
-#if defined(irix5)
-typedef abilock_t slock_t;
-#else /* irix5 */
-
-#if defined(next)
-/*
- * Use Mach mutex routines since these are, in effect, test-and-set
- * spinlocks.
- */
-#undef NEVER /* definition in cthreads.h conflicts with parse.h */
-typedef struct mutex slock_t;
-#else /* next */
-
-/*
- * On all other architectures spinlocks are a single byte.
- */
-typedef unsigned char slock_t;
-
-#endif /* next */
-#endif /* irix5 */
-#endif /* hpux */
-#endif /* alpha */
-#endif /* aix */
-
extern void S_LOCK(slock_t *lock);
extern void S_UNLOCK(slock_t *lock);
extern void S_INIT_LOCK(slock_t *lock);