mirror of
https://github.com/postgres/postgres.git
synced 2025-05-20 00:03:14 -04:00
Change portname "sparc" to "sunos4" and change some portname dependencies to
feature dependencies. Thanks Kurt J. Lidl.
This commit is contained in:
parent
071797f539
commit
9005a38bdb
@ -52,13 +52,12 @@ port/BSD44_derived
|
|||||||
port/aix
|
port/aix
|
||||||
port/alpha
|
port/alpha
|
||||||
port/bsdi
|
port/bsdi
|
||||||
port/bsdi_2_1
|
|
||||||
port/dgux
|
port/dgux
|
||||||
port/hpux
|
port/hpux
|
||||||
port/i386_solaris
|
port/i386_solaris
|
||||||
port/irix5
|
port/irix5
|
||||||
port/linux
|
port/linux
|
||||||
port/sparc
|
port/sunos4
|
||||||
port/sparc_solaris
|
port/sparc_solaris
|
||||||
port/svr4
|
port/svr4
|
||||||
port/ultrix4
|
port/ultrix4
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.75 1996/11/27 08:13:44 bryanh Exp $
|
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.76 1996/12/04 03:05:45 bryanh Exp $
|
||||||
#
|
#
|
||||||
# NOTES
|
# NOTES
|
||||||
# Essentially all Postgres make files include this file and use the
|
# Essentially all Postgres make files include this file and use the
|
||||||
@ -42,7 +42,7 @@
|
|||||||
# hpux HP PA-RISC on HP-UX 9.0
|
# hpux HP PA-RISC on HP-UX 9.0
|
||||||
# i386_solaris i386 Solaris
|
# i386_solaris i386 Solaris
|
||||||
# sparc_solaris SUN SPARC on Solaris 2.4
|
# sparc_solaris SUN SPARC on Solaris 2.4
|
||||||
# sparc SUN SPARC on SunOS 4.1.3
|
# sunos4 SUN SPARC on SunOS 4.1.3
|
||||||
# ultrix4 DEC MIPS on Ultrix 4.4
|
# ultrix4 DEC MIPS on Ultrix 4.4
|
||||||
# linux Intel x86 on Linux 1.2 and Linux ELF
|
# linux Intel x86 on Linux 1.2 and Linux ELF
|
||||||
# (For non-ELF Linux, see LINUX_ELF below).
|
# (For non-ELF Linux, see LINUX_ELF below).
|
||||||
@ -582,7 +582,7 @@ endif
|
|||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
||||||
ifeq ($(PORTNAME), sparc)
|
ifeq ($(PORTNAME), sunos4)
|
||||||
# cc won't work!
|
# cc won't work!
|
||||||
CC= gcc
|
CC= gcc
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* NOTES
|
||||||
* The old interface functions have been converted to macros
|
* The old interface functions have been converted to macros
|
||||||
@ -35,9 +35,9 @@
|
|||||||
|
|
||||||
/* this is so the sparcstation debugger works */
|
/* 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
|
#define register
|
||||||
#endif /* !NO_ASSERT_CHECKING && sparc */
|
#endif /* !NO_ASSERT_CHECKING && sparc && sunos4 */
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* misc support routines
|
* misc support routines
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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:
|
* NOTES:
|
||||||
*
|
*
|
||||||
@ -52,24 +52,20 @@
|
|||||||
#include "utils/palloc.h"
|
#include "utils/palloc.h"
|
||||||
#include "storage/fd.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
|
* the SunOS 4 NOFILE is a lie, because the default limit is *not* the
|
||||||
* maximum number of file descriptors you can have open.
|
* maximum number of file descriptors you can have open.
|
||||||
*
|
*
|
||||||
* we have to either use this number (the default dtablesize) or
|
* we have to either use this number (the default dtablesize) or
|
||||||
* explicitly call setrlimit(RLIMIT_NOFILE, NOFILE).
|
* explicitly call setrlimit(RLIMIT_NOFILE, NOFILE).
|
||||||
|
*
|
||||||
|
* this braindamage apparently also affects solaris 2.X as well
|
||||||
*/
|
*/
|
||||||
#include <sys/user.h>
|
#include <sys/user.h>
|
||||||
#undef NOFILE
|
#undef NOFILE
|
||||||
#define NOFILE NOFILE_IN_U
|
#define NOFILE NOFILE_IN_U
|
||||||
#endif /* sparc */
|
#endif /* NEED_NOFILE_KLUDGE */
|
||||||
|
|
||||||
#if defined(sparc_solaris) || defined(i386_solaris)
|
|
||||||
#include <sys/user.h>
|
|
||||||
#undef NOFILE
|
|
||||||
#define NOFILE 64
|
|
||||||
#endif /* sparc_solaris || i386_solaris */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Problem: Postgres does a system(ld...) to do dynamic loading. This
|
* Problem: Postgres does a system(ld...) to do dynamic loading. This
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* sun3
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (defined(sun3) && ! defined(sparc))
|
#if defined(sun3)
|
||||||
|
|
||||||
void
|
void
|
||||||
S_LOCK(slock_t *lock)
|
S_LOCK(slock_t *lock)
|
||||||
@ -307,13 +307,13 @@ tas_dummy()
|
|||||||
asm(" .data");
|
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 we're using -ansi w/ gcc, use __asm__ instead of asm */
|
||||||
#if defined(__STRICT_ANSI__)
|
#if defined(__STRICT_ANSI__)
|
||||||
@ -375,17 +375,13 @@ S_INIT_LOCK(unsigned char *addr)
|
|||||||
*addr = 0;
|
*addr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* sparc */
|
#endif /* NEED_SPARC_TAS_ASM */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Linux and friends
|
* i386 based things
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(BSD44_derived) || \
|
#if defined(NEED_I386_TAS_ASM)
|
||||||
defined(bsdi) || \
|
|
||||||
defined(bsdi_2_1) || \
|
|
||||||
defined(linux)
|
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
tas(slock_t *m)
|
tas(slock_t *m)
|
||||||
@ -414,7 +410,7 @@ S_INIT_LOCK(slock_t *lock)
|
|||||||
S_UNLOCK(lock);
|
S_UNLOCK(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* linux and friends */
|
#endif /* NEED_I386_TAS_ASM */
|
||||||
|
|
||||||
|
|
||||||
#endif /* HAS_TEST_AND_SET */
|
#endif /* HAS_TEST_AND_SET */
|
||||||
|
4
src/backend/utils/cache/catcache.c
vendored
4
src/backend/utils/cache/catcache.c
vendored
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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:
|
* Notes:
|
||||||
* XXX This needs to use exception.h to handle recovery when
|
* XXX This needs to use exception.h to handle recovery when
|
||||||
@ -740,7 +740,7 @@ SearchSysCache(struct catcache *cache,
|
|||||||
Datum v4)
|
Datum v4)
|
||||||
{
|
{
|
||||||
unsigned hash;
|
unsigned hash;
|
||||||
CatCTup *ct;
|
CatCTup *ct = NULL;
|
||||||
CatCTup *nct;
|
CatCTup *nct;
|
||||||
CatCTup *nct2;
|
CatCTup *nct2;
|
||||||
Dlelem *elt;
|
Dlelem *elt;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
# IDENTIFICATION
|
# IDENTIFICATION
|
||||||
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.15 1996/11/26 07:38:24 bryanh Exp $
|
# $Header: /cvsroot/pgsql/src/bin/psql/Makefile,v 1.16 1996/12/04 03:06:16 bryanh Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ ifeq ($(USE_READLINE), true)
|
|||||||
ifeq ($(PORTNAME), ultrix4)
|
ifeq ($(PORTNAME), ultrix4)
|
||||||
LD_ADD+= -ltermcap
|
LD_ADD+= -ltermcap
|
||||||
else
|
else
|
||||||
ifeq ($(PORTNAME), sparc)
|
ifeq ($(PORTNAME), sunos4)
|
||||||
LD_ADD+= -ltermcap
|
LD_ADD+= -ltermcap
|
||||||
else
|
else
|
||||||
ifeq ($(PORTNAME), linux)
|
ifeq ($(PORTNAME), linux)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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 */
|
#include "port/hpux/fixade.h" /* for 8.07 unaligned access fixup */
|
||||||
#endif /* hpux */
|
#endif /* hpux */
|
||||||
|
|
||||||
#if defined(sparc) && !defined(sparc_solaris)
|
#if defined(sunos4)
|
||||||
#define memmove(d, s, l) bcopy(s, d, l)
|
#define memmove(d, s, l) bcopy(s, d, l)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
# define NEED_SYS_SELECT_H
|
# define NEED_SYS_SELECT_H
|
||||||
# define HAVE_TZSET
|
# define HAVE_TZSET
|
||||||
# define HAVE_ANSI_CPP
|
# define HAVE_ANSI_CPP
|
||||||
|
# define SB_PAD 44
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef unsigned int slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(alpha)
|
#if defined(alpha)
|
||||||
@ -34,18 +37,44 @@
|
|||||||
# define NEED_ISINF
|
# define NEED_ISINF
|
||||||
# define HAS_LONG_LONG
|
# define HAS_LONG_LONG
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
|
# define SB_PAD 40
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef msemaphore slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(BSD44_derived) || \
|
#if defined(BSD44_derived)
|
||||||
defined(bsdi)
|
|
||||||
# define USE_LIMITS_H
|
# define USE_LIMITS_H
|
||||||
# define USE_POSIX_TIME
|
# define USE_POSIX_TIME
|
||||||
# define NEED_CBRT
|
# 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)
|
# if defined(PRE_BSDI_2_1)
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
# endif
|
# endif
|
||||||
|
# define USE_LIMITS_H
|
||||||
|
# define USE_POSIX_TIME
|
||||||
|
# define NEED_CBRT
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef unsigned char slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(dgux)
|
#if defined(dgux)
|
||||||
# define LINUX_ELF
|
# define LINUX_ELF
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
@ -60,6 +89,9 @@
|
|||||||
# define NEED_CBRT
|
# define NEED_CBRT
|
||||||
# define NEED_RINT
|
# define NEED_RINT
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
|
# define SB_PAD 44
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef struct { int sem[4]; } slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(i386_solaris)
|
#if defined(i386_solaris)
|
||||||
@ -71,6 +103,10 @@
|
|||||||
# define HAVE_TZSET
|
# define HAVE_TZSET
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
# define SYSV_DIRENT
|
# define SYSV_DIRENT
|
||||||
|
# define NEED_NOFILE_KLUDGE
|
||||||
|
# define SB_PAD 56
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef unsigned char slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(irix5)
|
#if defined(irix5)
|
||||||
@ -81,6 +117,9 @@
|
|||||||
# define NO_VFORK
|
# define NO_VFORK
|
||||||
# define HAVE_TZSET
|
# define HAVE_TZSET
|
||||||
# define SYSV_DIRENT
|
# define SYSV_DIRENT
|
||||||
|
# define SB_PAD 44
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef abilock_t slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(linux)
|
#if defined(linux)
|
||||||
@ -94,22 +133,24 @@
|
|||||||
# define USE_POSIX_TIME
|
# define USE_POSIX_TIME
|
||||||
# define HAVE_TZSET
|
# define HAVE_TZSET
|
||||||
# define NEED_CBRT
|
# define NEED_CBRT
|
||||||
|
# define NEED_I386_TAS_ASM
|
||||||
|
# define SB_PAD 56
|
||||||
|
# define HAS_TEST_AND_SET
|
||||||
|
typedef unsigned char slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* does anybody use this? */
|
||||||
#if defined(next)
|
#if defined(next)
|
||||||
# define SIGJMP_BUF
|
# define SIGJMP_BUF
|
||||||
# define NEED_SIG_JMP
|
# define NEED_SIG_JMP
|
||||||
|
# define SB_PAD 56
|
||||||
|
typedef struct mutex slock_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(sequent)
|
#if defined(sequent)
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(sparc) && !defined(sparc_solaris)
|
|
||||||
# define USE_POSIX_TIME
|
|
||||||
# undef HAVE_MEMMOVE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(sparc_solaris)
|
#if defined(sparc_solaris)
|
||||||
# define USE_POSIX_TIME
|
# define USE_POSIX_TIME
|
||||||
# define USE_POSIX_SIGNALS
|
# define USE_POSIX_SIGNALS
|
||||||
@ -120,6 +161,15 @@
|
|||||||
# define HAVE_TZSET
|
# define HAVE_TZSET
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
# define SYSV_DIRENT
|
# 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
|
#endif
|
||||||
|
|
||||||
#if defined(svr4)
|
#if defined(svr4)
|
||||||
@ -150,6 +200,7 @@
|
|||||||
# define USE_POSIX_TIME
|
# define USE_POSIX_TIME
|
||||||
# define NEED_UNION_SEMUN
|
# define NEED_UNION_SEMUN
|
||||||
# define NEED_STRDUP
|
# define NEED_STRDUP
|
||||||
|
# define SB_PAD 60
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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
|
* NOTE
|
||||||
* If BUFFERPAGE0 is defined, then 0 will be used as a
|
* 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
|
* going to make some of these types bigger soon anyway... -pma 1/2/93
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* NO spinlock */
|
/*
|
||||||
|
* NOTE: This is now defined in the ..../include/config.h file!
|
||||||
|
*/
|
||||||
|
|
||||||
#if defined(ultrix4)
|
char sb_pad[SB_PAD];
|
||||||
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 */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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
|
* NOTES
|
||||||
* This file is very architecture-specific. This stuff should actually
|
* This file is very architecture-specific. This stuff should actually
|
||||||
@ -24,78 +24,10 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ipc.h> /* For IPC_PRIVATE */
|
#include <sys/ipc.h> /* For IPC_PRIVATE */
|
||||||
|
|
||||||
/*
|
#include <config.h>
|
||||||
* 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
|
|
||||||
|
|
||||||
#if defined(HAS_TEST_AND_SET)
|
#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_LOCK(slock_t *lock);
|
||||||
extern void S_UNLOCK(slock_t *lock);
|
extern void S_UNLOCK(slock_t *lock);
|
||||||
extern void S_INIT_LOCK(slock_t *lock);
|
extern void S_INIT_LOCK(slock_t *lock);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: libpq-fe.h,v 1.13 1996/11/22 04:39:53 bryanh Exp $
|
* $Id: libpq-fe.h,v 1.14 1996/12/04 03:06:33 bryanh Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -298,10 +298,10 @@ typedef void *TUPLE;
|
|||||||
#define palloc malloc
|
#define palloc malloc
|
||||||
#define pfree free
|
#define pfree free
|
||||||
|
|
||||||
#if defined(sparc)
|
#if defined(sunos4)
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
#define strerror(A) (sys_errlist[(A)])
|
#define strerror(A) (sys_errlist[(A)])
|
||||||
#endif /* sparc */
|
#endif /* sunos4 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user