summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/access/heapam.h6
-rw-r--r--src/include/c.h14
-rw-r--r--src/include/config.h.in2
-rw-r--r--src/include/libpq/pqcomm.h10
4 files changed, 22 insertions, 10 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index cb9765c6d5a..3e6e8687805 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.24 1998/01/25 05:04:21 scrappy Exp $
+ * $Id: heapam.h,v 1.25 1998/01/27 15:35:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -101,10 +101,10 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
#define heap_getattr(tup, b, attnum, tupleDesc, isnull) \
(AssertMacro((tup) != NULL) ? \
((attnum) > (int) (tup)->t_natts) ? \
- (((isnull) ? (*(isnull) = true) : (void)NULL), (Datum)NULL) : \
+ (((isnull) ? (*(isnull) = true) : dummyretNULL), (Datum)NULL) : \
((attnum) > 0) ? \
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \
- (((isnull) ? (*(isnull) = false) : (void)NULL), heap_getsysattr((tup), (b), (attnum))) : \
+ (((isnull) ? (*(isnull) = false) : dummyretNULL), heap_getsysattr((tup), (b), (attnum))) : \
(Datum)NULL)
extern HeapAccessStatistics heap_access_stats; /* in stats.c */
diff --git a/src/include/c.h b/src/include/c.h
index 549f3481a68..d031f814e45 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.29 1998/01/26 01:41:49 scrappy Exp $
+ * $Id: c.h,v 1.30 1998/01/27 15:35:00 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -182,7 +182,17 @@ typedef char *Pointer;
#endif /* !HAVE_ANSI_CPP */
#ifndef __GNUC__ /* GNU cc */
+#endif
+
+#ifndef __GNUC__ /* GNU cc */
#define inline
+/*
+ * dummyret is used to set return values in macros that use ?: to make
+ * assignments. gcc wants these to be void, other compilers like char
+ */
+#define dummyret char
+#else
+#define dummyret void
#endif
#if defined(NEED_STD_HDRS)
@@ -693,7 +703,7 @@ typedef struct Exception
*/
/* we do this so if the macro is used in an if action, it will work */
#define StrNCpy(dst,src,len) \
- (strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : (void)NULL,(void)(dst))
+ (strncpy((dst),(src),(len)),(len > 0) ? *((dst)+(len)-1)='\0' : (dummyret)NULL,(void)(dst))
/* Get a bit mask of the bits set in non-int32 aligned addresses */
#define INT_ALIGN_MASK (sizeof(int32) - 1)
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 9c0b1829c1f..521790528f6 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -216,8 +216,6 @@ extern void srandom(int seed);
* number of seconds.
* We don't check for deadlocks just before sleeping because a deadlock is
* a rare event, and checking is an expensive operation.
- * We only detect deadlocks between two processes, not three or more, but
- * these are the most common.
*/
#define DEADLOCK_CHECK_TIMER 60
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index 2a344594331..b3b67f8b73b 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.20 1998/01/27 04:08:28 momjian Exp $
+ * $Id: pqcomm.h,v 1.21 1998/01/27 15:35:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -35,8 +35,12 @@ typedef union SockAddr {
#define UNIXSOCK_PATH(sun,port) \
(sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)) + \
- sizeof ((sun).sun_len) + sizeof ((sun).sun_family))
-
+ + 1 + sizeof ((sun).sun_family))
+/*
+ * + 1 is for BSD-specific sizeof((sun).sun_len)
+ * We never actually set sun_len, and I can't think of a
+ * platform-safe way of doing it, but the code still works. bjm
+ */
/*
* These manipulate the frontend/backend protocol version number.