diff --git a/headers/build/gcc-2.95.3/stdarg.h b/headers/build/gcc-2.95.3/stdarg.h index 3304fce36d..319d445b23 100644 --- a/headers/build/gcc-2.95.3/stdarg.h +++ b/headers/build/gcc-2.95.3/stdarg.h @@ -67,7 +67,7 @@ #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST -#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__) || defined(__BEOS__) +#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__) || defined(__BEOS__) || defined(__HAIKU__) typedef char *__gnuc_va_list; #else typedef void *__gnuc_va_list; diff --git a/headers/build/gcc-2.95.3/stdbool.h b/headers/build/gcc-2.95.3/stdbool.h index 3afe7d44eb..e19bcb1faa 100644 --- a/headers/build/gcc-2.95.3/stdbool.h +++ b/headers/build/gcc-2.95.3/stdbool.h @@ -2,7 +2,7 @@ #ifndef __STDBOOL_H__ #define __STDBOOL_H__ 1 -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) typedef unsigned char _Bool; #define bool _Bool #define false 0 diff --git a/headers/build/gcc-2.95.3/stddef.h b/headers/build/gcc-2.95.3/stddef.h index 7ac9f13508..1f592a52f2 100644 --- a/headers/build/gcc-2.95.3/stddef.h +++ b/headers/build/gcc-2.95.3/stddef.h @@ -168,9 +168,9 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif #if !(defined (__GNUG__) && defined (size_t)) typedef __SIZE_TYPE__ size_t; -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) typedef long ssize_t; -#endif /* __BEOS__ */ +#endif /* __BEOS__ || __HAIKU__ */ #endif /* !(defined (__GNUG__) && defined (size_t)) */ #endif /* __size_t */ #endif /* _SIZET_ */ diff --git a/headers/build/gcc-2.95.3/varargs.h b/headers/build/gcc-2.95.3/varargs.h index 57aa325911..7864389958 100644 --- a/headers/build/gcc-2.95.3/varargs.h +++ b/headers/build/gcc-2.95.3/varargs.h @@ -101,7 +101,7 @@ typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST -#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__BEOS__) +#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__BEOS__) || defined(__HAIKU__) typedef char *__gnuc_va_list; #else typedef void *__gnuc_va_list; diff --git a/headers/build/os/opengl/GL/gl.h b/headers/build/os/opengl/GL/gl.h index 3891a71875..835fc79de7 100644 --- a/headers/build/os/opengl/GL/gl.h +++ b/headers/build/os/opengl/GL/gl.h @@ -38,7 +38,7 @@ */ #if !defined(__SCITECH_SNAP__) -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) #include /* to get some BeOS-isms */ #endif @@ -67,7 +67,7 @@ # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) +#if ((defined(__BEOS__) || defined(__HAIKU__)) && defined(__POWERPC__)) || defined(__QUICKDRAW__) # define PRAGMA_EXPORT_SUPPORTED 1 #endif diff --git a/headers/cpp/defalloc.h b/headers/cpp/defalloc.h index 40d6579ecf..c2c06e2454 100644 --- a/headers/cpp/defalloc.h +++ b/headers/cpp/defalloc.h @@ -30,7 +30,7 @@ #include #include #include -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include #else #include @@ -43,7 +43,7 @@ inline T* allocate(ptrdiff_t size, T*) { set_new_handler(0); T* tmp = (T*)(::operator new((size_t)(size * sizeof(T)))); if (tmp == 0) { -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) fprintf(stderr, "out of memory\n"); #else cerr << "out of memory" << endl; diff --git a/headers/cpp/std/bastring.h b/headers/cpp/std/bastring.h index d477af83ec..625a1ebaa2 100644 --- a/headers/cpp/std/bastring.h +++ b/headers/cpp/std/bastring.h @@ -61,7 +61,7 @@ extern void __length_error (const char *); #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) // Needed for atomic_add(): typedef long int32; typedef volatile long vint32; @@ -79,7 +79,7 @@ private: charT* data () { return reinterpret_cast(this + 1); } charT& operator[] (size_t s) { return data () [s]; } -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) charT* grab () { if (selfish) return clone (); atomic_add((vint32*) &ref, 1); return data (); } void release() { if (atomic_add((int32*) &ref, -1) == 1) delete this; } #else diff --git a/headers/cpp/stl_alloc.h b/headers/cpp/stl_alloc.h index f5d7e3f085..b44f5f305a 100644 --- a/headers/cpp/stl_alloc.h +++ b/headers/cpp/stl_alloc.h @@ -42,7 +42,7 @@ # include # define __THROW_BAD_ALLOC throw bad_alloc() #elif !defined(__THROW_BAD_ALLOC) -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include # define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1) #else @@ -329,7 +329,7 @@ private: // instead of enum { x = N }, but few compilers accept the former. # ifndef __SUNPRO_CC enum {_ALIGN = 8}; -# if defined __BEOS__ +# if (defined(__BEOS__) || defined(__HAIKU__)) enum {_MAX_BYTES = 0}; # else enum {_MAX_BYTES = 128}; @@ -710,7 +710,7 @@ template __default_alloc_template<__threads, __inst>::_Obj* __VOLATILE __default_alloc_template<__threads, __inst> ::_S_free_list[ _NFREELISTS -#if defined __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) ] = { }; #else ] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; diff --git a/headers/cpp/stl_config.h b/headers/cpp/stl_config.h index 872813f495..2e29bca27f 100644 --- a/headers/cpp/stl_config.h +++ b/headers/cpp/stl_config.h @@ -291,7 +291,7 @@ !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \ !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \ !defined(__STL_USE_SGI_ALLOCATORS) || \ - defined(__BEOS__) + (defined(__BEOS__) || defined(__HAIKU__)) # define __STL_USE_STD_ALLOCATORS # endif diff --git a/headers/libs/expat/expat_external.h b/headers/libs/expat/expat_external.h index 4145cacacd..7081403e9d 100644 --- a/headers/libs/expat/expat_external.h +++ b/headers/libs/expat/expat_external.h @@ -4,7 +4,7 @@ /* External API definitions */ -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__) +#if defined(_MSC_EXTENSIONS) && !(defined(__BEOS__) || defined(__HAIKU__)) && !defined(__CYGWIN__) #define XML_USE_MSC_EXTENSIONS 1 #endif diff --git a/headers/libs/ncurses/curses.h b/headers/libs/ncurses/curses.h index 6a7b9b6b43..4b8a84797f 100644 --- a/headers/libs/ncurses/curses.h +++ b/headers/libs/ncurses/curses.h @@ -439,7 +439,7 @@ extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int); */ #if 1 #ifdef NCURSES_WGETCH_EVENTS -#if !defined(__BEOS__) /* Fix _nc_timed_wait() on BEOS... */ +#if !(defined(__BEOS__) || defined(__HAIKU__)) /* Fix _nc_timed_wait() on BEOS... */ # define NCURSES_EVENT_VERSION 1 #endif /* !defined(__BEOS__) */ diff --git a/headers/libs/zlib/zconf.h b/headers/libs/zlib/zconf.h index 03a9431c8b..5ae265e66e 100644 --- a/headers/libs/zlib/zconf.h +++ b/headers/libs/zlib/zconf.h @@ -231,7 +231,7 @@ # endif #endif -#if defined (__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL # define ZEXPORT __declspec(dllexport) diff --git a/headers/os/drivers/pcmcia/cs.h b/headers/os/drivers/pcmcia/cs.h index 66b4c4acec..54b1382155 100644 --- a/headers/os/drivers/pcmcia/cs.h +++ b/headers/os/drivers/pcmcia/cs.h @@ -436,7 +436,7 @@ extern int CardServices(int func, void *a1, void *a2, void *a3); extern int CardServices(int func, ...); #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #define SS_MODULE_NAME(s) ("busses/pcmcia/" s "/v1") #define MTD_MODULE_NAME(s) ("busses/pcmcia/" s "/v1") #define CS_CLIENT_MODULE_NAME "bus_managers/pcmcia_cs/client/v1" diff --git a/headers/os/drivers/pcmcia/ds.h b/headers/os/drivers/pcmcia/ds.h index 6384f80bd6..0a574bfd3b 100644 --- a/headers/os/drivers/pcmcia/ds.h +++ b/headers/os/drivers/pcmcia/ds.h @@ -129,7 +129,7 @@ typedef union ds_ioctl_arg_t { typedef struct dev_link_t { dev_node_t *dev; u_int state, open; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) wait_queue_head_t pending; struct timer_list release; #endif @@ -164,7 +164,7 @@ int unregister_pccard_driver(dev_info_t *dev_info); #define register_pcmcia_driver register_pccard_driver #define unregister_pcmcia_driver unregister_pccard_driver -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #define DS_MODULE_NAME "bus_managers/pcmcia_ds/v2" typedef struct ds_module_info { bus_manager_info binfo; diff --git a/headers/os/opengl/GL/gl.h b/headers/os/opengl/GL/gl.h index 3891a71875..835fc79de7 100644 --- a/headers/os/opengl/GL/gl.h +++ b/headers/os/opengl/GL/gl.h @@ -38,7 +38,7 @@ */ #if !defined(__SCITECH_SNAP__) -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) #include /* to get some BeOS-isms */ #endif @@ -67,7 +67,7 @@ # define GLAPIENTRY #endif /* WIN32 && !CYGWIN */ -#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) +#if ((defined(__BEOS__) || defined(__HAIKU__)) && defined(__POWERPC__)) || defined(__QUICKDRAW__) # define PRAGMA_EXPORT_SUPPORTED 1 #endif diff --git a/headers/private/mail/regex.h b/headers/private/mail/regex.h index 73ed1f16c3..ab9c90c8ae 100644 --- a/headers/private/mail/regex.h +++ b/headers/private/mail/regex.h @@ -28,7 +28,7 @@ #ifndef _REGEX_H #define _REGEX_H 1 -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # undef __STDC__ # define __STDC__ 1 #endif diff --git a/headers/tools/cppunit/cppunit/Portability.h b/headers/tools/cppunit/cppunit/Portability.h index 30ddc3e91e..cdf0d4ca6f 100644 --- a/headers/tools/cppunit/cppunit/Portability.h +++ b/headers/tools/cppunit/cppunit/Portability.h @@ -16,7 +16,7 @@ */ -#if defined(__POWERPC__) && defined(__BEOS__) +#if defined(__POWERPC__) && (defined(__BEOS__) || defined(__HAIKU__)) #define CPPUNIT_HAVE_SSTREAM 1 #undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST #endif diff --git a/src/add-ons/kernel/bus_managers/acpi/include/platform/acenv.h b/src/add-ons/kernel/bus_managers/acpi/include/platform/acenv.h index 78e472abd6..6e89886945 100644 --- a/src/add-ons/kernel/bus_managers/acpi/include/platform/acenv.h +++ b/src/add-ons/kernel/bus_managers/acpi/include/platform/acenv.h @@ -232,7 +232,7 @@ #elif defined(__NetBSD__) #include "acnetbsd.h" -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) #include "achaiku.h" #elif defined(MODESTO) diff --git a/src/add-ons/mail_daemon/inbound_filters/match_header/StringMatcher.h b/src/add-ons/mail_daemon/inbound_filters/match_header/StringMatcher.h index c4985834f5..5a3fcaad32 100644 --- a/src/add-ons/mail_daemon/inbound_filters/match_header/StringMatcher.h +++ b/src/add-ons/mail_daemon/inbound_filters/match_header/StringMatcher.h @@ -6,7 +6,7 @@ #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # if __POWERPC__ # include "regex.h" // use included regex if system doesn't provide one # else diff --git a/src/add-ons/media/plugins/matroska/libebml/ebml/MemIOCallback.h b/src/add-ons/media/plugins/matroska/libebml/ebml/MemIOCallback.h index 48fed9b03a..abe1a92110 100644 --- a/src/add-ons/media/plugins/matroska/libebml/ebml/MemIOCallback.h +++ b/src/add-ons/media/plugins/matroska/libebml/ebml/MemIOCallback.h @@ -36,7 +36,7 @@ #include "IOCallback.h" #include -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #else #include diff --git a/src/add-ons/media/plugins/matroska/libebml/ebml/c/libebml_t.h b/src/add-ons/media/plugins/matroska/libebml/ebml/c/libebml_t.h index 218ef2ff03..9380513692 100644 --- a/src/add-ons/media/plugins/matroska/libebml/ebml/c/libebml_t.h +++ b/src/add-ons/media/plugins/matroska/libebml/ebml/c/libebml_t.h @@ -72,7 +72,7 @@ extern "C" { typedef uint16_t uint16; typedef uint8_t uint8; # endif // __GNUC__ -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) #include #elif defined(DJGPP) /* SL : DJGPP doesn't support POSIX types ???? */ typedef signed long long int64; @@ -98,7 +98,7 @@ extern "C" { typedef uint32_t uint32; typedef uint16_t uint16; typedef uint8_t uint8; -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) # include #else // anything else (Linux, BSD, ...) # include diff --git a/src/add-ons/media/plugins/ogg/libogg/ogg/os_types.h b/src/add-ons/media/plugins/ogg/libogg/ogg/os_types.h index 4ce71c2612..884bc2f7c2 100644 --- a/src/add-ons/media/plugins/ogg/libogg/ogg/os_types.h +++ b/src/add-ons/media/plugins/ogg/libogg/ogg/os_types.h @@ -11,7 +11,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os_types.h,v 1.2 2004/02/24 13:52:39 shatty Exp $ + last mod: $Id$ ********************************************************************/ #ifndef _OS_TYPES_H @@ -61,7 +61,7 @@ typedef u_int32_t ogg_uint32_t; typedef int64_t ogg_int64_t; -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) /* Be */ # include diff --git a/src/add-ons/media/plugins/vorbis/libvorbis/os.h b/src/add-ons/media/plugins/vorbis/libvorbis/os.h index e5f46081aa..cf9a02f209 100644 --- a/src/add-ons/media/plugins/vorbis/libvorbis/os.h +++ b/src/add-ons/media/plugins/vorbis/libvorbis/os.h @@ -13,7 +13,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os.h,v 1.1 2003/12/13 20:17:56 shatty Exp $ + last mod: $Id$ ********************************************************************/ @@ -66,7 +66,7 @@ # define max(x,y) ((x)<(y)?(y):(x)) #endif -#if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__) +#if defined(__i386__) && defined(__GNUC__) && !(defined(__BEOS__) || defined(__HAIKU__)) # define VORBIS_FPU_CONTROL /* both GCC and MSVC are kinda stupid about rounding/casting to int. Because of encapsulation constraints (GCC can't see inside the asm diff --git a/src/add-ons/translators/hpgs/lib/hpgsimage.c b/src/add-ons/translators/hpgs/lib/hpgsimage.c index d24510e9be..813408d938 100644 --- a/src/add-ons/translators/hpgs/lib/hpgsimage.c +++ b/src/add-ons/translators/hpgs/lib/hpgsimage.c @@ -34,7 +34,7 @@ #include #include #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #else #include diff --git a/src/bin/bash/lib/readline/input.c b/src/bin/bash/lib/readline/input.c index 841f05d1af..57fc70192a 100644 --- a/src/bin/bash/lib/readline/input.c +++ b/src/bin/bash/lib/readline/input.c @@ -434,7 +434,7 @@ rl_getc (stream) if (result == 0) return (EOF); -#if defined (__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) if (errno == EINTR) continue; #endif diff --git a/src/bin/bash/lib/sh/inet_aton.c b/src/bin/bash/lib/sh/inet_aton.c index c42660e5bd..3b233a9a18 100644 --- a/src/bin/bash/lib/sh/inet_aton.c +++ b/src/bin/bash/lib/sh/inet_aton.c @@ -57,12 +57,12 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$Id: inet_aton.c,v 1.2 2004/10/25 23:39:57 korli Exp $"; +static char rcsid[] = "$Id$"; #endif /* LIBC_SCCS and not lint */ #include -#if !defined (HAVE_INET_ATON) && defined (HAVE_NETWORK) && defined (HAVE_NETINET_IN_H) && (defined (HAVE_ARPA_INET_H) || defined (__BEOS__)) +#if !defined (HAVE_INET_ATON) && defined (HAVE_NETWORK) && defined (HAVE_NETINET_IN_H) && (defined (HAVE_ARPA_INET_H) || (defined(__BEOS__) || defined(__HAIKU__))) #include #include diff --git a/src/bin/bash/lib/sh/netconn.c b/src/bin/bash/lib/sh/netconn.c index 8e1b9a714e..05fa050cd7 100644 --- a/src/bin/bash/lib/sh/netconn.c +++ b/src/bin/bash/lib/sh/netconn.c @@ -45,7 +45,7 @@ int isnetconn (fd) int fd; { -#if defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__) +#if defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__) && !defined(__HAIKU__) int rv; socklen_t l; struct sockaddr sa; @@ -54,7 +54,7 @@ isnetconn (fd) rv = getpeername(fd, &sa, &l); /* Solaris 2.5 getpeername() returns EINVAL if the fd is not a socket. */ return ((rv < 0 && (errno == ENOTSOCK || errno == EINVAL)) ? 0 : 1); -#else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ +#else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ || __HAIKU__ */ # if defined (SVR4) || defined (SVR4_2) /* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */ struct stat sb; @@ -69,15 +69,15 @@ isnetconn (fd) # endif /* S_ISFIFO */ return (S_ISCHR (sb.st_mode)); # else /* !SVR4 && !SVR4_2 */ -# if defined (S_ISSOCK) && !defined (__BEOS__) +# if defined (S_ISSOCK) && !defined (__BEOS__) && !defined(__HAIKU__) struct stat sb; if (fstat (fd, &sb) < 0) return (0); return (S_ISSOCK (sb.st_mode)); -# else /* !S_ISSOCK || __BEOS__ */ +# else /* !S_ISSOCK || __BEOS__ || __HAIKU__ */ return (0); -# endif /* !S_ISSOCK || __BEOS__ */ +# endif /* !S_ISSOCK || __BEOS__ || __HAIKU__ */ # endif /* !SVR4 && !SVR4_2 */ -#endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ +#endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ || __HAIKU__ */ } diff --git a/src/bin/copyattr.cpp b/src/bin/copyattr.cpp index e01af577d0..b58cdb4f2f 100644 --- a/src/bin/copyattr.cpp +++ b/src/bin/copyattr.cpp @@ -430,7 +430,7 @@ copy_entry(const char *sourcePath, const char *destPath, destNode->SetOwner(sourceStat.st_uid); destNode->SetGroup(sourceStat.st_gid); destNode->SetPermissions(sourceStat.st_mode); - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) destNode->SetCreationTime(sourceStat.st_crtime); #endif destNode->SetModificationTime(sourceStat.st_mtime); diff --git a/src/bin/coreutils/configure b/src/bin/coreutils/configure index 67e25032e3..889236099b 100755 --- a/src/bin/coreutils/configure +++ b/src/bin/coreutils/configure @@ -20462,7 +20462,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include -#if defined __GLIBC__ && !defined __BEOS__ +#if defined __GLIBC__ && !(defined(__BEOS__) || defined(__HAIKU__)) Do not use statvfs on systems with GNU libc, because that function stats all preceding entries in /proc/mounts, and that makes df hang if even one of the corresponding file systems is hard-mounted, but not available. diff --git a/src/bin/coreutils/lib/fcntl.h b/src/bin/coreutils/lib/fcntl.h index f9810c0b97..3766860f53 100644 --- a/src/bin/coreutils/lib/fcntl.h +++ b/src/bin/coreutils/lib/fcntl.h @@ -84,7 +84,7 @@ # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/coreutils/lib/fcntl_.h b/src/bin/coreutils/lib/fcntl_.h index e16ad54afe..758b5bdb3d 100644 --- a/src/bin/coreutils/lib/fcntl_.h +++ b/src/bin/coreutils/lib/fcntl_.h @@ -102,7 +102,7 @@ extern int open (const char *, int, ...); # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/coreutils/lib/localcharset.c b/src/bin/coreutils/lib/localcharset.c index 58766818cc..248faa0190 100644 --- a/src/bin/coreutils/lib/localcharset.c +++ b/src/bin/coreutils/lib/localcharset.c @@ -110,7 +110,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__ || defined __BEOS__) +#if !(defined VMS || defined WIN32_NATIVE || defined __CYGWIN__ || (defined(__BEOS__) || defined(__HAIKU__))) FILE *fp; const char *dir; const char *base = "charset.alias"; diff --git a/src/bin/coreutils/lib/stdbool_.h b/src/bin/coreutils/lib/stdbool_.h index 8525f0fe87..29161d9f9a 100644 --- a/src/bin/coreutils/lib/stdbool_.h +++ b/src/bin/coreutils/lib/stdbool_.h @@ -58,7 +58,7 @@ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include /* defines bool but not _Bool */ # undef false # undef true @@ -73,7 +73,7 @@ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || defined __BEOS__ +#if defined __cplusplus || (defined(__BEOS__) || defined(__HAIKU__)) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ diff --git a/src/bin/coreutils/src/copy.c b/src/bin/coreutils/src/copy.c index 67f6043dc0..6cd7735e2e 100644 --- a/src/bin/coreutils/src/copy.c +++ b/src/bin/coreutils/src/copy.c @@ -54,7 +54,7 @@ #include "xreadlink.h" #include "yesno.h" -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include #endif diff --git a/src/bin/coreutils/src/ls.c b/src/bin/coreutils/src/ls.c index e32c5b53b3..c9764e1040 100644 --- a/src/bin/coreutils/src/ls.c +++ b/src/bin/coreutils/src/ls.c @@ -632,7 +632,7 @@ static struct ignore_pattern *hide_patterns; want to mess up the terminal if control chars get sent to it, and some quoting methods pass through control chars as-is. */ static bool qmark_funny_chars; -#ifdef __BEOS__ /* Default to show UTF8 chars in BeOS terminal. */ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* Default to show UTF8 chars in BeOS terminal. */ #define QMARK_FUNNY_CHARS_TTY 0 #else #define QMARK_FUNNY_CHARS_TTY 1 @@ -3484,7 +3484,7 @@ print_long_format (const struct fileinfo *f) p = buf; } -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (f->stat_ok && (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode))) { diff --git a/src/bin/gawk/awk.h b/src/bin/gawk/awk.h index b6f044fb6e..5003ac9027 100644 --- a/src/bin/gawk/awk.h +++ b/src/bin/gawk/awk.h @@ -172,7 +172,7 @@ extern int errno; #include #endif /* atarist || VMS */ -#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(__CYGWIN__) && ! defined(__BEOS__) && ! defined(O_BINARY) /*duh*/ +#if ! defined(MSDOS) && ! defined(OS2) && ! defined(WIN32) && ! defined(__EMX__) && ! defined(__CYGWIN__) && ! (defined(__BEOS__) || defined(__HAIKU__)) && ! defined(O_BINARY) /*duh*/ #define O_BINARY 0 #endif diff --git a/src/bin/gawk/intl/loadmsgcat.c b/src/bin/gawk/intl/loadmsgcat.c index 8509bd3458..8dc0563875 100644 --- a/src/bin/gawk/intl/loadmsgcat.c +++ b/src/bin/gawk/intl/loadmsgcat.c @@ -480,7 +480,7 @@ char *alloca (); # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/gdb/gdb/ser-tcp.c b/src/bin/gdb/gdb/ser-tcp.c index 201ba658d4..3e0b3ec088 100644 --- a/src/bin/gdb/gdb/ser-tcp.c +++ b/src/bin/gdb/gdb/ser-tcp.c @@ -178,7 +178,7 @@ net_open (struct serial *scb, const char *name) tmp = 0; ioctl (scb->fd, FIONBIO, &tmp); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (use_udp == 0) { /* Disable Nagle algorithm. Needed in some cases. */ diff --git a/src/bin/gdb/readline/histfile.c b/src/bin/gdb/readline/histfile.c index 6d00f19af8..bd64ffb013 100644 --- a/src/bin/gdb/readline/histfile.c +++ b/src/bin/gdb/readline/histfile.c @@ -32,7 +32,7 @@ #include #include -#if !defined(_MINIX) && !defined(__BEOS__) +#if !defined(_MINIX) && !(defined(__BEOS__) || defined(__HAIKU__)) # include #endif #include "posixstat.h" @@ -347,7 +347,7 @@ history_truncate_file (fname, lines) { write (file, bp, chars_read - (bp - buffer)); -#if defined (__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS ignores O_TRUNC. */ ftruncate (file, chars_read - (bp - buffer)); #endif diff --git a/src/bin/gdb/readline/input.c b/src/bin/gdb/readline/input.c index 841f05d1af..57fc70192a 100644 --- a/src/bin/gdb/readline/input.c +++ b/src/bin/gdb/readline/input.c @@ -434,7 +434,7 @@ rl_getc (stream) if (result == 0) return (EOF); -#if defined (__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) if (errno == EINTR) continue; #endif diff --git a/src/bin/grep/intl/loadmsgcat.c b/src/bin/grep/intl/loadmsgcat.c index 76130ed278..94159146e9 100644 --- a/src/bin/grep/intl/loadmsgcat.c +++ b/src/bin/grep/intl/loadmsgcat.c @@ -108,7 +108,7 @@ char *alloca (); # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/grep/src/getpagesize.h b/src/bin/grep/src/getpagesize.h index 198967b919..d82ef00964 100644 --- a/src/bin/grep/src/getpagesize.h +++ b/src/bin/grep/src/getpagesize.h @@ -2,7 +2,7 @@ #ifndef HAVE_GETPAGESIZE -#if !defined getpagesize && defined __BEOS__ +#if !defined getpagesize && (defined(__BEOS__) || defined(__HAIKU__)) # include # define getpagesize() B_PAGE_SIZE #endif diff --git a/src/bin/grep/src/system.h b/src/bin/grep/src/system.h index 99906d8aaf..d8f6188c34 100644 --- a/src/bin/grep/src/system.h +++ b/src/bin/grep/src/system.h @@ -53,7 +53,7 @@ extern char *sys_errlist[]; #endif /* Some operating systems treat text and binary files differently. */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # undef O_BINARY /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ #endif #ifdef HAVE_DOS_FILE_CONTENTS diff --git a/src/bin/keymap/Keymap.cpp b/src/bin/keymap/Keymap.cpp index dba4a13424..872247b1a2 100644 --- a/src/bin/keymap/Keymap.cpp +++ b/src/bin/keymap/Keymap.cpp @@ -270,7 +270,7 @@ Keymap::Dump() status_t Keymap::LoadCurrent() { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) key_map *keys = NULL; get_key_map(&keys, &fChars); if (!keys) @@ -1096,7 +1096,7 @@ status_t _restore_key_map_(); void Keymap::RestoreSystemDefault() { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) // work-around to get rid of this stupid find_directory_r() on Zeta # ifdef find_directory # undef find_directory @@ -1121,7 +1121,7 @@ Keymap::RestoreSystemDefault() void Keymap::SaveAsCurrent() { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) return; @@ -1149,7 +1149,7 @@ Keymap::SaveAsCurrent() status_t Keymap::Use() { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) return _restore_key_map_(); #else // ! __BEOS__ diff --git a/src/bin/m4/lib/binary-io.h b/src/bin/m4/lib/binary-io.h index d9748ee252..07b633cfa4 100644 --- a/src/bin/m4/lib/binary-io.h +++ b/src/bin/m4/lib/binary-io.h @@ -31,7 +31,7 @@ # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/m4/lib/stdbool_.h b/src/bin/m4/lib/stdbool_.h index efa80ba921..db08b7a9dd 100644 --- a/src/bin/m4/lib/stdbool_.h +++ b/src/bin/m4/lib/stdbool_.h @@ -55,7 +55,7 @@ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include /* defines bool but not _Bool */ # undef false # undef true @@ -70,7 +70,7 @@ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || defined __BEOS__ +#if defined __cplusplus || (defined(__BEOS__) || defined(__HAIKU__)) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ diff --git a/src/bin/make/arscan.c b/src/bin/make/arscan.c index dbc4afd038..04b2efd629 100644 --- a/src/bin/make/arscan.c +++ b/src/bin/make/arscan.c @@ -231,7 +231,7 @@ ar_scan (char *archive, long int (*function) PARAMS ((void)), long int arg) #endif #ifndef WINDOWS32 -# ifndef __BEOS__ +# if (!defined(__BEOS__) && !defined(__HAIKU__)) # include # else /* BeOS 5 doesn't have but has archives in the same format diff --git a/src/bin/make/glob/glob.c b/src/bin/make/glob/glob.c index 1395e4630b..1af0a5ddce 100644 --- a/src/bin/make/glob/glob.c +++ b/src/bin/make/glob/glob.c @@ -175,7 +175,7 @@ extern void bcopy (); # define strcoll strcmp #endif -#if !defined __BEOS__ && !defined HAVE_MEMPCPY && __GLIBC__ - 0 == 2 && __GLIBC_MINOR__ >= 1 +#if !(defined(__BEOS__) || defined(__HAIKU__)) && !defined HAVE_MEMPCPY && __GLIBC__ - 0 == 2 && __GLIBC_MINOR__ >= 1 # define HAVE_MEMPCPY 1 # undef mempcpy # define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len) diff --git a/src/bin/makebootable/platform/bios_ia32/makebootable.cpp b/src/bin/makebootable/platform/bios_ia32/makebootable.cpp index ecd6563407..11fbc47b2a 100644 --- a/src/bin/makebootable/platform/bios_ia32/makebootable.cpp +++ b/src/bin/makebootable/platform/bios_ia32/makebootable.cpp @@ -319,7 +319,7 @@ main(int argc, const char *const *argv) } else if (S_ISCHR(st.st_mode)) { // character special: a device or partition under BeOS // or under FreeBSD - #if !defined(__BEOS__) && !defined(HAIKU_HOST_PLATFORM_FREEBSD) + #if !(defined(__BEOS__) || defined(__HAIKU__)) && !defined(HAIKU_HOST_PLATFORM_FREEBSD) fprintf(stderr, "Error: Character special devices not " "supported on this platform.\n"); @@ -514,7 +514,7 @@ main(int argc, const char *const *argv) exit(1); } - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) // get a partition info if (!noPartition diff --git a/src/bin/network/ftpd/ftpd.c b/src/bin/network/ftpd/ftpd.c index c594002884..aad7abbe57 100644 --- a/src/bin/network/ftpd/ftpd.c +++ b/src/bin/network/ftpd/ftpd.c @@ -1431,7 +1431,7 @@ pass(char *passwd) goto skip; } rval = strcmp(pw->pw_passwd, xpasswd); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (pw->pw_expire && time(NULL) >= pw->pw_expire) rval = 1; /* failure */ #endif @@ -1494,7 +1494,7 @@ skip: setusercontext(lc, pw, 0, LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY| LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC); -#elif !defined(__BEOS__) +#elif !(defined(__BEOS__) || defined(__HAIKU__)) setlogin(pw->pw_name); (void) initgroups(pw->pw_name, pw->pw_gid); #endif @@ -1531,7 +1531,7 @@ skip: #endif ; chrootdir = NULL; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* * For a chrooted local user, * a) see whether ftpchroot(5) specifies a chroot directory, @@ -1549,7 +1549,7 @@ skip: } #endif if (guest || dochroot) { -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* * If no chroot directory set yet, use the login directory. * Copy it so it can be modified while pw->pw_dir stays intact. @@ -2135,7 +2135,7 @@ send_data(FILE *instr, FILE *outstr, size_t blksize, off_t filesize, int isreg) netfd = fileno(outstr); filefd = fileno(instr); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (isreg) { char *msg = "Transfer complete."; off_t cnt, offset; @@ -3244,7 +3244,7 @@ send_file_list(char *whichf) CHECKOOB(goto abrt); -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if (dir->d_name[0] == '.' && dir->d_name[1] == '\0') continue; if (dir->d_name[0] == '.' && dir->d_name[1] == '.' && diff --git a/src/bin/network/ftpd/logwtmp.c b/src/bin/network/ftpd/logwtmp.c index 333fe7a1d0..63517ece62 100644 --- a/src/bin/network/ftpd/logwtmp.c +++ b/src/bin/network/ftpd/logwtmp.c @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: src/libexec/ftpd/logwtmp.c,v 1.13 2004/11/18 13:46:29 yar Ex #include #include -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #include #endif @@ -71,7 +71,7 @@ ftpd_logwtmp(line, name, addr) char *line, *name; struct sockaddr *addr; { -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) struct utmp ut; struct stat buf; char host[UT_HOSTSIZE]; diff --git a/src/bin/network/ftpd/md5c.c b/src/bin/network/ftpd/md5c.c index ddfe96a51f..28d117f29e 100644 --- a/src/bin/network/ftpd/md5c.c +++ b/src/bin/network/ftpd/md5c.c @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/lib/libmd/md5c.c,v 1.17 2006/01/17 15:35:56 phk Exp $"); #include #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #include #endif diff --git a/src/bin/network/tcpdump/tcpdump.c b/src/bin/network/tcpdump/tcpdump.c index 646639e8bb..3eda6e651f 100644 --- a/src/bin/network/tcpdump/tcpdump.c +++ b/src/bin/network/tcpdump/tcpdump.c @@ -366,7 +366,7 @@ show_dlts_and_exit(pcap_t *pd) #define U_FLAG #endif -#if !defined(WIN32) && !defined(__BEOS__) +#if !defined(WIN32) && !(defined(__BEOS__) || defined(__HAIKU__)) /* Drop root privileges and chroot if necessary */ static void droproot(const char *username, const char *chroot_dir) @@ -994,7 +994,7 @@ main(int argc, char **argv) callback = print_packet; pcap_userdata = (u_char *)&printinfo; } -#if !defined(WIN32) && !defined(__BEOS__) +#if !defined(WIN32) && !(defined(__BEOS__) || defined(__HAIKU__)) /* * We cannot do this earlier, because we want to be able to open * the file (if done) for writing before giving up permissions. diff --git a/src/bin/network/telnet/commands.c b/src/bin/network/telnet/commands.c index 79bfeacce6..257bba6254 100644 --- a/src/bin/network/telnet/commands.c +++ b/src/bin/network/telnet/commands.c @@ -40,7 +40,7 @@ static const char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; __FBSDID("$FreeBSD: src/contrib/telnet/telnet/commands.c,v 1.35 2005/02/28 12:46:52 tobez Exp $"); #include -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) # include #endif #include diff --git a/src/bin/network/telnet/main.c b/src/bin/network/telnet/main.c index 194c8af9fb..0395772b4f 100644 --- a/src/bin/network/telnet/main.c +++ b/src/bin/network/telnet/main.c @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) { int ch; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) char *ep; u_long ultmp; #endif @@ -187,7 +187,7 @@ main(int argc, char *argv[]) doaddrlookup = 0; break; case 'S': -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) fprintf(stderr, "-S option is not supported\n"); #else # ifdef HAS_GETTOS diff --git a/src/bin/network/telnetd/sys_term.c b/src/bin/network/telnetd/sys_term.c index fbf3ea1edd..e0165f3734 100644 --- a/src/bin/network/telnetd/sys_term.c +++ b/src/bin/network/telnetd/sys_term.c @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD: src/contrib/telnet/telnetd/sys_term.c,v 1.18 2003/05/04 02:5 #include #include #include -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) # include # include #endif @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD: src/contrib/telnet/telnetd/sys_term.c,v 1.18 2003/05/04 02:5 int cleanopen(char *); void scrub_env(void); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) struct utmp wtmp; @@ -408,7 +408,7 @@ getpty(int *ptynum __unused) char *p1, *p2; int i; -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) (void) strcpy(line, "/dev/pt/XX"); #else (void) strcpy(line, _PATH_DEV); @@ -989,7 +989,7 @@ cleanopen(char *li) (void) chown(li, 0, 0); (void) chmod(li, 0600); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) (void) revoke(li); #endif @@ -1002,7 +1002,7 @@ cleanopen(char *li) } -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* taken from DragonFly's telnetd */ int login_tty(int t) @@ -1372,7 +1372,7 @@ cleanup(int sig __unused) */ sigfillset(&mask); sigprocmask(SIG_SETMASK, &mask, NULL); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (logout(p)) logwtmp(p, "", ""); (void)chmod(line, 0666); diff --git a/src/bin/network/telnetd/telnetd.c b/src/bin/network/telnetd/telnetd.c index b216192c83..f724f7f2b6 100644 --- a/src/bin/network/telnetd/telnetd.c +++ b/src/bin/network/telnetd/telnetd.c @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD: src/contrib/telnet/telnetd/telnetd.c,v 1.28 2005/05/21 15:28 #include #include #include -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) # include #endif @@ -136,7 +136,7 @@ main(int argc, char *argv[]) struct sockaddr_storage from; int on = 1, fromlen; int ch; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) u_long ultmp; char *ep; #endif @@ -273,7 +273,7 @@ main(int argc, char *argv[]) break; case 'S': -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) fprintf(stderr, "-S option is not supported\n"); #else # ifdef HAS_GETTOS @@ -699,7 +699,7 @@ doit(struct sockaddr *who) Please contact your net administrator"); remote_hostname[sizeof(remote_hostname) - 1] = '\0'; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) trimdomain(remote_hostname, UT_HOSTSIZE); #endif if (!isdigit(remote_hostname[0]) && strlen(remote_hostname) > utmp_len) @@ -847,7 +847,7 @@ telnet(int f, int p, char *host) if (my_state_is_wont(TELOPT_ECHO)) send_will(TELOPT_ECHO, 1); -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* * Turn on packet mode */ @@ -1099,7 +1099,7 @@ telnet(int f, int p, char *host) pcc = 1; } #endif /* LINEMODE */ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) if (ptyibuf[0] & TIOCPKT_FLUSHWRITE) { netclear(); /* clear buffer back */ # ifndef NO_URGENT diff --git a/src/bin/network/wget/src/connect.c b/src/bin/network/wget/src/connect.c index 244b1cc793..ee284fc03d 100644 --- a/src/bin/network/wget/src/connect.c +++ b/src/bin/network/wget/src/connect.c @@ -684,7 +684,7 @@ test_socket_open (int sock) # define close(fd) closesocket (fd) #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # define read(fd, buf, cnt) recv (fd, buf, cnt, 0) # define write(fd, buf, cnt) send (fd, buf, cnt, 0) #endif diff --git a/src/bin/pcmcia-cs/cardctl.c b/src/bin/pcmcia-cs/cardctl.c index 24ecf0c8b1..3b43264a71 100644 --- a/src/bin/pcmcia-cs/cardctl.c +++ b/src/bin/pcmcia-cs/cardctl.c @@ -30,7 +30,7 @@ file under either the MPL or the GPL. ======================================================================*/ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #endif @@ -67,7 +67,7 @@ static char *configpath = "/etc/pcmcia"; static char *scheme, *stabfile; /*====================================================================*/ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) static int major = 0; static int lookup_dev(char *name) @@ -96,7 +96,7 @@ static int lookup_dev(char *name) static int open_sock(int sock) { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) char fn[B_OS_NAME_LENGTH]; sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); return open(fn, O_RDONLY); @@ -493,7 +493,7 @@ static int fetch_stab(void) return 0; } -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) static void eprintf(char *name, char *fmt, ...) { va_list args; @@ -510,7 +510,7 @@ static int execute(stab_t *s, char *action, char *scheme) int ret; char cmd[133]; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) eprintf("SOCKET", "%d", s->socket); eprintf("INSTANCE", "%d", s->instance); #endif @@ -695,7 +695,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) major = lookup_dev("pcmcia"); if (major < 0) { if (major == -ENODEV) diff --git a/src/bin/pcmcia-cs/dump_cis.c b/src/bin/pcmcia-cs/dump_cis.c index 3c80c43d37..212fae1f95 100644 --- a/src/bin/pcmcia-cs/dump_cis.c +++ b/src/bin/pcmcia-cs/dump_cis.c @@ -30,7 +30,7 @@ file under either the MPL or the GPL. ======================================================================*/ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #endif #include @@ -53,7 +53,7 @@ static int verbose = 0; static char indent[10] = " "; /*====================================================================*/ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) static int major = 0; static int lookup_dev(char *name) @@ -81,7 +81,7 @@ static int lookup_dev(char *name) static int open_sock(int sock) { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) char fn[B_OS_NAME_LENGTH]; sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); return open(fn, O_RDONLY); @@ -1040,7 +1040,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) major = lookup_dev("pcmcia"); if (major < 0) { fprintf(stderr, "no pcmcia driver in /proc/devices\n"); diff --git a/src/bin/pcmcia-cs/dump_cisreg.c b/src/bin/pcmcia-cs/dump_cisreg.c index 66a6f9072e..5db23f1ece 100644 --- a/src/bin/pcmcia-cs/dump_cisreg.c +++ b/src/bin/pcmcia-cs/dump_cisreg.c @@ -30,7 +30,7 @@ file under either the MPL or the GPL. ======================================================================*/ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #endif #include @@ -51,7 +51,7 @@ #include /*====================================================================*/ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) static int major = 0; static int lookup_dev(char *name) @@ -80,7 +80,7 @@ static int lookup_dev(char *name) static int open_sock(int sock) { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) char fn[B_OS_NAME_LENGTH]; sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); return open(fn, O_RDONLY); @@ -236,7 +236,7 @@ int main(int argc, char *argv[]) u_int mask; ds_ioctl_arg_t arg; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) major = lookup_dev("pcmcia"); if (major < 0) { fprintf(stderr, "no pcmcia driver in /proc/devices\n"); diff --git a/src/bin/rc/R5Compatibility.h b/src/bin/rc/R5Compatibility.h index fc83c4c519..3b3e318cfb 100644 --- a/src/bin/rc/R5Compatibility.h +++ b/src/bin/rc/R5Compatibility.h @@ -10,7 +10,7 @@ extern "C" { #endif // Already defined unter Linux. -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) extern size_t strnlen(const char *string, size_t count); #endif diff --git a/src/bin/rcs/conf.h b/src/bin/rcs/conf.h index 819f5db679..e99702b548 100644 --- a/src/bin/rcs/conf.h +++ b/src/bin/rcs/conf.h @@ -1,6 +1,6 @@ /* RCS compile-time configuration */ - /* $Id: conf.h,v 1.1 2003/06/11 15:56:09 darkwyrm Exp $ */ + /* $Id$ */ /* * This file is generated automatically. @@ -73,7 +73,7 @@ /* #define has_varargs ? */ /* Does work? */ #define va_start_args 2 /* How many args does va_start() take? */ -#if defined(O_BINARY) && !defined(__BEOS__) +#if defined(O_BINARY) && !(defined(__BEOS__) || defined(__HAIKU__)) /* Text and binary i/o behave differently. */ /* This is incompatible with Posix and Unix. */ # define FOPEN_RB "rb" @@ -246,7 +246,7 @@ typedef void *malloc_type; /* type returned by malloc() */ /* traditional BSD */ -#if has_sys_siglist && !defined(sys_siglist) && !defined (__BEOS__) +#if has_sys_siglist && !defined(sys_siglist) && !(defined(__BEOS__) || defined(__HAIKU__)) extern char const * const sys_siglist[]; #endif diff --git a/src/bin/rcs/conf.heg b/src/bin/rcs/conf.heg index e5444b3469..c2cdc3b889 100644 --- a/src/bin/rcs/conf.heg +++ b/src/bin/rcs/conf.heg @@ -1,6 +1,6 @@ /* example RCS compile-time configuration */ - /* $Id: conf.heg,v 1.1 2003/06/11 15:56:09 darkwyrm Exp $ */ + /* $Id$ */ /* * This example RCS compile-time configuration describes a host that conforms @@ -73,7 +73,7 @@ /* #define has_varargs ? */ /* Does work? */ #define va_start_args 2 /* How many args does va_start() take? */ -#if defined (O_BINARY) && !defined (__BEOS__) +#if defined (O_BINARY) && !(defined(__BEOS__) || defined(__HAIKU__)) /* Text and binary i/o behave differently. */ /* This is incompatible with Posix and Unix. */ # define FOPEN_RB "rb" diff --git a/src/bin/sed/intl/loadmsgcat.c b/src/bin/sed/intl/loadmsgcat.c index f99ebee3ad..cb0537770e 100644 --- a/src/bin/sed/intl/loadmsgcat.c +++ b/src/bin/sed/intl/loadmsgcat.c @@ -117,7 +117,7 @@ char *alloca (); # define O_BINARY _O_BINARY # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/tar/lib/fcntl.in.h b/src/bin/tar/lib/fcntl.in.h index 21f73d7e27..49a7915f60 100644 --- a/src/bin/tar/lib/fcntl.in.h +++ b/src/bin/tar/lib/fcntl.in.h @@ -105,7 +105,7 @@ extern int open (const char *, int, ...); # define O_TEXT _O_TEXT #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ # undef O_BINARY # undef O_TEXT diff --git a/src/bin/tar/lib/float.in.h b/src/bin/tar/lib/float.in.h index d61d630b19..d3e94023e9 100644 --- a/src/bin/tar/lib/float.in.h +++ b/src/bin/tar/lib/float.in.h @@ -25,7 +25,7 @@ #define _GL_FLOAT_H /* 'long double' properties. */ -#if defined __i386__ && defined __BEOS__ +#if defined __i386__ && (defined(__BEOS__) || defined(__HAIKU__)) /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 diff --git a/src/bin/tar/lib/stdbool.in.h b/src/bin/tar/lib/stdbool.in.h index 150a0102e1..61018e89e4 100644 --- a/src/bin/tar/lib/stdbool.in.h +++ b/src/bin/tar/lib/stdbool.in.h @@ -58,7 +58,7 @@ /* BeOS already #defines false 0, true 1. We use the same definitions below, but temporarily we have to #undef them. */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include /* defines bool but not _Bool */ # undef false # undef true @@ -73,7 +73,7 @@ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || defined __BEOS__ +#if defined __cplusplus || (defined(__BEOS__) || defined(__HAIKU__)) /* A compiler known to have 'bool'. */ /* If the compiler already has both 'bool' and '_Bool', we can assume they are the same types. */ diff --git a/src/bin/tar/lib/vasnprintf.c b/src/bin/tar/lib/vasnprintf.c index f563823349..88154d1da7 100644 --- a/src/bin/tar/lib/vasnprintf.c +++ b/src/bin/tar/lib/vasnprintf.c @@ -182,7 +182,7 @@ local_wcslen (const wchar_t *s) # /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. But don't use it on BeOS, since BeOS snprintf produces no output if the size argument is >= 0x3000000. */ -# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ +# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !(defined(__BEOS__) || defined(__HAIKU__)) # define USE_SNPRINTF 1 # else # define USE_SNPRINTF 0 diff --git a/src/bin/unrar/raros.hpp b/src/bin/unrar/raros.hpp index e6867981c6..f5173961b1 100644 --- a/src/bin/unrar/raros.hpp +++ b/src/bin/unrar/raros.hpp @@ -24,7 +24,7 @@ #endif #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #define _UNIX #define _BEOS #endif diff --git a/src/bin/unrar/rartypes.hpp b/src/bin/unrar/rartypes.hpp index a79cefd9ff..e3f29ef0dd 100644 --- a/src/bin/unrar/rartypes.hpp +++ b/src/bin/unrar/rartypes.hpp @@ -5,7 +5,7 @@ typedef unsigned char byte; //8 bits typedef unsigned short ushort; //preferably 16 bits, but can be more typedef unsigned int uint; //32 bits or more -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) typedef unsigned int uint32; //32 bits exactly #endif typedef int sint32; //signed 32 bits exactly diff --git a/src/bin/unzip/fileio.c b/src/bin/unzip/fileio.c index fe8b1aafde..df72a22587 100644 --- a/src/bin/unzip/fileio.c +++ b/src/bin/unzip/fileio.c @@ -1748,7 +1748,7 @@ time_t dos_to_unix_time(dosdatetime) #else /* !(BSD || MTS || __GO32__) */ /* tzset was already called at start of process_zipfiles() */ /* tzset(); */ /* set `timezone' variable */ -#ifndef __BEOS__ /* BeOS DR8 has no timezones... */ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* BeOS DR8 has no timezones... */ m_time += timezone; /* seconds WEST of GMT: add */ #endif #endif /* ?(BSD || MTS || __GO32__) */ diff --git a/src/bin/unzip/ttyio.c b/src/bin/unzip/ttyio.c index 4dd3278806..581572110e 100644 --- a/src/bin/unzip/ttyio.c +++ b/src/bin/unzip/ttyio.c @@ -50,7 +50,7 @@ # define GLOBAL(g) G.g #endif -#ifdef __BEOS__ /* why yes, we do */ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* why yes, we do */ # define HAVE_TERMIOS_H #endif @@ -332,7 +332,7 @@ void Echon(__G) #if (defined(UNZIP) && !defined(FUNZIP)) -#if (defined(UNIX) || defined(__BEOS__)) +#if (defined(UNIX) || (defined(__BEOS__) || defined(__HAIKU__))) #ifdef MORE /* @@ -584,7 +584,7 @@ char *getp(__G__ m, p, n) #else /* !HAVE_WORKING_GETCH */ -#if (defined(UNIX) || defined(__MINT__) || defined(__BEOS__)) +#if (defined(UNIX) || defined(__MINT__) || (defined(__BEOS__) || defined(__HAIKU__))) #ifndef _PATH_TTY # ifdef __MINT__ diff --git a/src/bin/unzip/unzip.c b/src/bin/unzip/unzip.c index 4e599b84be..28d5c458f9 100644 --- a/src/bin/unzip/unzip.c +++ b/src/bin/unzip/unzip.c @@ -1239,7 +1239,7 @@ int uz_opts(__G__ pargc, pargv) else uO.jflag = TRUE; break; -#if (defined(__BEOS__) || defined(MACOS) || defined(HAS_JUNK_EXTRA_FIELD_OPTION)) +#if ((defined(__BEOS__) || defined(__HAIKU__)) || defined(MACOS) || defined(HAS_JUNK_EXTRA_FIELD_OPTION)) case ('J'): /* Junk BeOS or MacOS file attributes */ if( negative ) { uO.J_flag = FALSE, negative = 0; diff --git a/src/bin/unzip/unzip.h b/src/bin/unzip/unzip.h index 65b84caeb3..5fd05a7a27 100644 --- a/src/bin/unzip/unzip.h +++ b/src/bin/unzip/unzip.h @@ -220,7 +220,7 @@ freely, subject to the following restrictions: # define MODERN # endif #endif -#if (defined(CMS_MVS) || defined(__BEOS__)) /* || defined(CONVEX) */ +#if (defined(CMS_MVS) || (defined(__BEOS__) || defined(__HAIKU__))) /* || defined(CONVEX) */ # ifndef PROTO # define PROTO # endif @@ -427,7 +427,7 @@ typedef struct _UzpOpts { int scanimage; /* -I: scan image files */ #endif int jflag; /* -j: junk pathnames (unzip) */ -#if (defined(__BEOS__) || defined(MACOS) || defined(HAS_JUNK_EXTRA_FIELD_OPTION)) +#if ((defined(__BEOS__) || defined(__HAIKU__)) || defined(MACOS) || defined(HAS_JUNK_EXTRA_FIELD_OPTION)) int J_flag; /* -J: ignore BeOS/MacOS extra field info (unzip) */ #endif int lflag; /* -12slmv: listing format (zipinfo) */ @@ -454,7 +454,7 @@ typedef struct _UzpOpts { int uflag; /* -u: "update" (extract only newer/brand-new files) */ int vflag; /* -v: (verbosely) list directory */ int V_flag; /* -V: don't strip VMS version numbers */ -#if (defined(__BEOS__) || defined(TANDEM) || defined(THEOS) || defined(UNIX)) +#if ((defined(__BEOS__) || defined(__HAIKU__)) || defined(TANDEM) || defined(THEOS) || defined(UNIX)) int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */ #endif #if (defined(OS2) || defined(VMS) || defined(WIN32)) diff --git a/src/bin/unzip/unzpriv.h b/src/bin/unzip/unzpriv.h index c70b89e28b..4521ac63ea 100644 --- a/src/bin/unzip/unzpriv.h +++ b/src/bin/unzip/unzpriv.h @@ -292,7 +292,7 @@ BeOS section: ---------------------------------------------------------------------------*/ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include /* [cjh]: This is pretty much a generic */ # include /* POSIX 1003.1 system; see beos/ for */ # include /* extra code to deal with our extra file */ @@ -697,7 +697,7 @@ # define DOS_T20_VMS #endif -#if (defined(__BEOS__) || defined(UNIX)) +#if ((defined(__BEOS__) || defined(__HAIKU__)) || defined(UNIX)) # define BEO_UNX #endif diff --git a/src/bin/vim/src/eval.c b/src/bin/vim/src/eval.c index 2e339e6d04..9b81167359 100644 --- a/src/bin/vim/src/eval.c +++ b/src/bin/vim/src/eval.c @@ -4694,7 +4694,7 @@ f_has(argvars, retvar) "arp", # endif #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) "beos", #endif #ifdef MSDOS diff --git a/src/bin/vim/src/gui.c b/src/bin/vim/src/gui.c index 3ffa2257d8..4ff61149df 100644 --- a/src/bin/vim/src/gui.c +++ b/src/bin/vim/src/gui.c @@ -53,7 +53,7 @@ static int can_update_cursor = TRUE; /* can display the cursor */ gui_start() { char_u *old_term; -#if defined(UNIX) && !defined(__BEOS__) && !defined(MACOS_X) +#if defined(UNIX) && !(defined(__BEOS__) || defined(__HAIKU__)) && !defined(MACOS_X) # define MAY_FORK int dofork = TRUE; #endif @@ -566,7 +566,7 @@ error: gui_exit(rc) int rc; { -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* don't free the fonts, it leads to a BUS error * richard@whitequeen.com Jul 99 */ free_highlight_fonts(); diff --git a/src/bin/vim/src/normal.c b/src/bin/vim/src/normal.c index 89196da0f4..16be36f002 100644 --- a/src/bin/vim/src/normal.c +++ b/src/bin/vim/src/normal.c @@ -4819,7 +4819,7 @@ nv_clear(cap) { if (!checkclearop(cap->oap)) { -#if defined(__BEOS__) && !USE_THREAD_FOR_INPUT_WITH_TIMEOUT +#if (defined(__BEOS__) || defined(__HAIKU__)) && !USE_THREAD_FOR_INPUT_WITH_TIMEOUT /* * Right now, the BeBox doesn't seem to have an easy way to detect * window resizing, so we cheat and make the user detect it diff --git a/src/bin/vim/src/os_unix.c b/src/bin/vim/src/os_unix.c index b59d8ff5de..e7a126bb05 100644 --- a/src/bin/vim/src/os_unix.c +++ b/src/bin/vim/src/os_unix.c @@ -45,7 +45,7 @@ * Use this prototype for select, some include files have a wrong prototype */ #undef select -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # define select beos_select #endif @@ -131,7 +131,7 @@ static int did_set_icon = FALSE; static void may_core_dump __ARGS((void)); static int WaitForChar __ARGS((long)); -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) int RealWaitForChar __ARGS((int, long, int *)); #else static int RealWaitForChar __ARGS((int, long, int *)); @@ -969,7 +969,7 @@ sigcont_handler SIGDEFARG(sigarg) mch_suspend() { /* BeOS does have SIGTSTP, but it doesn't work. */ -#if defined(SIGTSTP) && !defined(__BEOS__) +#if defined(SIGTSTP) && !(defined(__BEOS__) || defined(__HAIKU__)) out_flush(); /* needed to make cursor visible on some systems */ settmode(TMODE_COOK); out_flush(); /* needed to disable mouse on some systems */ @@ -3428,7 +3428,7 @@ mch_call_shell(cmd, options) # endif { -# ifdef __BEOS__ +# if (defined(__BEOS__) || defined(__HAIKU__)) beos_cleanup_read_thread(); # endif if ((pid = fork()) == -1) /* maybe we should use vfork() */ @@ -4044,7 +4044,7 @@ WaitForChar(msec) * Or when a Linux GPM mouse event is waiting. */ /* ARGSUSED */ -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) int #else static int diff --git a/src/bin/vim/src/proto.h b/src/bin/vim/src/proto.h index d89c847317..e9ffa5216d 100644 --- a/src/bin/vim/src/proto.h +++ b/src/bin/vim/src/proto.h @@ -59,7 +59,7 @@ extern int _stricoll __ARGS((char *a, char *b)); # ifdef VMS # include "os_vms.pro" # endif -# ifdef __BEOS__ +# if (defined(__BEOS__) || defined(__HAIKU__)) # include "os_beos.pro" # endif # ifdef MACOS diff --git a/src/bin/vim/src/pty.c b/src/bin/vim/src/pty.c index c87a767d09..36f5b013cb 100644 --- a/src/bin/vim/src/pty.c +++ b/src/bin/vim/src/pty.c @@ -37,7 +37,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -/* RCS_ID("$Id: pty.c,v 1.1 2004/06/15 09:02:26 korli Exp $ FAU") */ +/* RCS_ID("$Id$ FAU") */ #include "vim.h" @@ -356,7 +356,7 @@ OpenPTY(ttyn) static char PtyProto[] = "/dev/ptym/ptyXY"; static char TtyProto[] = "/dev/pty/ttyXY"; # else -# ifdef __BEOS__ +# if (defined(__BEOS__) || defined(__HAIKU__)) static char PtyProto[] = "/dev/pt/XY"; static char TtyProto[] = "/dev/tt/XY"; # else diff --git a/src/bin/vim/src/screen.c b/src/bin/vim/src/screen.c index 594c42479f..5a8c0e9f01 100644 --- a/src/bin/vim/src/screen.c +++ b/src/bin/vim/src/screen.c @@ -7704,7 +7704,7 @@ screen_del_lines(off, row, line_count, end, force, wp) #endif if (can_clear(T_CD) && result_empty) type = USE_T_CD; -#if defined(__BEOS__) && defined(BEOS_DR8) +#if (defined(__BEOS__) || defined(__HAIKU__)) && defined(BEOS_DR8) /* * USE_NL does not seem to work in Terminal of DR8 so we set T_DB="" in * its internal termcap... this works okay for tests which test *T_DB != diff --git a/src/bin/vim/src/term.c b/src/bin/vim/src/term.c index 656a40ef4d..61fa0e6e05 100644 --- a/src/bin/vim/src/term.c +++ b/src/bin/vim/src/term.c @@ -365,7 +365,7 @@ struct builtin_term builtin_termcaps[] = {TERMCAP2KEY('*', '7'), "\233\065\065~"}, /* shifted end key */ # endif -# if defined(__BEOS__) || defined(ALL_BUILTIN_TCAPS) +# if (defined(__BEOS__) || defined(__HAIKU__)) || defined(ALL_BUILTIN_TCAPS) /* * almost standard ANSI terminal, default for bebox */ @@ -1403,7 +1403,7 @@ struct builtin_term builtin_termcaps[] = # define DEFAULT_TERM (char_u *)"vt320" #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # undef DEFAULT_TERM # define DEFAULT_TERM (char_u *)"beos-ansi" #endif @@ -2450,7 +2450,7 @@ termcapinit(name) name = NULL; /* empty name is equal to no name */ term = name; -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* * TERM environment variable is normally set to 'ansi' on the Bebox; * Since the BeBox doesn't quite support full ANSI yet, we use our diff --git a/src/bin/vim/src/ui.c b/src/bin/vim/src/ui.c index ebbf85dbbd..218c31c84e 100644 --- a/src/bin/vim/src/ui.c +++ b/src/bin/vim/src/ui.c @@ -243,7 +243,7 @@ ui_suspend() mch_suspend(); } -#if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) || defined(__BEOS__) +#if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) || (defined(__BEOS__) || defined(__HAIKU__)) /* * When the OS can't really suspend, call this function to start a shell. * This is never called in the GUI. @@ -1692,7 +1692,7 @@ fill_input_buf(exit_on_error) * If we can't get any, and there isn't any in the buffer, we give up and * exit Vim. */ -# ifdef __BEOS__ +# if (defined(__BEOS__) || defined(__HAIKU__)) /* * On the BeBox version (for now), all input is secretly performed within * beos_select() which is called from RealWaitForChar(). diff --git a/src/bin/vim/src/vim.h b/src/bin/vim/src/vim.h index d85aa0719a..f3839bc573 100644 --- a/src/bin/vim/src/vim.h +++ b/src/bin/vim/src/vim.h @@ -185,7 +185,7 @@ # define __ARGS(x) x #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include "os_beos.h" # define __ARGS(x) x #endif diff --git a/src/bin/zip/tailor.h b/src/bin/zip/tailor.h index e77f1b5bd9..96cda2ef80 100644 --- a/src/bin/zip/tailor.h +++ b/src/bin/zip/tailor.h @@ -37,7 +37,7 @@ #include "atari/osdep.h" #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include "beos/osdep.h" #endif @@ -448,7 +448,7 @@ typedef struct ztimbuf { #ifdef MVS # define OS_CODE 0xf00 #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # define OS_CODE 0x1000 #endif #ifdef TANDEM diff --git a/src/bin/zip/ttyio.c b/src/bin/zip/ttyio.c index 1917b35e1e..8baae63190 100644 --- a/src/bin/zip/ttyio.c +++ b/src/bin/zip/ttyio.c @@ -50,7 +50,7 @@ # define GLOBAL(g) G.g #endif -#if (defined(__ATHEOS__) || defined(__BEOS__)) /* why yes, we do */ +#if (defined(__ATHEOS__) || (defined(__BEOS__) || defined(__HAIKU__))) /* why yes, we do */ # define HAVE_TERMIOS_H #endif diff --git a/src/bin/zip/ttyio.h b/src/bin/zip/ttyio.h index 33b7177a0d..2b0e94252e 100644 --- a/src/bin/zip/ttyio.h +++ b/src/bin/zip/ttyio.h @@ -58,7 +58,7 @@ # endif #endif -#if (defined(__ATHEOS__) || defined(__BEOS__) || defined(UNIX)) +#if (defined(__ATHEOS__) || (defined(__BEOS__) || defined(__HAIKU__)) || defined(UNIX)) # ifndef ATH_BEO_UNX # define ATH_BEO_UNX # endif diff --git a/src/bin/zip/zip.c b/src/bin/zip/zip.c index 2f30ae5c95..9bddf2689c 100644 --- a/src/bin/zip/zip.c +++ b/src/bin/zip/zip.c @@ -2406,7 +2406,7 @@ nextarg: ; #endif } -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) /* Set the filetype of the zipfile to "application/zip" */ setfiletype( zipfile, "application/zip" ); #endif diff --git a/src/bin/zip/zipup.c b/src/bin/zip/zipup.c index 8f3dac37e6..1386cba034 100644 --- a/src/bin/zip/zipup.c +++ b/src/bin/zip/zipup.c @@ -52,7 +52,7 @@ # include "atari/zipup.h" #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include "beos/zipup.h" #endif diff --git a/src/build/libbe/storage/mime/MimeUpdateThread.cpp b/src/build/libbe/storage/mime/MimeUpdateThread.cpp index 61ba2ee01a..e0f1b40a45 100644 --- a/src/build/libbe/storage/mime/MimeUpdateThread.cpp +++ b/src/build/libbe/storage/mime/MimeUpdateThread.cpp @@ -31,7 +31,7 @@ namespace BPrivate { namespace Storage { -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) // device_is_root_device bool device_is_root_device(dev_t device) diff --git a/src/kits/opengl/glut/glut_vidresize.c b/src/kits/opengl/glut/glut_vidresize.c index a9d9e632f5..f2617c3b99 100644 --- a/src/kits/opengl/glut/glut_vidresize.c +++ b/src/kits/opengl/glut/glut_vidresize.c @@ -7,7 +7,7 @@ #include -#if !defined(_WIN32) && !defined(__BEOS__) +#if !defined(_WIN32) && !(defined(__BEOS__) || defined(__HAIKU__)) #include #endif diff --git a/src/kits/opengl/glut/glutint.h b/src/kits/opengl/glut/glutint.h index 06b417e9ca..9ff6f09f1b 100644 --- a/src/kits/opengl/glut/glutint.h +++ b/src/kits/opengl/glut/glutint.h @@ -13,7 +13,7 @@ #if defined(_WIN32) #include "glutwin32.h" -#elif !defined(__BEOS__) +#elif !(defined(__BEOS__) || defined(__HAIKU__)) #ifdef __sgi #define SUPPORT_FORTRAN #endif @@ -114,7 +114,7 @@ extern int sys$gettim(struct timeval *); { if (__glutGameModeWindow) return; } /* BeOS doesn't need most of this file */ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #define GLUT_WIND_IS_RGB(x) (((x) & GLUT_INDEX) == 0) #define GLUT_WIND_IS_INDEX(x) (((x) & GLUT_INDEX) != 0) @@ -298,7 +298,7 @@ typedef void (*GLUTtabletButtonFCB) (int *, int *, int *, int *); typedef void (*GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z); #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) typedef struct _GLUTcolorcell GLUTcolorcell; struct _GLUTcolorcell { @@ -647,7 +647,7 @@ extern XSizeHints __glutSizeHints; extern char **__glutArgv; #endif /* BeOS */ extern char *__glutProgramName; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) extern int __glutArgc; extern int __glutConnectionFD; extern int __glutInitHeight; @@ -740,7 +740,7 @@ extern void __glutFatalUsage(char *format,...); #ifdef __cplusplus } #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) /* private routines from glut_win.c */ extern GLUTwindow *__glutGetWindow(Window win); diff --git a/src/kits/opengl/mesa/main/imports.h b/src/kits/opengl/mesa/main/imports.h index 00a18d3f15..41961dc88e 100644 --- a/src/kits/opengl/mesa/main/imports.h +++ b/src/kits/opengl/mesa/main/imports.h @@ -325,7 +325,7 @@ static INLINE int iround(float f) } #define IROUND(x) iround(x) #elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \ - (!defined(__BEOS__) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))) + (!(defined(__BEOS__) || defined(__HAIKU__)) || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))) static INLINE int iround(float f) { int r; diff --git a/src/kits/opengl/mesa/x86/gen_matypes.c b/src/kits/opengl/mesa/x86/gen_matypes.c index e95f3d4f3d..7df8f9e649 100644 --- a/src/kits/opengl/mesa/x86/gen_matypes.c +++ b/src/kits/opengl/mesa/x86/gen_matypes.c @@ -61,7 +61,7 @@ do { \ printf( "\n" ); \ } while (0) -#if defined(__BEOS__) || defined(_LP64) +#if (defined(__BEOS__) || defined(__HAIKU__)) || defined(_LP64) #define OFFSET( s, t, m ) \ printf( "#define %s\t%ld\n", s, offsetof( t, m ) ); #else @@ -69,7 +69,7 @@ do { \ printf( "#define %s\t%d\n", s, offsetof( t, m ) ); #endif -#if defined(__BEOS__) || defined(_LP64) +#if (defined(__BEOS__) || defined(__HAIKU__)) || defined(_LP64) #define SIZEOF( s, t ) \ printf( "#define %s\t%ld\n", s, sizeof(t) ); #else diff --git a/src/libs/expat/xmlwf/readfilemap.c b/src/libs/expat/xmlwf/readfilemap.c index 2d76cd8841..5d29a97d9f 100644 --- a/src/libs/expat/xmlwf/readfilemap.c +++ b/src/libs/expat/xmlwf/readfilemap.c @@ -8,7 +8,7 @@ #include #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #endif diff --git a/src/libs/fluidsynth/src/config.h b/src/libs/fluidsynth/src/config.h index 53d91ababb..8b9a92fbc8 100644 --- a/src/libs/fluidsynth/src/config.h +++ b/src/libs/fluidsynth/src/config.h @@ -186,7 +186,7 @@ #endif /* Additional config for us */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #define WITHOUT_SERVER 1 #include diff --git a/src/libs/fluidsynth/src/fluid_sys.c b/src/libs/fluidsynth/src/fluid_sys.c index a565cc8c83..d001b2c156 100644 --- a/src/libs/fluidsynth/src/fluid_sys.c +++ b/src/libs/fluidsynth/src/fluid_sys.c @@ -635,7 +635,7 @@ unsigned int fluid_curtime() } -#elif __BEOS__ +#elif defined(__BEOS__) || defined(__HAIKU__) struct _fluid_timer_t { @@ -1153,7 +1153,7 @@ int fluid_thread_join(fluid_thread_t* thread) return (wait_result == WAIT_OBJECT_0)? FLUID_OK : FLUID_FAILED; } -#elif defined(__BEOS__) +#elif defined(__BEOS__) || defined(__HAIKU__) /* Not implemented */ fluid_thread_t* new_fluid_thread(fluid_thread_func_t func, void* data, int detach) { return NULL; } int delete_fluid_thread(fluid_thread_t* thread) { return 0; } @@ -1288,7 +1288,7 @@ void fluid_socket_close(fluid_socket_t sock) #endif -#if !defined(MACINTOSH) && !defined(WIN32) && !defined(__BEOS__) +#if !defined(MACINTOSH) && !defined(WIN32) && !defined(__BEOS__) && !defined(__HAIKU__) fluid_istream_t fluid_socket_get_istream(fluid_socket_t sock) diff --git a/src/libs/fluidsynth/src/fluid_sys.h b/src/libs/fluidsynth/src/fluid_sys.h index b60169d8fa..c82745a10e 100644 --- a/src/libs/fluidsynth/src/fluid_sys.h +++ b/src/libs/fluidsynth/src/fluid_sys.h @@ -90,7 +90,7 @@ double fluid_utime(void); unsigned int fluid_curtime(); #define fluid_utime() 0.0 -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) #include unsigned int fluid_curtime(void); diff --git a/src/libs/fluidsynth/src/fluidsynth.c b/src/libs/fluidsynth/src/fluidsynth.c index 84222bdf3d..c7b003ba56 100644 --- a/src/libs/fluidsynth/src/fluidsynth.c +++ b/src/libs/fluidsynth/src/fluidsynth.c @@ -533,7 +533,7 @@ int main(int argc, char** argv) } /* run the server, if requested */ -#if !defined(MACINTOSH) && !defined(WIN32) && !defined(__BEOS__) +#if !defined(MACINTOSH) && !defined(WIN32) && !(defined(__BEOS__) || defined(__HAIKU__)) if (with_server) { server = new_fluid_server(settings, newclient, synth); if (server == NULL) { @@ -567,7 +567,7 @@ int main(int argc, char** argv) cleanup: -#if !defined(MACINTOSH) && !defined(WIN32) && !defined(__BEOS__) +#if !defined(MACINTOSH) && !defined(WIN32) && !(defined(__BEOS__) || defined(__HAIKU__)) if (server != NULL) { /* if the user typed 'quit' in the shell, kill the server */ if (!interactive) { diff --git a/src/libs/fluidsynth/src/fluidsynth_priv.h b/src/libs/fluidsynth/src/fluidsynth_priv.h index 2dd12555b5..4a12dcd096 100644 --- a/src/libs/fluidsynth/src/fluidsynth_priv.h +++ b/src/libs/fluidsynth/src/fluidsynth_priv.h @@ -206,7 +206,7 @@ typedef unsigned int uint32; typedef long long sint64; typedef unsigned long long uint64; -#elif defined(__BEOS__) +#elif (defined(__BEOS__) || defined(__HAIKU__)) typedef signed char sint8; typedef signed short sint16; typedef signed int sint32; diff --git a/src/libs/ncurses/aclocal.m4 b/src/libs/ncurses/aclocal.m4 index 8cbe58abc2..b544ca6222 100644 --- a/src/libs/ncurses/aclocal.m4 +++ b/src/libs/ncurses/aclocal.m4 @@ -252,7 +252,7 @@ AC_CACHE_VAL(cf_cv_header_stdbool_h,[ AC_TRY_COMPILE([],[bool foo = false], [cf_cv_header_stdbool_h=0], [AC_TRY_COMPILE([ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #endif ],[bool foo = false], diff --git a/src/libs/ncurses/config.log b/src/libs/ncurses/config.log index 30bd4d2b89..fa9305c25f 100644 --- a/src/libs/ncurses/config.log +++ b/src/libs/ncurses/config.log @@ -1311,7 +1311,7 @@ configure: failed program was: #line 11958 "configure" #include "confdefs.h" -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #endif diff --git a/src/libs/ncurses/configure b/src/libs/ncurses/configure index 819d57259e..e836ccaff2 100755 --- a/src/libs/ncurses/configure +++ b/src/libs/ncurses/configure @@ -11958,7 +11958,7 @@ cat >conftest.$ac_ext <<_ACEOF #line 11958 "configure" #include "confdefs.h" -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #endif @@ -12557,7 +12557,7 @@ cat >conftest.$ac_ext <<_ACEOF #line 12557 "configure" #include "confdefs.h" -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #include #endif diff --git a/src/libs/ncurses/ncurses/tty/lib_twait.c b/src/libs/ncurses/ncurses/tty/lib_twait.c index 7a7e29afd7..303f75b1f9 100644 --- a/src/libs/ncurses/ncurses/tty/lib_twait.c +++ b/src/libs/ncurses/ncurses/tty/lib_twait.c @@ -42,7 +42,7 @@ #include -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) #undef false #undef true #include diff --git a/src/libs/ncurses/tack/sysdep.c b/src/libs/ncurses/tack/sysdep.c index 78ae095e3b..413675050b 100644 --- a/src/libs/ncurses/tack/sysdep.c +++ b/src/libs/ncurses/tack/sysdep.c @@ -34,7 +34,7 @@ #include #include -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) #undef false #undef true #include @@ -342,7 +342,7 @@ char_ready(void) } #else -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) int char_ready(void) { diff --git a/src/libs/pdflib/libs/pdcore/pc_config.h b/src/libs/pdflib/libs/pdcore/pc_config.h index 91e9c284d4..a9f1b0f623 100644 --- a/src/libs/pdflib/libs/pdcore/pc_config.h +++ b/src/libs/pdflib/libs/pdcore/pc_config.h @@ -146,7 +146,7 @@ /* try to identify Mac OS 9 compilers */ #if (defined macintosh || defined __POWERPC__ || defined __CFM68K__) && \ - !defined MAC && !defined MACOSX && !defined __BEOS__ + !defined MAC && !defined MACOSX && !(defined(__BEOS__) || !defined(__HAIKU__)) #define MAC #endif @@ -163,7 +163,7 @@ /* ----------------------------------- BeOS --------------------------------- */ -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) #define PDF_PLATFORM "BeOS" #ifdef __POWERPC__ @@ -172,7 +172,7 @@ #define PDC_ISBIGENDIAN 1 #endif /* __POWERPC__ */ -#endif /* __BEOS__ */ +#endif /* __BEOS__ || __HAIKU__ */ /* --------------------------------- AS/400 --------------------------------- */ diff --git a/src/libs/pdflib/libs/tiff/port.h b/src/libs/pdflib/libs/tiff/port.h index 07b269727c..fb4add8025 100644 --- a/src/libs/pdflib/libs/tiff/port.h +++ b/src/libs/pdflib/libs/tiff/port.h @@ -40,7 +40,7 @@ typedef unsigned long tif_long; */ #if (defined macintosh || defined __POWERPC__ || \ defined __CFM68K__ || defined __MC68K__) && \ - !defined MAC && !defined __BEOS__ + !defined MAC && !(defined(__BEOS__) || defined(__HAIKU__)) # define MAC #endif diff --git a/src/libs/zlib/zconf.h b/src/libs/zlib/zconf.h index 03a9431c8b..5ae265e66e 100644 --- a/src/libs/zlib/zconf.h +++ b/src/libs/zlib/zconf.h @@ -231,7 +231,7 @@ # endif #endif -#if defined (__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) # ifdef ZLIB_DLL # ifdef ZLIB_INTERNAL # define ZEXPORT __declspec(dllexport) diff --git a/src/system/libroot/posix/glibc/arch/generic/e_j0.c b/src/system/libroot/posix/glibc/arch/generic/e_j0.c index 16001e2cbb..2086f08391 100644 --- a/src/system/libroot/posix/glibc/arch/generic/e_j0.c +++ b/src/system/libroot/posix/glibc/arch/generic/e_j0.c @@ -188,7 +188,7 @@ V[] = {1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */ /* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0, y0(0) is -inf. */ if(ix>=0x7ff00000) return one/(x+x*x); if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if(hx<0) return -HUGE_VAL+x; // also valid says the spec #else if(hx<0) return zero/(zero*x); diff --git a/src/system/libroot/posix/glibc/arch/generic/e_j1.c b/src/system/libroot/posix/glibc/arch/generic/e_j1.c index a59c70d55a..e2d9a9aa7c 100644 --- a/src/system/libroot/posix/glibc/arch/generic/e_j1.c +++ b/src/system/libroot/posix/glibc/arch/generic/e_j1.c @@ -191,7 +191,7 @@ static double V0[5] = { /* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */ if(ix>=0x7ff00000) return one/(x+x*x); if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */; -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if(hx<0) return -HUGE_VAL+x; #else if(hx<0) return zero/(zero*x); diff --git a/src/system/libroot/posix/glibc/arch/generic/e_jn.c b/src/system/libroot/posix/glibc/arch/generic/e_jn.c index a5eac30d38..371d7737f7 100644 --- a/src/system/libroot/posix/glibc/arch/generic/e_jn.c +++ b/src/system/libroot/posix/glibc/arch/generic/e_jn.c @@ -237,7 +237,7 @@ static double zero = 0.00000000000000000000e+00; /* if Y(n,NaN) is NaN */ if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x; if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */; -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if(hx<0) return -HUGE_VAL+x; #else if(hx<0) return zero/(zero*x); diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c b/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c index 9e3a2df1d9..36971e6adb 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c @@ -48,7 +48,7 @@ #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #include #endif diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/compat.h b/src/tests/add-ons/kernel/file_systems/fs_shell/compat.h index 2aad7f753c..ad6d2038a3 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/compat.h +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/compat.h @@ -23,7 +23,7 @@ #define _FS_INTERFACE_H // don't include that file -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) # define dprintf build_platform_dprintf # include # undef dprintf @@ -46,7 +46,7 @@ typedef struct iovec iovec; #include #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include /* for typedefs and prototypes */ # include /* for a few typedefs */ # include /* for various ioctl structs, etc */ @@ -234,7 +234,7 @@ struct my_stat { #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) typedef attr_info my_attr_info; @@ -257,7 +257,7 @@ typedef struct my_attr_info #define FALSE 0 #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #ifdef __cplusplus extern "C" { diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/errors.cpp b/src/tests/add-ons/kernel/file_systems/fs_shell/errors.cpp index a62259a34e..9b3ab1676c 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/errors.cpp +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/errors.cpp @@ -15,7 +15,7 @@ fs_strerror(int error) } -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) int from_platform_error(int error) diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/stat_util.cpp b/src/tests/add-ons/kernel/file_systems/fs_shell/stat_util.cpp index 21c9954601..814ec46a28 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/stat_util.cpp +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/stat_util.cpp @@ -5,7 +5,7 @@ #include "stat_util.h" -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) void from_platform_stat(const struct stat *st, struct my_stat *myst) diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/stub.c b/src/tests/add-ons/kernel/file_systems/fs_shell/stub.c index 5d72361f85..93ed6525a0 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/stub.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/stub.c @@ -25,7 +25,7 @@ #include "myfs.h" -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) static void myfs_die(const char *format,...) diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/sysdep.c b/src/tests/add-ons/kernel/file_systems/fs_shell/sysdep.c index 5d9d490831..3e03ab0ed0 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/sysdep.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/sysdep.c @@ -127,7 +127,7 @@ device_is_removeable(int fd) #endif } -#if defined(__BEOS__) && !defined(USER) +#if (defined(__BEOS__) || defined(__HAIKU__)) && !defined(USER) #include "scsi.h" #endif @@ -144,7 +144,7 @@ lock_removeable_device(int fd, bool on_or_off) -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) ssize_t read_pos(int fd, fs_off_t _pos, void *data, size_t nbytes) { @@ -530,7 +530,7 @@ system_time(void) #endif /* unix */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include void diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/xcp.cpp b/src/tests/add-ons/kernel/file_systems/fs_shell/xcp.cpp index e2ca3b061b..89d5952767 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/xcp.cpp +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/xcp.cpp @@ -235,7 +235,7 @@ public: if (recLen > size) return FS_NAME_TOO_LONG; - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) entry->d_dev = hostEntry->d_dev; #endif entry->d_ino = hostEntry->d_ino; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/cache.c b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/cache.c index a4d4fc3597..7ae6d86453 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/cache.c +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/cache.c @@ -46,7 +46,7 @@ #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include #include #endif diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/compat.h b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/compat.h index 6135a01702..2e5726dccd 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/compat.h +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/compat.h @@ -29,7 +29,7 @@ #include #include -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include /* for typedefs and prototypes */ #include /* for a few typedefs */ #include /* for various ioctl structs, etc */ @@ -156,7 +156,7 @@ struct my_stat { #define FALSE 0 #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) typedef long sem_id; typedef unsigned char uchar; typedef short int16; diff --git a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/sysdep.c b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/sysdep.c index 8362d7ef24..7fadc564b7 100644 --- a/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/sysdep.c +++ b/src/tests/add-ons/kernel/file_systems/userlandfs/r5/src/server/sysdep.c @@ -103,7 +103,7 @@ device_is_removeable(int fd) #endif } -#if defined(__BEOS__) && !defined(USER) +#if (defined(__BEOS__) || defined(__HAIKU__)) && !defined(USER) #include "scsi.h" #endif @@ -120,7 +120,7 @@ lock_removeable_device(int fd, bool on_or_off) -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) ssize_t read_pos(int fd, fs_off_t _pos, void *data, size_t nbytes) { @@ -334,7 +334,7 @@ system_time(void) #endif /* unix */ -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #include void diff --git a/src/tests/system/libroot/posix/signal_test.cpp b/src/tests/system/libroot/posix/signal_test.cpp index 8b095f60b3..04174537da 100644 --- a/src/tests/system/libroot/posix/signal_test.cpp +++ b/src/tests/system/libroot/posix/signal_test.cpp @@ -37,7 +37,7 @@ is_alternate(void* pointer) void sigHandler(int signal, void *userData, vregs *regs) { -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) if (userData != kUserDataMagic) fprintf(stderr, "FAILED: user data not correct: %p\n", userData); #endif @@ -69,7 +69,7 @@ main() newAction.sa_handler = (sighandler_t)sigHandler; newAction.sa_mask = 0; newAction.sa_flags = SA_ONESHOT | SA_ONSTACK | SA_RESTART; -#ifdef __BEOS__ +#if defined(__BEOS__) || defined(__HAIKU__) newAction.sa_userdata = (void*)kUserDataMagic; #endif sigaction(SIGALRM, &newAction, NULL); diff --git a/src/tools/cppunit/cppunit/TestFactoryRegistry.cpp b/src/tools/cppunit/cppunit/TestFactoryRegistry.cpp index f3b98e2624..49b53abb76 100644 --- a/src/tools/cppunit/cppunit/TestFactoryRegistry.cpp +++ b/src/tools/cppunit/cppunit/TestFactoryRegistry.cpp @@ -70,7 +70,7 @@ NamedRegistries::getRegistry( string name ) if ( foundIt == m_registries.end() ) { TestFactoryRegistry *factory = new TestFactoryRegistry( name ); -#if defined(__POWERPC__) && defined(__BEOS__) +#if defined(__POWERPC__) && (defined(__BEOS__) || defined(__HAIKU__)) m_registries.insert( pair< const basic_string< char, char_traits< char>, allocator >, diff --git a/src/tools/docbook/libxml2/nanoftp.c b/src/tools/docbook/libxml2/nanoftp.c index c78503bf58..92acc6eae3 100644 --- a/src/tools/docbook/libxml2/nanoftp.c +++ b/src/tools/docbook/libxml2/nanoftp.c @@ -89,13 +89,13 @@ * A couple portability macros */ #ifndef _WINSOCKAPI_ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #define closesocket(s) close(s) #endif #define SOCKET int #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #ifndef PF_INET #define PF_INET AF_INET #endif diff --git a/src/tools/docbook/libxml2/nanohttp.c b/src/tools/docbook/libxml2/nanohttp.c index ae7923f143..2b146ac5ed 100644 --- a/src/tools/docbook/libxml2/nanohttp.c +++ b/src/tools/docbook/libxml2/nanohttp.c @@ -96,13 +96,13 @@ * A couple portability macros */ #ifndef _WINSOCKAPI_ -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) #define closesocket(s) close(s) #endif #define SOCKET int #endif -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) #ifndef PF_INET #define PF_INET AF_INET #endif @@ -845,7 +845,7 @@ xmlNanoHTTPConnectAttempt(struct sockaddr *addr) status = ioctl(s, FIONBIO, &enable); } #else /* VMS */ -#if defined(__BEOS__) +#if (defined(__BEOS__) || defined(__HAIKU__)) { bool noblock = true; status = setsockopt(s, SOL_SOCKET, SO_NONBLOCK, &noblock, sizeof(noblock)); diff --git a/src/tools/docbook/libxml2/runtest.c b/src/tools/docbook/libxml2/runtest.c index cf0fb63a38..92bb8f5282 100644 --- a/src/tools/docbook/libxml2/runtest.c +++ b/src/tools/docbook/libxml2/runtest.c @@ -4023,7 +4023,7 @@ testThread(void) return (res); } -#elif defined __BEOS__ +#elif (defined(__BEOS__) || defined(__HAIKU__)) #include static thread_id tid[MAX_ARGC]; diff --git a/src/tools/fs_shell/command_cp.cpp b/src/tools/fs_shell/command_cp.cpp index 9b6145a98c..efa8f86471 100644 --- a/src/tools/fs_shell/command_cp.cpp +++ b/src/tools/fs_shell/command_cp.cpp @@ -266,7 +266,7 @@ public: if (recLen > size) return FSSH_B_NAME_TOO_LONG; - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) entry->d_dev = hostEntry->d_dev; #endif entry->d_ino = hostEntry->d_ino; diff --git a/src/tools/fs_shell/compatibility.h b/src/tools/fs_shell/compatibility.h index f0ddde9ce4..2a88aa5d78 100644 --- a/src/tools/fs_shell/compatibility.h +++ b/src/tools/fs_shell/compatibility.h @@ -5,7 +5,7 @@ #ifndef _FSSH_COMPATIBILITY_H #define _FSSH_COMPATIBILITY_H -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # ifndef HAIKU_HOST_PLATFORM_HAIKU # include # endif diff --git a/src/tools/fs_shell/errno.cpp b/src/tools/fs_shell/errno.cpp index bd73565f5e..06fd7ef30a 100644 --- a/src/tools/fs_shell/errno.cpp +++ b/src/tools/fs_shell/errno.cpp @@ -33,7 +33,7 @@ fssh_set_errno(int error) int fssh_to_host_error(int error) { - #if __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) return error; #else return _haiku_to_host_error(error); diff --git a/src/tools/fs_shell/fcntl.cpp b/src/tools/fs_shell/fcntl.cpp index 515fb69e36..4654f730b1 100644 --- a/src/tools/fs_shell/fcntl.cpp +++ b/src/tools/fs_shell/fcntl.cpp @@ -16,7 +16,7 @@ using namespace FSShell; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) // The _kern_open() defined in libroot_build.so. extern "C" int _kern_open(int fd, const char *path, int openMode, int perms); @@ -39,7 +39,7 @@ fssh_open(const char *pathname, int oflags, ...) // Use the _kern_open() defined in libroot on BeOS incompatible systems. // Required for proper attribute emulation support. int fd; - #if __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) fd = open(pathname, to_platform_open_mode(oflags), to_platform_mode(mode)); #else diff --git a/src/tools/fs_shell/stat.cpp b/src/tools/fs_shell/stat.cpp index af2c63f55a..120a8f43e2 100644 --- a/src/tools/fs_shell/stat.cpp +++ b/src/tools/fs_shell/stat.cpp @@ -21,7 +21,7 @@ using FSShell::from_platform_stat; using FSShell::to_platform_mode; -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) // The _kern_read_stat() defined in libroot_build.so. extern "C" status_t _kern_read_stat(int fd, const char *path, bool traverseLink, struct stat *st, size_t statSize); @@ -35,7 +35,7 @@ FSShell::unrestricted_stat(const char *path, struct fssh_stat *fsshStat) // Use the _kern_read_stat() defined in libroot on BeOS incompatible // systems. Required for support for opening symlinks. -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if (::stat(path, &st) < 0) return -1; #else @@ -59,7 +59,7 @@ FSShell::unrestricted_fstat(int fd, struct fssh_stat *fsshStat) // Use the _kern_read_stat() defined in libroot on BeOS incompatible // systems. Required for support for opening symlinks. -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if (fstat(fd, &st) < 0) return -1; #else @@ -83,7 +83,7 @@ FSShell::unrestricted_lstat(const char *path, struct fssh_stat *fsshStat) // Use the _kern_read_stat() defined in libroot on BeOS incompatible // systems. Required for support for opening symlinks. -#if __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) if (lstat(path, &st) < 0) return -1; #else diff --git a/src/tools/fs_shell/stat_util.cpp b/src/tools/fs_shell/stat_util.cpp index 0bd4b37e64..20a8c27485 100644 --- a/src/tools/fs_shell/stat_util.cpp +++ b/src/tools/fs_shell/stat_util.cpp @@ -33,7 +33,7 @@ from_platform_mode(mode_t mode) fssh_mode_t fsshMode = 0; // BeOS/Haiku only - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) SET_ST_MODE_BIT(FSSH_S_ATTR_DIR, S_ATTR_DIR); SET_ST_MODE_BIT(FSSH_S_ATTR, S_ATTR); SET_ST_MODE_BIT(FSSH_S_INDEX_DIR, S_INDEX_DIR); @@ -95,7 +95,7 @@ to_platform_mode(fssh_mode_t fsshMode) mode_t mode = 0; // BeOS/Haiku only - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) SET_ST_MODE_BIT(FSSH_S_ATTR_DIR, S_ATTR_DIR); SET_ST_MODE_BIT(FSSH_S_ATTR, S_ATTR); SET_ST_MODE_BIT(FSSH_S_INDEX_DIR, S_INDEX_DIR); diff --git a/src/tools/fs_shell/unistd.cpp b/src/tools/fs_shell/unistd.cpp index f4aec0d9a1..72a3a0441c 100644 --- a/src/tools/fs_shell/unistd.cpp +++ b/src/tools/fs_shell/unistd.cpp @@ -17,7 +17,7 @@ #include "fssh_errno.h" #include "partition_support.h" -#ifdef __BEOS__ +#if (defined(__BEOS__) || defined(__HAIKU__)) # include #else # if defined(HAIKU_HOST_PLATFORM_FREEBSD) \ @@ -42,7 +42,7 @@ #endif -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) // Defined in libroot_build.so. extern "C" int _kern_dup(int fd); extern "C" status_t _kern_close(int fd); @@ -92,7 +92,7 @@ fssh_dup(int fd) // Use the _kern_dup() defined in libroot on BeOS incompatible systems. // Required for proper attribute emulation support. int newFD; - #if __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) newFD = dup(fd); #else newFD = _kern_dup(fd); @@ -115,7 +115,7 @@ fssh_close(int fd) // Use the _kern_close() defined in libroot on BeOS incompatible systems. // Required for proper attribute emulation support. - #if __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) return close(fd); #else return _kern_close(fd); @@ -146,7 +146,7 @@ fssh_ioctl(int fd, unsigned long op, ...) fssh_device_geometry *geometry = va_arg(list, fssh_device_geometry*); - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) device_geometry systemGeometry; if (ioctl(fd, B_GET_GEOMETRY, &systemGeometry) == 0) { geometry->bytes_per_sector @@ -270,7 +270,7 @@ fssh_ioctl(int fd, unsigned long op, ...) case FSSH_B_FLUSH_DRIVE_CACHE: { - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) if (ioctl(fd, B_FLUSH_DRIVE_CACHE) == 0) error = B_OK; else @@ -284,7 +284,7 @@ fssh_ioctl(int fd, unsigned long op, ...) case 10000: // IOCTL_FILE_UNCACHED_IO { - #ifdef __BEOS__ + #if (defined(__BEOS__) || defined(__HAIKU__)) if (ioctl(fd, 10000) == 0) error = B_OK; else diff --git a/src/tools/unzip/unix/unxcfg.h b/src/tools/unzip/unix/unxcfg.h index 33047c20d7..0e6135a109 100644 --- a/src/tools/unzip/unix/unxcfg.h +++ b/src/tools/unzip/unix/unxcfg.h @@ -1,5 +1,5 @@ // That's exactly the BeOS configuration. -#ifndef __BEOS__ +#if (!defined(__BEOS__) && !defined(__HAIKU__)) # include /* [cjh]: This is pretty much a generic */ # include /* POSIX 1003.1 system; see beos/ for */ # include /* extra code to deal with our extra file */