summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorBruce Momjian2000-10-07 14:39:21 +0000
committerBruce Momjian2000-10-07 14:39:21 +0000
commit7ea8403c8a7325a7e019a2cee17315df91955fdf (patch)
tree91c8d7a6a65fb696d1f4de85e85cc571a7afb8a9 /src/include
parenta759460178c22ece2cc95cfc0d18e2e9631c2499 (diff)
The beos port in the source tree doesn't even compile. and even
after that dynamic loading isn't working and shared memory handling is broken. Attached with this message, there is a Zip file which contain : * beos.diff = patch file generated with difforig * beos = folder with beos support files which need to be moved in / src/backend/port * expected = foler with three file for message and precision difference in regression test * regression.diff = rule problem (need to kill the backend manualy) * dynloader = dynloader files (they are also in the pacth files, but there is so much modification that I have join full files) Everything works except a problem in 'rules' Is there some problems with rules in the current tree ? It used to works with last week tree. Cyril VELTER
Diffstat (limited to 'src/include')
-rw-r--r--src/include/config.h.in4
-rw-r--r--src/include/port/beos.h64
-rw-r--r--src/include/storage/ipc.h7
3 files changed, 67 insertions, 8 deletions
diff --git a/src/include/config.h.in b/src/include/config.h.in
index 412db86ac28..1740cf4be65 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.140 2000/10/03 19:50:21 petere Exp $
+ * $Id: config.h.in,v 1.141 2000/10/07 14:39:16 momjian Exp $
*/
#ifndef CONFIG_H
@@ -227,7 +227,7 @@
* Define this is your operating system kernel supports AF_UNIX family
* sockets.
*/
-#if !defined(__CYGWIN__) && !defined(__QNX__)
+#if !defined(__CYGWIN__) && !defined(__QNX__) && !defined(__BEOS__)
# define HAVE_UNIX_SOCKETS 1
#endif
diff --git a/src/include/port/beos.h b/src/include/port/beos.h
index 401426c5f22..60f46e3b9c5 100644
--- a/src/include/port/beos.h
+++ b/src/include/port/beos.h
@@ -6,4 +6,68 @@ typedef unsigned char slock_t;
#define AF_UNIX 1 /* no domain sockets on BeOS */
+#ifdef __cplusplus
+extern "C" {
+#endif
+ #include "kernel/image.h"
+
+ #undef HAVE_UNION_SEMUN
+ #define HAVE_UNION_SEMUN 1
+ #undef HAVE_SYS_SEM_H
+ #undef HAVE_SYS_SHM_H
+ union semun
+ {
+ int val;
+ struct semid_ds *buf;
+ unsigned short *array;
+ };
+ /* SYS V emulation */
+
+ #define IPC_RMID 256
+ #define IPC_CREAT 512
+ #define IPC_EXCL 1024
+ #define IPC_PRIVATE 234564
+
+ #define EACCESS 2048
+ #define EIDRM 4096
+
+ #define SETALL 8192
+ #define GETNCNT 16384
+ #define GETVAL 65536
+ #define SETVAL 131072
+
+ struct sembuf
+ {
+ int sem_flg;
+ int sem_op;
+ int sem_num;
+ };
+
+ int semctl(int semId,int semNum,int flag,union semun);
+ int semget(int semKey, int semNum, int flags);
+ int semop(int semId, struct sembuf *sops, int flag);
+
+ struct shmid_ds
+ {
+ int dummy;
+ };
+
+ int shmdt(char* shmaddr);
+ int* shmat(int memId,int m1,int m2);
+ int shmctl(int shmid,int flag, struct shmid_ds* dummy);
+ int shmget(int memKey,int size,int flag);
+
+
+ /* Support functions */
+ /* Specific beos action made on postgres/postmaster startup */
+ void beos_startup(int argc,char** argv);
+ /* Load a shared library */
+ image_id beos_dl_open(char * filename);
+ /* UnLoad a shared library */
+ status_t beos_dl_close(image_id im);
+ /* Specific beos action made on backend startup */
+ void beos_backend_startup(char* binary);
+#ifdef __cplusplus
+}
+#endif \ No newline at end of file
diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h
index 04cd86d3cb4..eea082a574e 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.41 2000/10/03 03:11:24 momjian Exp $
+ * $Id: ipc.h,v 1.42 2000/10/07 14:39:17 momjian Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
@@ -27,11 +27,6 @@
#include <sys/types.h>
#ifdef HAVE_SYS_IPC_H
#include <sys/ipc.h> /* For IPC_PRIVATE */
-#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"