From 97d50e12b9655fe36190af92e7492a9c375ca5a3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 27 May 2009 23:36:55 +0000 Subject: [PATCH] - compile fixes for Haiku svn path=/trunk/boinc/; revision=18213 --- checkin_notes | 11 +++++++++++ lib/diagnostics.cpp | 3 +++ lib/gui_rpc_client.h | 4 ++++ lib/network.h | 1 + lib/shmem.cpp | 3 ++- lib/shmem.h | 1 - zip/unzip/unix/unix.c | 2 +- 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 5cadd9978e..0e27bf4f91 100644 --- a/checkin_notes +++ b/checkin_notes @@ -4757,3 +4757,14 @@ David 27 May 2009 lib/ filesys.h + +David 27 May 2009 + - compile fixes for Haiku + + lib/ + network.h + gui_rpc_client.h + diagnostics.cpp + shmem.cpp,h + zip/unzip/unix/ + unix.c diff --git a/lib/diagnostics.cpp b/lib/diagnostics.cpp index 024c57a6c5..ae67ae5ceb 100644 --- a/lib/diagnostics.cpp +++ b/lib/diagnostics.cpp @@ -595,7 +595,10 @@ void boinc_catch_signal(int signal) { case SIGINT: fprintf(stderr, "SIGINT: interrupt program\n"); break; case SIGILL: fprintf(stderr, "SIGILL: illegal instruction\n"); break; case SIGABRT: fprintf(stderr, "SIGABRT: abort called\n"); break; +#if SIGBUS != SIGSEGV + // in case SIGBUS == SIGSEGV (e.g., Haiku) case SIGBUS: fprintf(stderr, "SIGBUS: bus error\n"); break; +#endif case SIGSEGV: fprintf(stderr, "SIGSEGV: segmentation violation\n"); break; case SIGSYS: fprintf(stderr, "SIGSYS: system call given invalid argument\n"); break; case SIGPIPE: fprintf(stderr, "SIGPIPE: write on a pipe with no reader\n"); diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index a785b347bc..c6da83c89e 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -674,6 +674,7 @@ struct RPC { // so the following compatibility code avoids compiler errors when // building libboinc.a using config & make on system OS 10.3.9 or // with the OS 10.3.9 SDK (but using config & make is not recommended.) +// #if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4) && (!defined(BUILDING_MANAGER)) #define NO_PER_THREAD_LOCALE 1 #endif @@ -684,6 +685,9 @@ struct RPC { //#if defined(__UNIVAC__) //#define NO_PER_THREAD_LOCALE 1 //#endif +#if defined(__HAIKU__) +#define NO_PER_THREAD_LOCALE 1 +#endif #ifdef NO_PER_THREAD_LOCALE diff --git a/lib/network.h b/lib/network.h index 26094e04a2..3d3ebb6bc8 100644 --- a/lib/network.h +++ b/lib/network.h @@ -20,6 +20,7 @@ #include #ifndef _WIN32 +#include #include #include "config.h" #else diff --git a/lib/shmem.cpp b/lib/shmem.cpp index 2591bff65e..d5463b72be 100644 --- a/lib/shmem.cpp +++ b/lib/shmem.cpp @@ -43,6 +43,8 @@ extern "C" int debug_printf(const char *fmt, ...); #include #endif #include +#else + you need to implement your own shmem functions #endif #endif @@ -382,7 +384,6 @@ int detach_shmem_mmap(void* p, size_t size) { return munmap((char *)p, size); } - // Compatibility routines for Unix/Linux/Mac V5 applications // int create_shmem(key_t key, int size, gid_t gid, void** pp) { diff --git a/lib/shmem.h b/lib/shmem.h index 6206d6c907..ff9daf0e73 100644 --- a/lib/shmem.h +++ b/lib/shmem.h @@ -22,7 +22,6 @@ #ifndef _WIN32 #include -#include #endif // create_shmem(): create a shared-memory segment of the given size. diff --git a/zip/unzip/unix/unix.c b/zip/unzip/unix/unix.c index a05e34dba4..59290fddae 100644 --- a/zip/unzip/unix/unix.c +++ b/zip/unzip/unix/unix.c @@ -32,7 +32,7 @@ #ifdef SCO_XENIX # define SYSNDIR #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ -# if defined(__convexc__) || defined(SYSV) || defined(CRAY) || defined(BSD4_4) +# if defined(__convexc__) || defined(SYSV) || defined(CRAY) || defined(BSD4_4) || defined(__HAIKU__) # define DIRENT # endif #endif