aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-10-02 15:38:04 +0000
committerBruce Momjian <bruce@momjian.us>1998-10-02 15:38:04 +0000
commit9b7c6ee00b7935f94ab1142c0ee04d326e5f16ec (patch)
treed07b28e9ffd0cb0e1a65a5f02f98d1cf21400508
parent731ea8076f0c7d46496f95d227a2102c83ed5438 (diff)
downloadpostgresql-9b7c6ee00b7935f94ab1142c0ee04d326e5f16ec.tar.gz
postgresql-9b7c6ee00b7935f94ab1142c0ee04d326e5f16ec.zip
Fixes for Irix from Robert Bruccoleri
-rw-r--r--src/backend/port/snprintf.c7
-rw-r--r--src/include/port/irix5.h3
-rw-r--r--src/include/storage/s_lock.h9
3 files changed, 12 insertions, 7 deletions
diff --git a/src/backend/port/snprintf.c b/src/backend/port/snprintf.c
index bd421329a92..f0546692483 100644
--- a/src/backend/port/snprintf.c
+++ b/src/backend/port/snprintf.c
@@ -48,6 +48,9 @@
# include <sys/ioctl.h>
# include <sys/param.h>
+/* IRIX doesn't do 'long long' in va_arg(), so use a typedef */
+typedef long long long_long;
+
/*
** SNPRINTF, VSNPRINT -- counted versions of printf
**
@@ -70,7 +73,7 @@
* causing nast effects.
**************************************************************/
-/*static char _id[] = "$Id: snprintf.c,v 1.7 1998/09/23 03:11:24 scrappy Exp $";*/
+/*static char _id[] = "$Id: snprintf.c,v 1.8 1998/10/02 15:38:01 momjian Exp $";*/
static char *end;
static int SnprfOverflow;
@@ -192,7 +195,7 @@ dopr (char *buffer, const char *format, ... )
case 'd': case 'D':
if( longflag ){
if( longlongflag ) {
- value = va_arg( args, long long );
+ value = va_arg( args, long_long );
} else {
value = va_arg( args, long );
}
diff --git a/src/include/port/irix5.h b/src/include/port/irix5.h
index 83c7837584f..f8f180d7dc2 100644
--- a/src/include/port/irix5.h
+++ b/src/include/port/irix5.h
@@ -3,5 +3,4 @@
#define NO_EMPTY_STMTS
#define SYSV_DIRENT
#define HAS_TEST_AND_SET
-#include <abi_mutex.h>
-typedef abilock_t slock_t;
+typedef unsigned long slock_t;
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index b094ed8fb8d..bc8fb9402cd 100644
--- a/src/include/storage/s_lock.h
+++ b/src/include/storage/s_lock.h
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.52 1998/10/02 15:23:08 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.53 1998/10/02 15:38:04 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -261,8 +261,11 @@ tas(slock_t *s_lock)
#if defined(__sgi)
/*
* SGI IRIX 5
- * slock_t is defined as a struct abilock_t, which has a single unsigned long
- * member.
+ * slock_t is defined as a unsigned long. We use the standard SGI
+ * mutex API.
+ *
+ * The following comment is left for historical reasons, but is probably
+ * not a good idea since the mutex ABI is supported.
*
* This stuff may be supplemented in the future with Masato Kataoka's MIPS-II
* assembly from his NECEWS SVR4 port, but we probably ought to retain this