summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian2000-10-03 03:11:26 +0000
committerBruce Momjian2000-10-03 03:11:26 +0000
commit87c0e623ba14c2de376ca9af06fb21da7b2c2215 (patch)
treee67887aaff9248f2e0c866566ed0b2967cabaae2 /src/include
parentde1af06287dd0b169385b0756074a0b24feb123c (diff)
New diff that now covers the entire tree. Applying this gets postgresql
working on the VERY latest version of BeOS. I'm sure there will be alot of comments, but then if there weren't I'd be disappointed! Thanks for your continuing efforts to get this into your tree. Haven't bothered with the new files as they haven't changed. BTW Peter, the compiler is "broken" about the bool define and so on. I'm filing a bug report to try and get it addressed. Hopefully then we can tidy up the code a bit. I await the replies with interest :) David Reid
Diffstat (limited to 'src/include')
-rw-r--r--src/include/c.h23
-rw-r--r--src/include/config.h.in21
-rw-r--r--src/include/port/beos.h3
-rw-r--r--src/include/storage/ipc.h11
4 files changed, 39 insertions, 19 deletions
diff --git a/src/include/c.h b/src/include/c.h
index fcef4a0ff30..b38f2b96e1e 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.83 2000/10/02 17:15:55 momjian Exp $
+ * $Id: c.h,v 1.84 2000/10/03 03:11:22 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,7 +56,7 @@
#include <errno.h>
#include <sys/fcntl.h> /* ensure O_BINARY is available */
#endif
-#ifdef __BEOS__
+#ifdef HAVE_SUPPORTDEFS_H
#include <SupportDefs.h>
#endif
@@ -69,7 +69,11 @@
* Boolean value, either true or false.
*
*/
-#ifndef __BEOS__
+
+/* BeOS defines bool already, but the compiler chokes on the
+ * #ifndef unless we wrap it in this check.
+ */
+#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
@@ -170,24 +174,22 @@ typedef char *Pointer;
* used for numerical computations and the
* frontend/backend protocol.
*/
-#ifndef __BEOS__
+#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef signed char int8; /* == 8 bits */
typedef signed short int16; /* == 16 bits */
typedef signed int int32; /* == 32 bits */
#endif /* __BEOS__ */
-
/*
* uintN
* Unsigned integer, EXACTLY N BITS IN SIZE,
* used for numerical computations and the
* frontend/backend protocol.
*/
-#ifndef __BEOS__
+#ifndef __BEOS__ /* this shouldn't be required, but is is! */
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* __BEOS__ */
-
/*
* floatN
* Floating point number, AT LEAST N BITS IN SIZE,
@@ -268,8 +270,7 @@ typedef int32 int4;
typedef float float4;
typedef double float8;
-/* BeOS already has int64 defined, so skip these... */
-#ifndef BEOS
+#ifndef __BEOS__ /* this is already defined on BeOS */
#ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */
typedef long int int64;
@@ -283,9 +284,7 @@ typedef long int int64;
#define INT64_IS_BUSTED
#endif
#endif
-#else /* Add BeOS support */
-#include <SupportDefs.h>
-#endif /* BEOS */
+#endif /* __BEOS__ */
/* ----------------------------------------------------------------
* Section 4: datum type + support macros
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 86b9623995e..bb53769b004 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: config.h.in,v 1.138 2000/10/02 17:15:55 momjian Exp $
+ * $Id: config.h.in,v 1.139 2000/10/03 03:11:23 momjian Exp $
*/
#ifndef CONFIG_H
@@ -342,15 +342,30 @@
/* Set to 1 if you have <readline/readline.h> */
#undef HAVE_READLINE_READLINE_H
-/* Define if you have <sys/ipc.h> */
+/* Set to 1 if you have <sys/ipc.h> */
#undef HAVE_SYS_IPC_H
/* Set to 1 if you have <sys/select.h> */
#undef HAVE_SYS_SELECT_H
-/* Set to 1 if you have <sys/un.h> */
+/* Set to 1 if you have <sys/un.h> */
#undef HAVE_SYS_UN_H
+/* Set to 1 if you have <sys/sem.h> */
+#undef HAVE_SYS_SEM_H
+
+/* Set to 1 if you have <sys/shm.h> */
+#undef HAVE_SYS_SHM_H
+
+/* Set to 1 if you have <kernel/OS.h> */
+#undef HAVE_KERNEL_OS_H
+
+/* Set to 1 if you have <SupportDefs.h> */
+#undef HAVE_SUPPORTDEFS_H
+
+/* Set to 1 if you have <kernel/image.h> */
+#undef HAVE_KERNEL_IMAGE_H
+
/* Set to 1 if you have <termios.h> */
#undef HAVE_TERMIOS_H
diff --git a/src/include/port/beos.h b/src/include/port/beos.h
index c7b33efecb9..401426c5f22 100644
--- a/src/include/port/beos.h
+++ b/src/include/port/beos.h
@@ -4,7 +4,6 @@
typedef unsigned char slock_t;
-#define AF_UNIX 1
-#define IPPROTO_IP 0
+#define AF_UNIX 1 /* no domain sockets on BeOS */
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 85dfe03ceb1..04cd86d3cb4 100644
--- a/src/include/storage/ipc.h
+++ b/src/include/storage/ipc.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: ipc.h,v 1.40 2000/10/02 19:42:56 petere Exp $
+ * $Id: ipc.h,v 1.41 2000/10/03 03:11:24 momjian Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
@@ -27,7 +27,14 @@
#include <sys/types.h>
#ifdef HAVE_SYS_IPC_H
#include <sys/ipc.h> /* For IPC_PRIVATE */
-#endif
+#else
+/* BeOS doesn't have IPC_PRIVATE so we'll use the value that is set by
+ * FreeBSD (1)
+ */
+#define IPC_PRIVATE 1
+#endif /* HAVE_SYS_IPC_H */
+
+#include "config.h"
#ifndef HAVE_UNION_SEMUN
union semun