#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/aix/Attic/Makefile.inc,v 1.1.1.1 1996/07/09 06:21:41 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/backend/port/aix/Attic/Makefile.inc,v 1.2 1996/07/22 22:59:27 scrappy Exp $
#
#-------------------------------------------------------------------------
SUBSRCS+= dlfcn.c
+MKLDEXPORT=$(POSTGRESDIR)/src/backend/port/aix/mkldexport.sh
+
${PROG}.exp: ${PROG}.noexp
mv -f $(objdir)/${PROG}.noexp $(objdir)/${PROG}
- $(CURDIR)/port/aix/mkldexport.sh $(objdir)/${PROG} ${BINDIR} > $(objdir)/${PROG}.exp
+ $(MKLDEXPORT) $(objdir)/${PROG} ${BINDIR} > $(objdir)/${PROG}.exp
mv -f $(objdir)/${PROG} $(objdir)/${PROG}.noexp
${PROG}.noexp: ${OBJS}
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.1 1996/07/20 08:34:32 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/backend/port/i386_solaris/Attic/Makefile.inc,v 1.2 1996/07/22 22:59:34 scrappy Exp $
#
#-------------------------------------------------------------------------
LDADD+= -ll -ldl
-SUBSRCS+= port.c
+SUBSRCS+= port.c tas.s
HEADERS+= machine.h port-protos.h rusagestub.h
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: buf_internals.h,v 1.1.1.1 1996/07/09 06:21:52 scrappy Exp $
+ * $Id: buf_internals.h,v 1.2 1996/07/22 22:59:42 scrappy Exp $
*
* NOTE
* If BUFFERPAGE0 is defined, then 0 will be used as a
* It eats up more shared memory, of course, but we're (allegedly)
* going to make some of these types bigger soon anyway... -pma 1/2/93
*/
+
+/* NO spinlock */
+
#if defined(PORTNAME_ultrix4)
char sb_pad[60]; /* no slock_t */
#endif /* mips */
-#if defined(PORTNAME_sparc) || defined(PORTNAME_sparc_solaris) || defined(PORTNAME_irix5)
- char sb_pad[56]; /* has slock_t */
-#endif /* sparc || irix5 */
-#if defined(PORTNAME_hpux)
- char sb_pad[44]; /* has slock_t */
-#endif /* alpha */
+
+/* HAS_TEST_AND_SET -- platform dependent size */
+
+#if defined(PORTNAME_aix)
+ char sb_pad[44]; /* typedef unsigned int slock_t; */
+#endif /* aix */
#if defined(PORTNAME_alpha)
- char sb_pad[40]; /* has slock_t */
+ char sb_pad[40]; /* typedef msemaphore slock_t; */
#endif /* alpha */
+#if defined(PORTNAME_hpux)
+ char sb_pad[44]; /* typedef struct { int sem[4]; } slock_t; */
+#endif /* hpux */
+#if defined(PORTNAME_irix5)
+ char sb_pad[44]; /* typedef abilock_t slock_t; */
+#endif /* irix5 */
+#if defined(PORTNAME_next)
+ char sb_pad[56]; /* typedef struct mutex slock_t; */
+#endif /* next */
+
+/* HAS_TEST_AND_SET -- default 1 byte spinlock */
+
+#if defined(PORTNAME_BSD44_derived) || \
+ defined(PORTNAME_bsdi) || \
+ defined(PORTNAME_i86pc_solaris) || \
+ defined(PORTNAME_linux) || \
+ defined(PORTNAME_sparc) || \
+ defined(PORTNAME_sparc_solaris)
+ char sb_pad[56]; /* has slock_t */
+#endif /* 1 byte slock_t */
};
/*
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Id: fd.c,v 1.3 1996/07/18 04:59:42 scrappy Exp $
+ * $Id: fd.c,v 1.4 1996/07/22 22:59:50 scrappy Exp $
*
* NOTES:
*
#define NOFILE NOFILE_IN_U
#endif /* PORTNAME_sparc */
-#ifdef PORTNAME_sparc_solaris
+#if defined(PORTNAME_sparc_solaris) || defined(PORTNAME_i386_solaris)
#include <sys/user.h>
#undef NOFILE
#define NOFILE 64
-#endif /* PORTNAME_sparc_solaris */
+#endif /* PORTNAME_sparc_solaris || PORTNAME_i386_solaris */
+
/*
* Problem: Postgres does a system(ld...) to do dynamic loading. This
* will open several extra files in addition to those used by
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: ipc.h,v 1.2 1996/07/20 08:35:24 scrappy Exp $
+ * $Id: ipc.h,v 1.3 1996/07/22 22:59:43 scrappy Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
* atomic test-and-set instruction). However, we have only written
* spinlock code for the architectures listed.
*/
-#if (defined(PORTNAME_aix) || \
+#if defined(PORTNAME_aix) || \
defined(PORTNAME_alpha) || \
+ defined(PORTNAME_BSD44_derived) || \
+ defined(PORTNAME_bsdi) || \
defined(PORTNAME_hpux) || \
+ defined(PORTNAME_i386_solaris) || \
defined(PORTNAME_irix5) || \
+ defined(PORTNAME_linux) || \
defined(PORTNAME_next) || \
defined(PORTNAME_sparc) || \
- defined(PORTNAME_sparc_solaris) || \
- (defined(__i386__) && defined(__GNUC__))) && \
- !defined(PORTNAME_i386_solaris)
+ defined(PORTNAME_sparc_solaris)
#define HAS_TEST_AND_SET
#endif
#if defined(HAS_TEST_AND_SET)
-#if defined(PORTNAME_next)
-/*
- * Use Mach mutex routines since these are, in effect, test-and-set
- * spinlocks.
- */
-#undef NEVER /* definition in cthreads.h conflicts with parse.h */
-#include <mach/cthreads.h>
-
-typedef struct mutex slock_t;
-#else /* next */
#if defined(PORTNAME_aix)
/*
* The AIX C library has the cs(3) builtin for compare-and-set that
*/
typedef unsigned int slock_t;
#else /* aix */
+
#if defined(PORTNAME_alpha)
#include <sys/mman.h>
typedef msemaphore slock_t;
#else /* alpha */
+
#if defined(PORTNAME_hpux)
/*
* The PA-RISC "semaphore" for the LDWCX instruction is 4 bytes aligned
*/
typedef struct { int sem[4]; } slock_t;
#else /* hpux */
+
#if defined(PORTNAME_irix5)
#include <abi_mutex.h>
typedef abilock_t slock_t;
#else /* irix5 */
+
+#if defined(PORTNAME_next)
+/*
+ * Use Mach mutex routines since these are, in effect, test-and-set
+ * spinlocks.
+ */
+#undef NEVER /* definition in cthreads.h conflicts with parse.h */
+#include <mach/cthreads.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 */
-#endif /* next */
extern void S_LOCK(slock_t *lock);
extern void S_UNLOCK(slock_t *lock);
extern void S_INIT_LOCK(slock_t *lock);
-#if defined(PORTNAME_hpux) || defined(PORTNAME_alpha) || defined(PORTNAME_irix5) || defined(PORTNAME_next)
+#if defined(PORTNAME_alpha) || \
+ defined(PORTNAME_hpux) || \
+ defined(PORTNAME_irix5) || \
+ defined(PORTNAME_next)
extern int S_LOCK_FREE(slock_t *lock);
-#else /* PORTNAME_hpux */
+#else
#define S_LOCK_FREE(lock) ((*lock) == 0)
-#endif /* PORTNAME_hpux */
+#endif
#endif /* HAS_TEST_AND_SET */
defined(PORTNAME_aix) || \
defined(PORTNAME_alpha) || \
defined(PORTNAME_hpux) || \
+ defined(PORTNAME_i386_solaris) || \
defined(PORTNAME_sparc_solaris) || \
- defined(WIN32) || \
- defined(PORTNAME_ultrix4)
+ defined(PORTNAME_ultrix4) || \
+ defined(WIN32)
union semun {
int val;
struct semid_ds *buf;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.3 1996/07/16 07:13:16 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.4 1996/07/22 23:00:03 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
int
S_LOCK_FREE(slock_t *lock)
{
- /* For Mach, we have to delve inside the entrails of `struct
-mutex'. Ick! */
+/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
return (lock->lock == 0);
}
* Solaris 2
*/
-#if defined(PORTNAME_sparc_solaris)
+#if defined(PORTNAME_i386_solaris) || \
+ defined(PORTNAME_sparc_solaris)
-/* defined in port/.../tas.s */
+/* for xxxxx_solaris, this is defined in port/.../tas.s */
extern int tas(slock_t *lock);
void
S_UNLOCK(lock);
}
-#endif /* PORTNAME_sparc_solaris */
+#endif /* PORTNAME_i86pc_solaris || PORTNAME_sparc_solaris */
/*
* AIX (POWER)
* sun3
*/
-#if (defined(sun) && ! defined(sparc))
+#if (defined(sun3) && ! defined(sparc))
void
S_LOCK(slock_t *lock)
* Linux and friends
*/
-#if defined(PORTNAME_linux) || defined(PORTNAME_BSD44_derived) || defined(PORTNAME_bsdi) || defined(PORTNAME_bsdi_2_1)
-
+#if defined(PORTNAME_BSD44_derived) || \
+ defined(PORTNAME_bsdi) || \
+ defined(PORTNAME_bsdi_2_1) || \
+ defined(PORTNAME_linux)
int
tas(slock_t *m)
S_UNLOCK(lock);
}
-#endif /* PORTNAME_linux || PORTNAME_BSD44_derived || PORTNAME_bsdi || PORTNAME_bsdi_2_1 */
+#endif /* linux and friends */
#endif /* HAS_TEST_AND_SET */
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.3 1996/07/15 19:22:12 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.4 1996/07/22 23:00:18 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
if (write(fd, buffer, BLCKSZ) != BLCKSZ || (pg_fsync(fd) < 0))
#else
if (write(fd, buffer, BLCKSZ) != BLCKSZ || fsync(fd) < 0)
- status = SM_FAIL;
#endif
+ status = SM_FAIL;
if (close(fd) < 0)
status = SM_FAIL;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.3 1996/07/19 06:13:42 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.4 1996/07/22 23:00:26 scrappy Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
static void usage(char* progname)
{
- fprintf(stderr,
- "Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-m portno] [\t -o filename]\n",
- progname);
#ifdef OPENLINK_PATCHES
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
#else
+ fprintf(stderr,
+ "Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-m portno] [\t -o filename]\n",
+ progname);
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLNopQSs] [dbname]\n");
#endif
fprintf(stderr, " b: consider bushy plan trees during optimization\n");
fprintf(stderr, " C: supress version info\n");
fprintf(stderr, " d: set debug level\n");
fprintf(stderr, " E: echo query before execution\n");
- fprintf(stderr, " f: forbid plantype generation\n");
- fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
- fprintf(stderr, " L: turn off locking\n");
#ifdef OPENLINK_PATCHES
fprintf(stderr, " F: turn off fsync\n");
#endif
+ fprintf(stderr, " f: forbid plantype generation\n");
+ fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
+ fprintf(stderr, " L: turn off locking\n");
fprintf(stderr, " m: set up a listening backend at portno to support multiple front-ends\n");
fprintf(stderr, " M: start as postmaster\n");
fprintf(stderr, " N: don't use newline as query delimiter\n");
flagE = 1;
break;
+#ifdef OPENLINK_PATCHES
+ case 'F':
+ /* --------------------
+ * turn off fsync
+ * --------------------
+ */
+ fsyncOff = 1;
+ break;
+#endif
+
case 'f':
/* -----------------
* f - forbid generation of certain plans
*/
lockingOff = 1;
break;
-
-#ifdef OPENLINK_PATCHES
- case 'F':
- /* --------------------
- * turn off fsync
- * --------------------
- */
- fsyncOff = 1;
- break;
-#endif
-
+
case 'm':
/* start up a listening backend that can respond to
multiple front-ends. (Note: all the front-end connections
*/
if (IsUnderPostmaster == false) {
puts("\nPOSTGRES backend interactive interface");
- puts("$Revision: 1.3 $ $Date: 1996/07/19 06:13:42 $");
+ puts("$Revision: 1.4 $ $Date: 1996/07/22 23:00:26 $");
}
/* ----------------