aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/access/common/heaptuple.c6
-rw-r--r--src/backend/storage/file/fd.c14
-rw-r--r--src/backend/storage/ipc/s_lock.c22
-rw-r--r--src/backend/utils/cache/catcache.c4
4 files changed, 19 insertions, 27 deletions
diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c
index b516e5beaba..ccaaba60333 100644
--- a/src/backend/access/common/heaptuple.c
+++ b/src/backend/access/common/heaptuple.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.16 1996/11/10 02:56:41 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.17 1996/12/04 03:05:55 bryanh Exp $
*
* NOTES
* The old interface functions have been converted to macros
@@ -35,9 +35,9 @@
/* this is so the sparcstation debugger works */
-#if !defined(NO_ASSERT_CHECKING) && defined(sparc)
+#if !defined(NO_ASSERT_CHECKING) && defined(sparc) && defined(sunos4)
#define register
-#endif /* !NO_ASSERT_CHECKING && sparc */
+#endif /* !NO_ASSERT_CHECKING && sparc && sunos4 */
/* ----------------------------------------------------------------
* misc support routines
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index d112c989f73..d02ffcf19f9 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Id: fd.c,v 1.9 1996/11/08 05:58:21 momjian Exp $
+ * $Id: fd.c,v 1.10 1996/12/04 03:05:58 bryanh Exp $
*
* NOTES:
*
@@ -52,24 +52,20 @@
#include "utils/palloc.h"
#include "storage/fd.h"
-#ifdef sparc
+#if defined(NEED_NOFILE_KLUDGE)
/*
* the SunOS 4 NOFILE is a lie, because the default limit is *not* the
* maximum number of file descriptors you can have open.
*
* we have to either use this number (the default dtablesize) or
* explicitly call setrlimit(RLIMIT_NOFILE, NOFILE).
+ *
+ * this braindamage apparently also affects solaris 2.X as well
*/
#include <sys/user.h>
#undef NOFILE
#define NOFILE NOFILE_IN_U
-#endif /* sparc */
-
-#if defined(sparc_solaris) || defined(i386_solaris)
-#include <sys/user.h>
-#undef NOFILE
-#define NOFILE 64
-#endif /* sparc_solaris || i386_solaris */
+#endif /* NEED_NOFILE_KLUDGE */
/*
* Problem: Postgres does a system(ld...) to do dynamic loading. This
diff --git a/src/backend/storage/ipc/s_lock.c b/src/backend/storage/ipc/s_lock.c
index 76e4ea7cc68..68cda576743 100644
--- a/src/backend/storage/ipc/s_lock.c
+++ b/src/backend/storage/ipc/s_lock.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.8 1996/11/10 03:02:26 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.9 1996/12/04 03:06:04 bryanh Exp $
*
*-------------------------------------------------------------------------
*/
@@ -266,7 +266,7 @@ S_LOCK_FREE(slock_t *lock)
* sun3
*/
-#if (defined(sun3) && ! defined(sparc))
+#if defined(sun3)
void
S_LOCK(slock_t *lock)
@@ -307,13 +307,13 @@ tas_dummy()
asm(" .data");
}
-#endif
+#endif /* sun3 */
/*
- * SPARC (SunOS 4)
+ * sparc machines
*/
-#if defined(sparc) && !defined(sparc_solaris)
+#if defined(NEED_SPARC_TAS_ASM)
/* if we're using -ansi w/ gcc, use __asm__ instead of asm */
#if defined(__STRICT_ANSI__)
@@ -375,18 +375,14 @@ S_INIT_LOCK(unsigned char *addr)
*addr = 0;
}
-#endif /* sparc */
+#endif /* NEED_SPARC_TAS_ASM */
/*
- * Linux and friends
+ * i386 based things
*/
-#if defined(BSD44_derived) || \
- defined(bsdi) || \
- defined(bsdi_2_1) || \
- defined(linux)
+#if defined(NEED_I386_TAS_ASM)
-
int
tas(slock_t *m)
{
@@ -414,7 +410,7 @@ S_INIT_LOCK(slock_t *lock)
S_UNLOCK(lock);
}
-#endif /* linux and friends */
+#endif /* NEED_I386_TAS_ASM */
#endif /* HAS_TEST_AND_SET */
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index aa3616390c4..6cba6487512 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.5 1996/11/13 20:50:04 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.6 1996/12/04 03:06:09 bryanh Exp $
*
* Notes:
* XXX This needs to use exception.h to handle recovery when
@@ -740,7 +740,7 @@ SearchSysCache(struct catcache *cache,
Datum v4)
{
unsigned hash;
- CatCTup *ct;
+ CatCTup *ct = NULL;
CatCTup *nct;
CatCTup *nct2;
Dlelem *elt;