summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian1998-08-22 04:24:41 +0000
committerBruce Momjian1998-08-22 04:24:41 +0000
commita738478ad8319bb4761dc53dfe700cb1fe87000e (patch)
tree15bde54505ecbcb01eb6db417f4ae1ebd8e6782c /src/include
parent9005da08def354e0b23e3bca4ec500c41eb142e7 (diff)
Here are additional patches for the UnixWare 7 port.
Summary of changes: In pqcomm.h, use the SUN_LEN macro if it is defined to calculate the size of the sockaddr_un structure. In unixware.h, drop the use of the UNIXWARE macro. Everything can be handled with the USE_UNIVEL_CC and DISABLE_COMPLEX_MACRO macros. In s_lock.h, remove the reference to the UNIXWARE macro (see above). In the unixware template, add the YFLAGS:-d line. In various makefile templates, add (or cleanup) unixware and univel port specific information. -- Billy G. Allie
Diffstat (limited to 'src/include')
-rw-r--r--src/include/libpq/pqcomm.h7
-rw-r--r--src/include/port/unixware.h6
-rw-r--r--src/include/storage/s_lock.h6
3 files changed, 14 insertions, 5 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index 98d4ad0350..a9bb120552 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.26 1998/07/09 03:29:01 scrappy Exp $
+ * $Id: pqcomm.h,v 1.27 1998/08/22 04:24:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,9 +34,14 @@ typedef union SockAddr
/* Configure the UNIX socket address for the well known port. */
+#if defined(SUN_LEN)
+#define UNIXSOCK_PATH(sun,port) \
+ (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), SUN_LEN(&(sun)))
+#else
#define UNIXSOCK_PATH(sun,port) \
(sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)), \
strlen((sun).sun_path)+ offsetof(struct sockaddr_un, sun_path))
+#endif
/*
* We do this because sun_len is in BSD's struct, while others don't.
diff --git a/src/include/port/unixware.h b/src/include/port/unixware.h
index e552202f5f..c52b9b0948 100644
--- a/src/include/port/unixware.h
+++ b/src/include/port/unixware.h
@@ -5,13 +5,17 @@
#define HAS_TEST_AND_SET
#define NEED_I386_TAS_ASM
+
/***************************************
* Define this if you are compiling with
* the native UNIXWARE C compiler.
***************************************/
-#define UNIXWARE
+#define USE_UNIVEL_CC
+
typedef unsigned char slock_t;
+#define DISABLE_COMPLEX_MACRO
+
/***************************************************************
* The following include will get the needed prototype for the
* strcasecmp() function.
diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h
index c48153deef..37eb40a2bf 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.43 1998/07/20 17:45:49 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.44 1998/08/22 04:24:21 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -188,7 +188,7 @@ tas(volatile slock_t *lock)
#if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */
-#if defined(USE_UNIVEL_CC) || defined(UNIXWARE)
+#if defined(USE_UNIVEL_CC)
#define TAS(lock) tas(lock)
asm int
@@ -203,7 +203,7 @@ tas(slock_t *s_lock)
popl %ebx
}
-#endif /* USE_UNIVEL_CC || UNIXWARE */
+#endif /* USE_UNIVEL_CC */
#endif /* NEED_I386_TAS_ASM */