Preparations for removing __BEOS__ from the compiler defines.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-10-23 21:46:26 +00:00
parent 889903f9dd
commit bc3955fea5
136 changed files with 244 additions and 244 deletions
+1 -1
View File
@@ -67,7 +67,7 @@
#ifndef __GNUC_VA_LIST #ifndef __GNUC_VA_LIST
#define __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; typedef char *__gnuc_va_list;
#else #else
typedef void *__gnuc_va_list; typedef void *__gnuc_va_list;
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef __STDBOOL_H__ #ifndef __STDBOOL_H__
#define __STDBOOL_H__ 1 #define __STDBOOL_H__ 1
#ifdef __BEOS__ #if defined(__BEOS__) || defined(__HAIKU__)
typedef unsigned char _Bool; typedef unsigned char _Bool;
#define bool _Bool #define bool _Bool
#define false 0 #define false 0
+2 -2
View File
@@ -168,9 +168,9 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
#endif #endif
#if !(defined (__GNUG__) && defined (size_t)) #if !(defined (__GNUG__) && defined (size_t))
typedef __SIZE_TYPE__ size_t; typedef __SIZE_TYPE__ size_t;
#ifdef __BEOS__ #if defined(__BEOS__) || defined(__HAIKU__)
typedef long ssize_t; typedef long ssize_t;
#endif /* __BEOS__ */ #endif /* __BEOS__ || __HAIKU__ */
#endif /* !(defined (__GNUG__) && defined (size_t)) */ #endif /* !(defined (__GNUG__) && defined (size_t)) */
#endif /* __size_t */ #endif /* __size_t */
#endif /* _SIZET_ */ #endif /* _SIZET_ */
+1 -1
View File
@@ -101,7 +101,7 @@ typedef int __builtin_va_alist_t __attribute__((__mode__(__word__)));
#ifndef __GNUC_VA_LIST #ifndef __GNUC_VA_LIST
#define __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; typedef char *__gnuc_va_list;
#else #else
typedef void *__gnuc_va_list; typedef void *__gnuc_va_list;
+2 -2
View File
@@ -38,7 +38,7 @@
*/ */
#if !defined(__SCITECH_SNAP__) #if !defined(__SCITECH_SNAP__)
#if defined(__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
#include <stdlib.h> /* to get some BeOS-isms */ #include <stdlib.h> /* to get some BeOS-isms */
#endif #endif
@@ -67,7 +67,7 @@
# define GLAPIENTRY # define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */ #endif /* WIN32 && !CYGWIN */
#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) #if ((defined(__BEOS__) || defined(__HAIKU__)) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
# define PRAGMA_EXPORT_SUPPORTED 1 # define PRAGMA_EXPORT_SUPPORTED 1
#endif #endif
+2 -2
View File
@@ -30,7 +30,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <limits.h> #include <limits.h>
#if __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h> # include <stdio.h>
#else #else
#include <iostream.h> #include <iostream.h>
@@ -43,7 +43,7 @@ inline T* allocate(ptrdiff_t size, T*) {
set_new_handler(0); set_new_handler(0);
T* tmp = (T*)(::operator new((size_t)(size * sizeof(T)))); T* tmp = (T*)(::operator new((size_t)(size * sizeof(T))));
if (tmp == 0) { if (tmp == 0) {
#if __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
fprintf(stderr, "out of memory\n"); fprintf(stderr, "out of memory\n");
#else #else
cerr << "out of memory" << endl; cerr << "out of memory" << endl;
+2 -2
View File
@@ -61,7 +61,7 @@ extern void __length_error (const char *);
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
// Needed for atomic_add(): // Needed for atomic_add():
typedef long int32; typedef long int32;
typedef volatile long vint32; typedef volatile long vint32;
@@ -79,7 +79,7 @@ private:
charT* data () { return reinterpret_cast<charT *>(this + 1); } charT* data () { return reinterpret_cast<charT *>(this + 1); }
charT& operator[] (size_t s) { return data () [s]; } 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 (); } charT* grab () { if (selfish) return clone (); atomic_add((vint32*) &ref, 1); return data (); }
void release() { if (atomic_add((int32*) &ref, -1) == 1) delete this; } void release() { if (atomic_add((int32*) &ref, -1) == 1) delete this; }
#else #else
+3 -3
View File
@@ -42,7 +42,7 @@
# include <new> # include <new>
# define __THROW_BAD_ALLOC throw bad_alloc() # define __THROW_BAD_ALLOC throw bad_alloc()
#elif !defined(__THROW_BAD_ALLOC) #elif !defined(__THROW_BAD_ALLOC)
#if __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h> # include <stdio.h>
# define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1) # define __THROW_BAD_ALLOC fprintf(stderr, "out of memory\n"); exit(1)
#else #else
@@ -329,7 +329,7 @@ private:
// instead of enum { x = N }, but few compilers accept the former. // instead of enum { x = N }, but few compilers accept the former.
# ifndef __SUNPRO_CC # ifndef __SUNPRO_CC
enum {_ALIGN = 8}; enum {_ALIGN = 8};
# if defined __BEOS__ # if (defined(__BEOS__) || defined(__HAIKU__))
enum {_MAX_BYTES = 0}; enum {_MAX_BYTES = 0};
# else # else
enum {_MAX_BYTES = 128}; enum {_MAX_BYTES = 128};
@@ -710,7 +710,7 @@ template <bool __threads, int __inst>
__default_alloc_template<__threads, __inst>::_Obj* __VOLATILE __default_alloc_template<__threads, __inst>::_Obj* __VOLATILE
__default_alloc_template<__threads, __inst> ::_S_free_list[ __default_alloc_template<__threads, __inst> ::_S_free_list[
_NFREELISTS _NFREELISTS
#if defined __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
] = { }; ] = { };
#else #else
] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; ] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, };
+1 -1
View File
@@ -291,7 +291,7 @@
!defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \ !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) && \
!defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \ !defined(__STL_LIMITED_DEFAULT_TEMPLATES) && \
!defined(__STL_USE_SGI_ALLOCATORS) || \ !defined(__STL_USE_SGI_ALLOCATORS) || \
defined(__BEOS__) (defined(__BEOS__) || defined(__HAIKU__))
# define __STL_USE_STD_ALLOCATORS # define __STL_USE_STD_ALLOCATORS
# endif # endif
+1 -1
View File
@@ -4,7 +4,7 @@
/* External API definitions */ /* 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 #define XML_USE_MSC_EXTENSIONS 1
#endif #endif
+1 -1
View File
@@ -439,7 +439,7 @@ extern NCURSES_EXPORT(int) wresize (WINDOW *, int, int);
*/ */
#if 1 #if 1
#ifdef NCURSES_WGETCH_EVENTS #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 # define NCURSES_EVENT_VERSION 1
#endif /* !defined(__BEOS__) */ #endif /* !defined(__BEOS__) */
+1 -1
View File
@@ -231,7 +231,7 @@
# endif # endif
#endif #endif
#if defined (__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
# ifdef ZLIB_DLL # ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL # ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport) # define ZEXPORT __declspec(dllexport)
+1 -1
View File
@@ -436,7 +436,7 @@ extern int CardServices(int func, void *a1, void *a2, void *a3);
extern int CardServices(int func, ...); extern int CardServices(int func, ...);
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#define SS_MODULE_NAME(s) ("busses/pcmcia/" s "/v1") #define SS_MODULE_NAME(s) ("busses/pcmcia/" s "/v1")
#define MTD_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" #define CS_CLIENT_MODULE_NAME "bus_managers/pcmcia_cs/client/v1"
+2 -2
View File
@@ -129,7 +129,7 @@ typedef union ds_ioctl_arg_t {
typedef struct dev_link_t { typedef struct dev_link_t {
dev_node_t *dev; dev_node_t *dev;
u_int state, open; u_int state, open;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
wait_queue_head_t pending; wait_queue_head_t pending;
struct timer_list release; struct timer_list release;
#endif #endif
@@ -164,7 +164,7 @@ int unregister_pccard_driver(dev_info_t *dev_info);
#define register_pcmcia_driver register_pccard_driver #define register_pcmcia_driver register_pccard_driver
#define unregister_pcmcia_driver unregister_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" #define DS_MODULE_NAME "bus_managers/pcmcia_ds/v2"
typedef struct ds_module_info { typedef struct ds_module_info {
bus_manager_info binfo; bus_manager_info binfo;
+2 -2
View File
@@ -38,7 +38,7 @@
*/ */
#if !defined(__SCITECH_SNAP__) #if !defined(__SCITECH_SNAP__)
#if defined(__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
#include <stdlib.h> /* to get some BeOS-isms */ #include <stdlib.h> /* to get some BeOS-isms */
#endif #endif
@@ -67,7 +67,7 @@
# define GLAPIENTRY # define GLAPIENTRY
#endif /* WIN32 && !CYGWIN */ #endif /* WIN32 && !CYGWIN */
#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) #if ((defined(__BEOS__) || defined(__HAIKU__)) && defined(__POWERPC__)) || defined(__QUICKDRAW__)
# define PRAGMA_EXPORT_SUPPORTED 1 # define PRAGMA_EXPORT_SUPPORTED 1
#endif #endif
+1 -1
View File
@@ -28,7 +28,7 @@
#ifndef _REGEX_H #ifndef _REGEX_H
#define _REGEX_H 1 #define _REGEX_H 1
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# undef __STDC__ # undef __STDC__
# define __STDC__ 1 # define __STDC__ 1
#endif #endif
+1 -1
View File
@@ -16,7 +16,7 @@
*/ */
#if defined(__POWERPC__) && defined(__BEOS__) #if defined(__POWERPC__) && (defined(__BEOS__) || defined(__HAIKU__))
#define CPPUNIT_HAVE_SSTREAM 1 #define CPPUNIT_HAVE_SSTREAM 1
#undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST #undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
#endif #endif
@@ -232,7 +232,7 @@
#elif defined(__NetBSD__) #elif defined(__NetBSD__)
#include "acnetbsd.h" #include "acnetbsd.h"
#elif defined(__BEOS__) #elif (defined(__BEOS__) || defined(__HAIKU__))
#include "achaiku.h" #include "achaiku.h"
#elif defined(MODESTO) #elif defined(MODESTO)
@@ -6,7 +6,7 @@
#include <sys/types.h> #include <sys/types.h>
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# if __POWERPC__ # if __POWERPC__
# include "regex.h" // use included regex if system doesn't provide one # include "regex.h" // use included regex if system doesn't provide one
# else # else
@@ -36,7 +36,7 @@
#include "IOCallback.h" #include "IOCallback.h"
#include <string> #include <string>
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <sstream> #include <sstream>
#else #else
#include <strstream> #include <strstream>
@@ -72,7 +72,7 @@ extern "C" {
typedef uint16_t uint16; typedef uint16_t uint16;
typedef uint8_t uint8; typedef uint8_t uint8;
# endif // __GNUC__ # endif // __GNUC__
#elif defined(__BEOS__) #elif (defined(__BEOS__) || defined(__HAIKU__))
#include <SupportDefs.h> #include <SupportDefs.h>
#elif defined(DJGPP) /* SL : DJGPP doesn't support POSIX types ???? */ #elif defined(DJGPP) /* SL : DJGPP doesn't support POSIX types ???? */
typedef signed long long int64; typedef signed long long int64;
@@ -98,7 +98,7 @@ extern "C" {
typedef uint32_t uint32; typedef uint32_t uint32;
typedef uint16_t uint16; typedef uint16_t uint16;
typedef uint8_t uint8; typedef uint8_t uint8;
#elif defined(__BEOS__) #elif (defined(__BEOS__) || defined(__HAIKU__))
# include <support/SupportDefs.h> # include <support/SupportDefs.h>
#else // anything else (Linux, BSD, ...) #else // anything else (Linux, BSD, ...)
# include <sys/types.h> # include <sys/types.h>
@@ -11,7 +11,7 @@
******************************************************************** ********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal. 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 #ifndef _OS_TYPES_H
@@ -61,7 +61,7 @@
typedef u_int32_t ogg_uint32_t; typedef u_int32_t ogg_uint32_t;
typedef int64_t ogg_int64_t; typedef int64_t ogg_int64_t;
#elif defined(__BEOS__) #elif (defined(__BEOS__) || defined(__HAIKU__))
/* Be */ /* Be */
# include <inttypes.h> # include <inttypes.h>
@@ -13,7 +13,7 @@
******************************************************************** ********************************************************************
function: #ifdef jail to whip a few platforms into the UNIX ideal. 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)) # define max(x,y) ((x)<(y)?(y):(x))
#endif #endif
#if defined(__i386__) && defined(__GNUC__) && !defined(__BEOS__) #if defined(__i386__) && defined(__GNUC__) && !(defined(__BEOS__) || defined(__HAIKU__))
# define VORBIS_FPU_CONTROL # define VORBIS_FPU_CONTROL
/* both GCC and MSVC are kinda stupid about rounding/casting to int. /* both GCC and MSVC are kinda stupid about rounding/casting to int.
Because of encapsulation constraints (GCC can't see inside the asm Because of encapsulation constraints (GCC can't see inside the asm
+1 -1
View File
@@ -34,7 +34,7 @@
#include <hpgsimage.h> #include <hpgsimage.h>
#include <math.h> #include <math.h>
#include <errno.h> #include <errno.h>
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include <png.h> #include <png.h>
#else #else
#include <libpng12/png.h> #include <libpng12/png.h>
+1 -1
View File
@@ -434,7 +434,7 @@ rl_getc (stream)
if (result == 0) if (result == 0)
return (EOF); return (EOF);
#if defined (__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
if (errno == EINTR) if (errno == EINTR)
continue; continue;
#endif #endif
+2 -2
View File
@@ -57,12 +57,12 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; 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 */ #endif /* LIBC_SCCS and not lint */
#include <config.h> #include <config.h>
#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 <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
+6 -6
View File
@@ -45,7 +45,7 @@ int
isnetconn (fd) isnetconn (fd)
int 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; int rv;
socklen_t l; socklen_t l;
struct sockaddr sa; struct sockaddr sa;
@@ -54,7 +54,7 @@ isnetconn (fd)
rv = getpeername(fd, &sa, &l); rv = getpeername(fd, &sa, &l);
/* Solaris 2.5 getpeername() returns EINVAL if the fd is not a socket. */ /* Solaris 2.5 getpeername() returns EINVAL if the fd is not a socket. */
return ((rv < 0 && (errno == ENOTSOCK || errno == EINVAL)) ? 0 : 1); 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) # if defined (SVR4) || defined (SVR4_2)
/* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */ /* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */
struct stat sb; struct stat sb;
@@ -69,15 +69,15 @@ isnetconn (fd)
# endif /* S_ISFIFO */ # endif /* S_ISFIFO */
return (S_ISCHR (sb.st_mode)); return (S_ISCHR (sb.st_mode));
# else /* !SVR4 && !SVR4_2 */ # else /* !SVR4 && !SVR4_2 */
# if defined (S_ISSOCK) && !defined (__BEOS__) # if defined (S_ISSOCK) && !defined (__BEOS__) && !defined(__HAIKU__)
struct stat sb; struct stat sb;
if (fstat (fd, &sb) < 0) if (fstat (fd, &sb) < 0)
return (0); return (0);
return (S_ISSOCK (sb.st_mode)); return (S_ISSOCK (sb.st_mode));
# else /* !S_ISSOCK || __BEOS__ */ # else /* !S_ISSOCK || __BEOS__ || __HAIKU__ */
return (0); return (0);
# endif /* !S_ISSOCK || __BEOS__ */ # endif /* !S_ISSOCK || __BEOS__ || __HAIKU__ */
# endif /* !SVR4 && !SVR4_2 */ # endif /* !SVR4 && !SVR4_2 */
#endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ #endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ || __HAIKU__ */
} }
+1 -1
View File
@@ -430,7 +430,7 @@ copy_entry(const char *sourcePath, const char *destPath,
destNode->SetOwner(sourceStat.st_uid); destNode->SetOwner(sourceStat.st_uid);
destNode->SetGroup(sourceStat.st_gid); destNode->SetGroup(sourceStat.st_gid);
destNode->SetPermissions(sourceStat.st_mode); destNode->SetPermissions(sourceStat.st_mode);
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
destNode->SetCreationTime(sourceStat.st_crtime); destNode->SetCreationTime(sourceStat.st_crtime);
#endif #endif
destNode->SetModificationTime(sourceStat.st_mtime); destNode->SetModificationTime(sourceStat.st_mtime);
+1 -1
View File
@@ -20462,7 +20462,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <sys/types.h> #include <sys/types.h>
#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 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 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. one of the corresponding file systems is hard-mounted, but not available.
+1 -1
View File
@@ -84,7 +84,7 @@
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -102,7 +102,7 @@ extern int open (const char *, int, ...);
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -110,7 +110,7 @@ get_charset_aliases (void)
cp = charset_aliases; cp = charset_aliases;
if (cp == NULL) 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; FILE *fp;
const char *dir; const char *dir;
const char *base = "charset.alias"; const char *base = "charset.alias";
+2 -2
View File
@@ -58,7 +58,7 @@
/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
definitions below, but temporarily we have to #undef them. */ definitions below, but temporarily we have to #undef them. */
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <OS.h> /* defines bool but not _Bool */ # include <OS.h> /* defines bool but not _Bool */
# undef false # undef false
# undef true # 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.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 (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'. */ 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'. */ /* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they /* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */ are the same types. */
+1 -1
View File
@@ -54,7 +54,7 @@
#include "xreadlink.h" #include "xreadlink.h"
#include "yesno.h" #include "yesno.h"
#if __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <fs_attr.h> # include <fs_attr.h>
#endif #endif
+2 -2
View File
@@ -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 want to mess up the terminal if control chars get sent to it, and some
quoting methods pass through control chars as-is. */ quoting methods pass through control chars as-is. */
static bool qmark_funny_chars; 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 #define QMARK_FUNNY_CHARS_TTY 0
#else #else
#define QMARK_FUNNY_CHARS_TTY 1 #define QMARK_FUNNY_CHARS_TTY 1
@@ -3484,7 +3484,7 @@ print_long_format (const struct fileinfo *f)
p = buf; p = buf;
} }
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (f->stat_ok if (f->stat_ok
&& (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode))) && (S_ISCHR (f->stat.st_mode) || S_ISBLK (f->stat.st_mode)))
{ {
+1 -1
View File
@@ -172,7 +172,7 @@ extern int errno;
#include <unixlib.h> #include <unixlib.h>
#endif /* atarist || VMS */ #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 #define O_BINARY 0
#endif #endif
+1 -1
View File
@@ -480,7 +480,7 @@ char *alloca ();
# define O_BINARY _O_BINARY # define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -178,7 +178,7 @@ net_open (struct serial *scb, const char *name)
tmp = 0; tmp = 0;
ioctl (scb->fd, FIONBIO, &tmp); ioctl (scb->fd, FIONBIO, &tmp);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (use_udp == 0) if (use_udp == 0)
{ {
/* Disable Nagle algorithm. Needed in some cases. */ /* Disable Nagle algorithm. Needed in some cases. */
+2 -2
View File
@@ -32,7 +32,7 @@
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#if !defined(_MINIX) && !defined(__BEOS__) #if !defined(_MINIX) && !(defined(__BEOS__) || defined(__HAIKU__))
# include <sys/file.h> # include <sys/file.h>
#endif #endif
#include "posixstat.h" #include "posixstat.h"
@@ -347,7 +347,7 @@ history_truncate_file (fname, lines)
{ {
write (file, bp, chars_read - (bp - buffer)); write (file, bp, chars_read - (bp - buffer));
#if defined (__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS ignores O_TRUNC. */ /* BeOS ignores O_TRUNC. */
ftruncate (file, chars_read - (bp - buffer)); ftruncate (file, chars_read - (bp - buffer));
#endif #endif
+1 -1
View File
@@ -434,7 +434,7 @@ rl_getc (stream)
if (result == 0) if (result == 0)
return (EOF); return (EOF);
#if defined (__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
if (errno == EINTR) if (errno == EINTR)
continue; continue;
#endif #endif
+1 -1
View File
@@ -108,7 +108,7 @@ char *alloca ();
# define O_BINARY _O_BINARY # define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef HAVE_GETPAGESIZE #ifndef HAVE_GETPAGESIZE
#if !defined getpagesize && defined __BEOS__ #if !defined getpagesize && (defined(__BEOS__) || defined(__HAIKU__))
# include <OS.h> # include <OS.h>
# define getpagesize() B_PAGE_SIZE # define getpagesize() B_PAGE_SIZE
#endif #endif
+1 -1
View File
@@ -53,7 +53,7 @@ extern char *sys_errlist[];
#endif #endif
/* Some operating systems treat text and binary files differently. */ /* 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. */ # undef O_BINARY /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
#endif #endif
#ifdef HAVE_DOS_FILE_CONTENTS #ifdef HAVE_DOS_FILE_CONTENTS
+4 -4
View File
@@ -270,7 +270,7 @@ Keymap::Dump()
status_t status_t
Keymap::LoadCurrent() Keymap::LoadCurrent()
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
key_map *keys = NULL; key_map *keys = NULL;
get_key_map(&keys, &fChars); get_key_map(&keys, &fChars);
if (!keys) if (!keys)
@@ -1096,7 +1096,7 @@ status_t _restore_key_map_();
void void
Keymap::RestoreSystemDefault() Keymap::RestoreSystemDefault()
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
// work-around to get rid of this stupid find_directory_r() on Zeta // work-around to get rid of this stupid find_directory_r() on Zeta
# ifdef find_directory # ifdef find_directory
# undef find_directory # undef find_directory
@@ -1121,7 +1121,7 @@ Keymap::RestoreSystemDefault()
void void
Keymap::SaveAsCurrent() Keymap::SaveAsCurrent()
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
BPath path; BPath path;
if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK) if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) != B_OK)
return; return;
@@ -1149,7 +1149,7 @@ Keymap::SaveAsCurrent()
status_t status_t
Keymap::Use() Keymap::Use()
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
return _restore_key_map_(); return _restore_key_map_();
#else // ! __BEOS__ #else // ! __BEOS__
+1 -1
View File
@@ -31,7 +31,7 @@
# define O_BINARY _O_BINARY # define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+2 -2
View File
@@ -55,7 +55,7 @@
/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
definitions below, but temporarily we have to #undef them. */ definitions below, but temporarily we have to #undef them. */
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <OS.h> /* defines bool but not _Bool */ # include <OS.h> /* defines bool but not _Bool */
# undef false # undef false
# undef true # 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.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 (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'. */ 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'. */ /* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they /* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */ are the same types. */
+1 -1
View File
@@ -231,7 +231,7 @@ ar_scan (char *archive, long int (*function) PARAMS ((void)), long int arg)
#endif #endif
#ifndef WINDOWS32 #ifndef WINDOWS32
# ifndef __BEOS__ # if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <ar.h> # include <ar.h>
# else # else
/* BeOS 5 doesn't have <ar.h> but has archives in the same format /* BeOS 5 doesn't have <ar.h> but has archives in the same format
+1 -1
View File
@@ -175,7 +175,7 @@ extern void bcopy ();
# define strcoll strcmp # define strcoll strcmp
#endif #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 # define HAVE_MEMPCPY 1
# undef mempcpy # undef mempcpy
# define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len) # define mempcpy(Dest, Src, Len) __mempcpy (Dest, Src, Len)
@@ -319,7 +319,7 @@ main(int argc, const char *const *argv)
} else if (S_ISCHR(st.st_mode)) { } else if (S_ISCHR(st.st_mode)) {
// character special: a device or partition under BeOS // character special: a device or partition under BeOS
// or under FreeBSD // 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 " fprintf(stderr, "Error: Character special devices not "
"supported on this platform.\n"); "supported on this platform.\n");
@@ -514,7 +514,7 @@ main(int argc, const char *const *argv)
exit(1); exit(1);
} }
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
// get a partition info // get a partition info
if (!noPartition if (!noPartition
+6 -6
View File
@@ -1431,7 +1431,7 @@ pass(char *passwd)
goto skip; goto skip;
} }
rval = strcmp(pw->pw_passwd, xpasswd); rval = strcmp(pw->pw_passwd, xpasswd);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (pw->pw_expire && time(NULL) >= pw->pw_expire) if (pw->pw_expire && time(NULL) >= pw->pw_expire)
rval = 1; /* failure */ rval = 1; /* failure */
#endif #endif
@@ -1494,7 +1494,7 @@ skip:
setusercontext(lc, pw, 0, setusercontext(lc, pw, 0,
LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY| LOGIN_SETLOGIN|LOGIN_SETGROUP|LOGIN_SETPRIORITY|
LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC); LOGIN_SETRESOURCES|LOGIN_SETUMASK|LOGIN_SETMAC);
#elif !defined(__BEOS__) #elif !(defined(__BEOS__) || defined(__HAIKU__))
setlogin(pw->pw_name); setlogin(pw->pw_name);
(void) initgroups(pw->pw_name, pw->pw_gid); (void) initgroups(pw->pw_name, pw->pw_gid);
#endif #endif
@@ -1531,7 +1531,7 @@ skip:
#endif #endif
; ;
chrootdir = NULL; chrootdir = NULL;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
/* /*
* For a chrooted local user, * For a chrooted local user,
* a) see whether ftpchroot(5) specifies a chroot directory, * a) see whether ftpchroot(5) specifies a chroot directory,
@@ -1549,7 +1549,7 @@ skip:
} }
#endif #endif
if (guest || dochroot) { if (guest || dochroot) {
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
/* /*
* If no chroot directory set yet, use the login directory. * If no chroot directory set yet, use the login directory.
* Copy it so it can be modified while pw->pw_dir stays intact. * 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); netfd = fileno(outstr);
filefd = fileno(instr); filefd = fileno(instr);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (isreg) { if (isreg) {
char *msg = "Transfer complete."; char *msg = "Transfer complete.";
off_t cnt, offset; off_t cnt, offset;
@@ -3244,7 +3244,7 @@ send_file_list(char *whichf)
CHECKOOB(goto abrt); CHECKOOB(goto abrt);
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
if (dir->d_name[0] == '.' && dir->d_name[1] == '\0') if (dir->d_name[0] == '.' && dir->d_name[1] == '\0')
continue; continue;
if (dir->d_name[0] == '.' && dir->d_name[1] == '.' && if (dir->d_name[0] == '.' && dir->d_name[1] == '.' &&
+2 -2
View File
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: src/libexec/ftpd/logwtmp.c,v 1.13 2004/11/18 13:46:29 yar Ex
#include <fcntl.h> #include <fcntl.h>
#include <time.h> #include <time.h>
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <timeconv.h> #include <timeconv.h>
#include <utmp.h> #include <utmp.h>
#endif #endif
@@ -71,7 +71,7 @@ ftpd_logwtmp(line, name, addr)
char *line, *name; char *line, *name;
struct sockaddr *addr; struct sockaddr *addr;
{ {
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
struct utmp ut; struct utmp ut;
struct stat buf; struct stat buf;
char host[UT_HOSTSIZE]; char host[UT_HOSTSIZE];
+1 -1
View File
@@ -37,7 +37,7 @@ __FBSDID("$FreeBSD: src/lib/libmd/md5c.c,v 1.17 2006/01/17 15:35:56 phk Exp $");
#include <string.h> #include <string.h>
#endif #endif
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <machine/endian.h> #include <machine/endian.h>
#include <sys/endian.h> #include <sys/endian.h>
#endif #endif
+2 -2
View File
@@ -366,7 +366,7 @@ show_dlts_and_exit(pcap_t *pd)
#define U_FLAG #define U_FLAG
#endif #endif
#if !defined(WIN32) && !defined(__BEOS__) #if !defined(WIN32) && !(defined(__BEOS__) || defined(__HAIKU__))
/* Drop root privileges and chroot if necessary */ /* Drop root privileges and chroot if necessary */
static void static void
droproot(const char *username, const char *chroot_dir) droproot(const char *username, const char *chroot_dir)
@@ -994,7 +994,7 @@ main(int argc, char **argv)
callback = print_packet; callback = print_packet;
pcap_userdata = (u_char *)&printinfo; 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 * We cannot do this earlier, because we want to be able to open
* the file (if done) for writing before giving up permissions. * the file (if done) for writing before giving up permissions.
+1 -1
View File
@@ -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 $"); __FBSDID("$FreeBSD: src/contrib/telnet/telnet/commands.c,v 1.35 2005/02/28 12:46:52 tobez Exp $");
#include <sys/param.h> #include <sys/param.h>
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <sys/file.h> # include <sys/file.h>
#endif #endif
#include <sys/socket.h> #include <sys/socket.h>
+2 -2
View File
@@ -118,7 +118,7 @@ int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
int ch; int ch;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
char *ep; char *ep;
u_long ultmp; u_long ultmp;
#endif #endif
@@ -187,7 +187,7 @@ main(int argc, char *argv[])
doaddrlookup = 0; doaddrlookup = 0;
break; break;
case 'S': case 'S':
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
fprintf(stderr, "-S option is not supported\n"); fprintf(stderr, "-S option is not supported\n");
#else #else
# ifdef HAS_GETTOS # ifdef HAS_GETTOS
+6 -6
View File
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD: src/contrib/telnet/telnetd/sys_term.c,v 1.18 2003/05/04 02:5
#include <sys/types.h> #include <sys/types.h>
#include <libutil.h> #include <libutil.h>
#include <stdlib.h> #include <stdlib.h>
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <sys/tty.h> # include <sys/tty.h>
# include <utmp.h> # include <utmp.h>
#endif #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 *); int cleanopen(char *);
void scrub_env(void); void scrub_env(void);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
struct utmp wtmp; struct utmp wtmp;
@@ -408,7 +408,7 @@ getpty(int *ptynum __unused)
char *p1, *p2; char *p1, *p2;
int i; int i;
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
(void) strcpy(line, "/dev/pt/XX"); (void) strcpy(line, "/dev/pt/XX");
#else #else
(void) strcpy(line, _PATH_DEV); (void) strcpy(line, _PATH_DEV);
@@ -989,7 +989,7 @@ cleanopen(char *li)
(void) chown(li, 0, 0); (void) chown(li, 0, 0);
(void) chmod(li, 0600); (void) chmod(li, 0600);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
(void) revoke(li); (void) revoke(li);
#endif #endif
@@ -1002,7 +1002,7 @@ cleanopen(char *li)
} }
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* taken from DragonFly's telnetd */ /* taken from DragonFly's telnetd */
int int
login_tty(int t) login_tty(int t)
@@ -1372,7 +1372,7 @@ cleanup(int sig __unused)
*/ */
sigfillset(&mask); sigfillset(&mask);
sigprocmask(SIG_SETMASK, &mask, NULL); sigprocmask(SIG_SETMASK, &mask, NULL);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (logout(p)) if (logout(p))
logwtmp(p, "", ""); logwtmp(p, "", "");
(void)chmod(line, 0666); (void)chmod(line, 0666);
+6 -6
View File
@@ -47,7 +47,7 @@ __FBSDID("$FreeBSD: src/contrib/telnet/telnetd/telnetd.c,v 1.28 2005/05/21 15:28
#include <libutil.h> #include <libutil.h>
#include <paths.h> #include <paths.h>
#include <termcap.h> #include <termcap.h>
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <utmp.h> # include <utmp.h>
#endif #endif
@@ -136,7 +136,7 @@ main(int argc, char *argv[])
struct sockaddr_storage from; struct sockaddr_storage from;
int on = 1, fromlen; int on = 1, fromlen;
int ch; int ch;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
u_long ultmp; u_long ultmp;
char *ep; char *ep;
#endif #endif
@@ -273,7 +273,7 @@ main(int argc, char *argv[])
break; break;
case 'S': case 'S':
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
fprintf(stderr, "-S option is not supported\n"); fprintf(stderr, "-S option is not supported\n");
#else #else
# ifdef HAS_GETTOS # ifdef HAS_GETTOS
@@ -699,7 +699,7 @@ doit(struct sockaddr *who)
Please contact your net administrator"); Please contact your net administrator");
remote_hostname[sizeof(remote_hostname) - 1] = '\0'; remote_hostname[sizeof(remote_hostname) - 1] = '\0';
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
trimdomain(remote_hostname, UT_HOSTSIZE); trimdomain(remote_hostname, UT_HOSTSIZE);
#endif #endif
if (!isdigit(remote_hostname[0]) && strlen(remote_hostname) > utmp_len) 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)) if (my_state_is_wont(TELOPT_ECHO))
send_will(TELOPT_ECHO, 1); send_will(TELOPT_ECHO, 1);
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
/* /*
* Turn on packet mode * Turn on packet mode
*/ */
@@ -1099,7 +1099,7 @@ telnet(int f, int p, char *host)
pcc = 1; pcc = 1;
} }
#endif /* LINEMODE */ #endif /* LINEMODE */
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
if (ptyibuf[0] & TIOCPKT_FLUSHWRITE) { if (ptyibuf[0] & TIOCPKT_FLUSHWRITE) {
netclear(); /* clear buffer back */ netclear(); /* clear buffer back */
# ifndef NO_URGENT # ifndef NO_URGENT
+1 -1
View File
@@ -684,7 +684,7 @@ test_socket_open (int sock)
# define close(fd) closesocket (fd) # define close(fd) closesocket (fd)
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# define read(fd, buf, cnt) recv (fd, buf, cnt, 0) # define read(fd, buf, cnt) recv (fd, buf, cnt, 0)
# define write(fd, buf, cnt) send (fd, buf, cnt, 0) # define write(fd, buf, cnt) send (fd, buf, cnt, 0)
#endif #endif
+6 -6
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL. file under either the MPL or the GPL.
======================================================================*/ ======================================================================*/
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h> #include <OS.h>
#endif #endif
@@ -67,7 +67,7 @@ static char *configpath = "/etc/pcmcia";
static char *scheme, *stabfile; static char *scheme, *stabfile;
/*====================================================================*/ /*====================================================================*/
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
static int major = 0; static int major = 0;
static int lookup_dev(char *name) static int lookup_dev(char *name)
@@ -96,7 +96,7 @@ static int lookup_dev(char *name)
static int open_sock(int sock) static int open_sock(int sock)
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
char fn[B_OS_NAME_LENGTH]; char fn[B_OS_NAME_LENGTH];
sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock);
return open(fn, O_RDONLY); return open(fn, O_RDONLY);
@@ -493,7 +493,7 @@ static int fetch_stab(void)
return 0; return 0;
} }
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
static void eprintf(char *name, char *fmt, ...) static void eprintf(char *name, char *fmt, ...)
{ {
va_list args; va_list args;
@@ -510,7 +510,7 @@ static int execute(stab_t *s, char *action, char *scheme)
int ret; int ret;
char cmd[133]; char cmd[133];
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
eprintf("SOCKET", "%d", s->socket); eprintf("SOCKET", "%d", s->socket);
eprintf("INSTANCE", "%d", s->instance); eprintf("INSTANCE", "%d", s->instance);
#endif #endif
@@ -695,7 +695,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
major = lookup_dev("pcmcia"); major = lookup_dev("pcmcia");
if (major < 0) { if (major < 0) {
if (major == -ENODEV) if (major == -ENODEV)
+4 -4
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL. file under either the MPL or the GPL.
======================================================================*/ ======================================================================*/
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h> #include <OS.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@@ -53,7 +53,7 @@ static int verbose = 0;
static char indent[10] = " "; static char indent[10] = " ";
/*====================================================================*/ /*====================================================================*/
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
static int major = 0; static int major = 0;
static int lookup_dev(char *name) static int lookup_dev(char *name)
@@ -81,7 +81,7 @@ static int lookup_dev(char *name)
static int open_sock(int sock) static int open_sock(int sock)
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
char fn[B_OS_NAME_LENGTH]; char fn[B_OS_NAME_LENGTH];
sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock);
return open(fn, O_RDONLY); return open(fn, O_RDONLY);
@@ -1040,7 +1040,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
major = lookup_dev("pcmcia"); major = lookup_dev("pcmcia");
if (major < 0) { if (major < 0) {
fprintf(stderr, "no pcmcia driver in /proc/devices\n"); fprintf(stderr, "no pcmcia driver in /proc/devices\n");
+4 -4
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL. file under either the MPL or the GPL.
======================================================================*/ ======================================================================*/
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h> #include <OS.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
@@ -51,7 +51,7 @@
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
/*====================================================================*/ /*====================================================================*/
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
static int major = 0; static int major = 0;
static int lookup_dev(char *name) static int lookup_dev(char *name)
@@ -80,7 +80,7 @@ static int lookup_dev(char *name)
static int open_sock(int sock) static int open_sock(int sock)
{ {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
char fn[B_OS_NAME_LENGTH]; char fn[B_OS_NAME_LENGTH];
sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock); sprintf(fn, "/dev/bus/pcmcia/sock/%d", sock);
return open(fn, O_RDONLY); return open(fn, O_RDONLY);
@@ -236,7 +236,7 @@ int main(int argc, char *argv[])
u_int mask; u_int mask;
ds_ioctl_arg_t arg; ds_ioctl_arg_t arg;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
major = lookup_dev("pcmcia"); major = lookup_dev("pcmcia");
if (major < 0) { if (major < 0) {
fprintf(stderr, "no pcmcia driver in /proc/devices\n"); fprintf(stderr, "no pcmcia driver in /proc/devices\n");
+1 -1
View File
@@ -10,7 +10,7 @@ extern "C" {
#endif #endif
// Already defined unter Linux. // Already defined unter Linux.
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
extern size_t strnlen(const char *string, size_t count); extern size_t strnlen(const char *string, size_t count);
#endif #endif
+3 -3
View File
@@ -1,6 +1,6 @@
/* RCS compile-time configuration */ /* RCS compile-time configuration */
/* $Id: conf.h,v 1.1 2003/06/11 15:56:09 darkwyrm Exp $ */ /* $Id$ */
/* /*
* This file is generated automatically. * This file is generated automatically.
@@ -73,7 +73,7 @@
/* #define has_varargs ? */ /* Does <varargs.h> work? */ /* #define has_varargs ? */ /* Does <varargs.h> work? */
#define va_start_args 2 /* How many args does va_start() take? */ #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. */ /* Text and binary i/o behave differently. */
/* This is incompatible with Posix and Unix. */ /* This is incompatible with Posix and Unix. */
# define FOPEN_RB "rb" # define FOPEN_RB "rb"
@@ -246,7 +246,7 @@ typedef void *malloc_type; /* type returned by malloc() */
/* traditional BSD */ /* 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[]; extern char const * const sys_siglist[];
#endif #endif
+2 -2
View File
@@ -1,6 +1,6 @@
/* example RCS compile-time configuration */ /* 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 * This example RCS compile-time configuration describes a host that conforms
@@ -73,7 +73,7 @@
/* #define has_varargs ? */ /* Does <varargs.h> work? */ /* #define has_varargs ? */ /* Does <varargs.h> work? */
#define va_start_args 2 /* How many args does va_start() take? */ #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. */ /* Text and binary i/o behave differently. */
/* This is incompatible with Posix and Unix. */ /* This is incompatible with Posix and Unix. */
# define FOPEN_RB "rb" # define FOPEN_RB "rb"
+1 -1
View File
@@ -117,7 +117,7 @@ char *alloca ();
# define O_BINARY _O_BINARY # define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -105,7 +105,7 @@ extern int open (const char *, int, ...);
# define O_TEXT _O_TEXT # define O_TEXT _O_TEXT
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY # undef O_BINARY
# undef O_TEXT # undef O_TEXT
+1 -1
View File
@@ -25,7 +25,7 @@
#define _GL_FLOAT_H #define _GL_FLOAT_H
/* 'long double' properties. */ /* 'long double' properties. */
#if defined __i386__ && defined __BEOS__ #if defined __i386__ && (defined(__BEOS__) || defined(__HAIKU__))
/* Number of mantissa units, in base FLT_RADIX. */ /* Number of mantissa units, in base FLT_RADIX. */
# undef LDBL_MANT_DIG # undef LDBL_MANT_DIG
# define LDBL_MANT_DIG 64 # define LDBL_MANT_DIG 64
+2 -2
View File
@@ -58,7 +58,7 @@
/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
definitions below, but temporarily we have to #undef them. */ definitions below, but temporarily we have to #undef them. */
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <OS.h> /* defines bool but not _Bool */ # include <OS.h> /* defines bool but not _Bool */
# undef false # undef false
# undef true # 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.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 (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'. */ 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'. */ /* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they /* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */ are the same types. */
+1 -1
View File
@@ -182,7 +182,7 @@ local_wcslen (const wchar_t *s)
# /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. # /* 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 But don't use it on BeOS, since BeOS snprintf produces no output if the
size argument is >= 0x3000000. */ 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 # define USE_SNPRINTF 1
# else # else
# define USE_SNPRINTF 0 # define USE_SNPRINTF 0
+1 -1
View File
@@ -24,7 +24,7 @@
#endif #endif
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#define _UNIX #define _UNIX
#define _BEOS #define _BEOS
#endif #endif
+1 -1
View File
@@ -5,7 +5,7 @@ typedef unsigned char byte; //8 bits
typedef unsigned short ushort; //preferably 16 bits, but can be more typedef unsigned short ushort; //preferably 16 bits, but can be more
typedef unsigned int uint; //32 bits or more typedef unsigned int uint; //32 bits or more
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
typedef unsigned int uint32; //32 bits exactly typedef unsigned int uint32; //32 bits exactly
#endif #endif
typedef int sint32; //signed 32 bits exactly typedef int sint32; //signed 32 bits exactly
+1 -1
View File
@@ -1748,7 +1748,7 @@ time_t dos_to_unix_time(dosdatetime)
#else /* !(BSD || MTS || __GO32__) */ #else /* !(BSD || MTS || __GO32__) */
/* tzset was already called at start of process_zipfiles() */ /* tzset was already called at start of process_zipfiles() */
/* tzset(); */ /* set `timezone' variable */ /* 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 */ m_time += timezone; /* seconds WEST of GMT: add */
#endif #endif
#endif /* ?(BSD || MTS || __GO32__) */ #endif /* ?(BSD || MTS || __GO32__) */
+3 -3
View File
@@ -50,7 +50,7 @@
# define GLOBAL(g) G.g # define GLOBAL(g) G.g
#endif #endif
#ifdef __BEOS__ /* why yes, we do */ #if (defined(__BEOS__) || defined(__HAIKU__)) /* why yes, we do */
# define HAVE_TERMIOS_H # define HAVE_TERMIOS_H
#endif #endif
@@ -332,7 +332,7 @@ void Echon(__G)
#if (defined(UNZIP) && !defined(FUNZIP)) #if (defined(UNZIP) && !defined(FUNZIP))
#if (defined(UNIX) || defined(__BEOS__)) #if (defined(UNIX) || (defined(__BEOS__) || defined(__HAIKU__)))
#ifdef MORE #ifdef MORE
/* /*
@@ -584,7 +584,7 @@ char *getp(__G__ m, p, n)
#else /* !HAVE_WORKING_GETCH */ #else /* !HAVE_WORKING_GETCH */
#if (defined(UNIX) || defined(__MINT__) || defined(__BEOS__)) #if (defined(UNIX) || defined(__MINT__) || (defined(__BEOS__) || defined(__HAIKU__)))
#ifndef _PATH_TTY #ifndef _PATH_TTY
# ifdef __MINT__ # ifdef __MINT__
+1 -1
View File
@@ -1239,7 +1239,7 @@ int uz_opts(__G__ pargc, pargv)
else else
uO.jflag = TRUE; uO.jflag = TRUE;
break; 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 */ case ('J'): /* Junk BeOS or MacOS file attributes */
if( negative ) { if( negative ) {
uO.J_flag = FALSE, negative = 0; uO.J_flag = FALSE, negative = 0;
+3 -3
View File
@@ -220,7 +220,7 @@ freely, subject to the following restrictions:
# define MODERN # define MODERN
# endif # endif
#endif #endif
#if (defined(CMS_MVS) || defined(__BEOS__)) /* || defined(CONVEX) */ #if (defined(CMS_MVS) || (defined(__BEOS__) || defined(__HAIKU__))) /* || defined(CONVEX) */
# ifndef PROTO # ifndef PROTO
# define PROTO # define PROTO
# endif # endif
@@ -427,7 +427,7 @@ typedef struct _UzpOpts {
int scanimage; /* -I: scan image files */ int scanimage; /* -I: scan image files */
#endif #endif
int jflag; /* -j: junk pathnames (unzip) */ 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) */ int J_flag; /* -J: ignore BeOS/MacOS extra field info (unzip) */
#endif #endif
int lflag; /* -12slmv: listing format (zipinfo) */ int lflag; /* -12slmv: listing format (zipinfo) */
@@ -454,7 +454,7 @@ typedef struct _UzpOpts {
int uflag; /* -u: "update" (extract only newer/brand-new files) */ int uflag; /* -u: "update" (extract only newer/brand-new files) */
int vflag; /* -v: (verbosely) list directory */ int vflag; /* -v: (verbosely) list directory */
int V_flag; /* -V: don't strip VMS version numbers */ 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 */ int X_flag; /* -X: restore owner/protection or UID/GID or ACLs */
#endif #endif
#if (defined(OS2) || defined(VMS) || defined(WIN32)) #if (defined(OS2) || defined(VMS) || defined(WIN32))
+2 -2
View File
@@ -292,7 +292,7 @@
BeOS section: BeOS section:
---------------------------------------------------------------------------*/ ---------------------------------------------------------------------------*/
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include <sys/types.h> /* [cjh]: This is pretty much a generic */ # include <sys/types.h> /* [cjh]: This is pretty much a generic */
# include <sys/stat.h> /* POSIX 1003.1 system; see beos/ for */ # include <sys/stat.h> /* POSIX 1003.1 system; see beos/ for */
# include <fcntl.h> /* extra code to deal with our extra file */ # include <fcntl.h> /* extra code to deal with our extra file */
@@ -697,7 +697,7 @@
# define DOS_T20_VMS # define DOS_T20_VMS
#endif #endif
#if (defined(__BEOS__) || defined(UNIX)) #if ((defined(__BEOS__) || defined(__HAIKU__)) || defined(UNIX))
# define BEO_UNX # define BEO_UNX
#endif #endif
+1 -1
View File
@@ -4694,7 +4694,7 @@ f_has(argvars, retvar)
"arp", "arp",
# endif # endif
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
"beos", "beos",
#endif #endif
#ifdef MSDOS #ifdef MSDOS
+2 -2
View File
@@ -53,7 +53,7 @@ static int can_update_cursor = TRUE; /* can display the cursor */
gui_start() gui_start()
{ {
char_u *old_term; 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 # define MAY_FORK
int dofork = TRUE; int dofork = TRUE;
#endif #endif
@@ -566,7 +566,7 @@ error:
gui_exit(rc) gui_exit(rc)
int rc; int rc;
{ {
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
/* don't free the fonts, it leads to a BUS error /* don't free the fonts, it leads to a BUS error
* richard@whitequeen.com Jul 99 */ * richard@whitequeen.com Jul 99 */
free_highlight_fonts(); free_highlight_fonts();
+1 -1
View File
@@ -4819,7 +4819,7 @@ nv_clear(cap)
{ {
if (!checkclearop(cap->oap)) 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 * 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 * window resizing, so we cheat and make the user detect it
+5 -5
View File
@@ -45,7 +45,7 @@
* Use this prototype for select, some include files have a wrong prototype * Use this prototype for select, some include files have a wrong prototype
*/ */
#undef select #undef select
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# define select beos_select # define select beos_select
#endif #endif
@@ -131,7 +131,7 @@ static int did_set_icon = FALSE;
static void may_core_dump __ARGS((void)); static void may_core_dump __ARGS((void));
static int WaitForChar __ARGS((long)); static int WaitForChar __ARGS((long));
#if defined(__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
int RealWaitForChar __ARGS((int, long, int *)); int RealWaitForChar __ARGS((int, long, int *));
#else #else
static int RealWaitForChar __ARGS((int, long, int *)); static int RealWaitForChar __ARGS((int, long, int *));
@@ -969,7 +969,7 @@ sigcont_handler SIGDEFARG(sigarg)
mch_suspend() mch_suspend()
{ {
/* BeOS does have SIGTSTP, but it doesn't work. */ /* 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 */ out_flush(); /* needed to make cursor visible on some systems */
settmode(TMODE_COOK); settmode(TMODE_COOK);
out_flush(); /* needed to disable mouse on some systems */ out_flush(); /* needed to disable mouse on some systems */
@@ -3428,7 +3428,7 @@ mch_call_shell(cmd, options)
# endif # endif
{ {
# ifdef __BEOS__ # if (defined(__BEOS__) || defined(__HAIKU__))
beos_cleanup_read_thread(); beos_cleanup_read_thread();
# endif # endif
if ((pid = fork()) == -1) /* maybe we should use vfork() */ if ((pid = fork()) == -1) /* maybe we should use vfork() */
@@ -4044,7 +4044,7 @@ WaitForChar(msec)
* Or when a Linux GPM mouse event is waiting. * Or when a Linux GPM mouse event is waiting.
*/ */
/* ARGSUSED */ /* ARGSUSED */
#if defined(__BEOS__) #if (defined(__BEOS__) || defined(__HAIKU__))
int int
#else #else
static int static int
+1 -1
View File
@@ -59,7 +59,7 @@ extern int _stricoll __ARGS((char *a, char *b));
# ifdef VMS # ifdef VMS
# include "os_vms.pro" # include "os_vms.pro"
# endif # endif
# ifdef __BEOS__ # if (defined(__BEOS__) || defined(__HAIKU__))
# include "os_beos.pro" # include "os_beos.pro"
# endif # endif
# ifdef MACOS # ifdef MACOS
+2 -2
View File
@@ -37,7 +37,7 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * 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" #include "vim.h"
@@ -356,7 +356,7 @@ OpenPTY(ttyn)
static char PtyProto[] = "/dev/ptym/ptyXY"; static char PtyProto[] = "/dev/ptym/ptyXY";
static char TtyProto[] = "/dev/pty/ttyXY"; static char TtyProto[] = "/dev/pty/ttyXY";
# else # else
# ifdef __BEOS__ # if (defined(__BEOS__) || defined(__HAIKU__))
static char PtyProto[] = "/dev/pt/XY"; static char PtyProto[] = "/dev/pt/XY";
static char TtyProto[] = "/dev/tt/XY"; static char TtyProto[] = "/dev/tt/XY";
# else # else
+1 -1
View File
@@ -7704,7 +7704,7 @@ screen_del_lines(off, row, line_count, end, force, wp)
#endif #endif
if (can_clear(T_CD) && result_empty) if (can_clear(T_CD) && result_empty)
type = USE_T_CD; 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 * 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 != * its internal termcap... this works okay for tests which test *T_DB !=
+3 -3
View File
@@ -365,7 +365,7 @@ struct builtin_term builtin_termcaps[] =
{TERMCAP2KEY('*', '7'), "\233\065\065~"}, /* shifted end key */ {TERMCAP2KEY('*', '7'), "\233\065\065~"}, /* shifted end key */
# endif # endif
# if defined(__BEOS__) || defined(ALL_BUILTIN_TCAPS) # if (defined(__BEOS__) || defined(__HAIKU__)) || defined(ALL_BUILTIN_TCAPS)
/* /*
* almost standard ANSI terminal, default for bebox * almost standard ANSI terminal, default for bebox
*/ */
@@ -1403,7 +1403,7 @@ struct builtin_term builtin_termcaps[] =
# define DEFAULT_TERM (char_u *)"vt320" # define DEFAULT_TERM (char_u *)"vt320"
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# undef DEFAULT_TERM # undef DEFAULT_TERM
# define DEFAULT_TERM (char_u *)"beos-ansi" # define DEFAULT_TERM (char_u *)"beos-ansi"
#endif #endif
@@ -2450,7 +2450,7 @@ termcapinit(name)
name = NULL; /* empty name is equal to no name */ name = NULL; /* empty name is equal to no name */
term = name; term = name;
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* /*
* TERM environment variable is normally set to 'ansi' on the Bebox; * TERM environment variable is normally set to 'ansi' on the Bebox;
* Since the BeBox doesn't quite support full ANSI yet, we use our * Since the BeBox doesn't quite support full ANSI yet, we use our
+2 -2
View File
@@ -243,7 +243,7 @@ ui_suspend()
mch_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. * When the OS can't really suspend, call this function to start a shell.
* This is never called in the GUI. * 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 * If we can't get any, and there isn't any in the buffer, we give up and
* exit Vim. * exit Vim.
*/ */
# ifdef __BEOS__ # if (defined(__BEOS__) || defined(__HAIKU__))
/* /*
* On the BeBox version (for now), all input is secretly performed within * On the BeBox version (for now), all input is secretly performed within
* beos_select() which is called from RealWaitForChar(). * beos_select() which is called from RealWaitForChar().
+1 -1
View File
@@ -185,7 +185,7 @@
# define __ARGS(x) x # define __ARGS(x) x
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include "os_beos.h" # include "os_beos.h"
# define __ARGS(x) x # define __ARGS(x) x
#endif #endif
+2 -2
View File
@@ -37,7 +37,7 @@
#include "atari/osdep.h" #include "atari/osdep.h"
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include "beos/osdep.h" #include "beos/osdep.h"
#endif #endif
@@ -448,7 +448,7 @@ typedef struct ztimbuf {
#ifdef MVS #ifdef MVS
# define OS_CODE 0xf00 # define OS_CODE 0xf00
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# define OS_CODE 0x1000 # define OS_CODE 0x1000
#endif #endif
#ifdef TANDEM #ifdef TANDEM
+1 -1
View File
@@ -50,7 +50,7 @@
# define GLOBAL(g) G.g # define GLOBAL(g) G.g
#endif #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 # define HAVE_TERMIOS_H
#endif #endif
+1 -1
View File
@@ -58,7 +58,7 @@
# endif # endif
#endif #endif
#if (defined(__ATHEOS__) || defined(__BEOS__) || defined(UNIX)) #if (defined(__ATHEOS__) || (defined(__BEOS__) || defined(__HAIKU__)) || defined(UNIX))
# ifndef ATH_BEO_UNX # ifndef ATH_BEO_UNX
# define ATH_BEO_UNX # define ATH_BEO_UNX
# endif # endif
+1 -1
View File
@@ -2406,7 +2406,7 @@ nextarg: ;
#endif #endif
} }
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
/* Set the filetype of the zipfile to "application/zip" */ /* Set the filetype of the zipfile to "application/zip" */
setfiletype( zipfile, "application/zip" ); setfiletype( zipfile, "application/zip" );
#endif #endif
+1 -1
View File
@@ -52,7 +52,7 @@
# include "atari/zipup.h" # include "atari/zipup.h"
#endif #endif
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
# include "beos/zipup.h" # include "beos/zipup.h"
#endif #endif
@@ -31,7 +31,7 @@
namespace BPrivate { namespace BPrivate {
namespace Storage { namespace Storage {
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
// device_is_root_device // device_is_root_device
bool bool
device_is_root_device(dev_t device) device_is_root_device(dev_t device)
+1 -1
View File
@@ -7,7 +7,7 @@
#include <stdlib.h> #include <stdlib.h>
#if !defined(_WIN32) && !defined(__BEOS__) #if !defined(_WIN32) && !(defined(__BEOS__) || defined(__HAIKU__))
#include <GL/glx.h> #include <GL/glx.h>
#endif #endif
+5 -5
View File
@@ -13,7 +13,7 @@
#if defined(_WIN32) #if defined(_WIN32)
#include "glutwin32.h" #include "glutwin32.h"
#elif !defined(__BEOS__) #elif !(defined(__BEOS__) || defined(__HAIKU__))
#ifdef __sgi #ifdef __sgi
#define SUPPORT_FORTRAN #define SUPPORT_FORTRAN
#endif #endif
@@ -114,7 +114,7 @@ extern int sys$gettim(struct timeval *);
{ if (__glutGameModeWindow) return; } { if (__glutGameModeWindow) return; }
/* BeOS doesn't need most of this file */ /* 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_RGB(x) (((x) & GLUT_INDEX) == 0)
#define GLUT_WIND_IS_INDEX(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); typedef void (*GLUTjoystickFCB) (unsigned int *buttonMask, int *x, int *y, int *z);
#endif #endif
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
typedef struct _GLUTcolorcell GLUTcolorcell; typedef struct _GLUTcolorcell GLUTcolorcell;
struct _GLUTcolorcell { struct _GLUTcolorcell {
@@ -647,7 +647,7 @@ extern XSizeHints __glutSizeHints;
extern char **__glutArgv; extern char **__glutArgv;
#endif /* BeOS */ #endif /* BeOS */
extern char *__glutProgramName; extern char *__glutProgramName;
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
extern int __glutArgc; extern int __glutArgc;
extern int __glutConnectionFD; extern int __glutConnectionFD;
extern int __glutInitHeight; extern int __glutInitHeight;
@@ -740,7 +740,7 @@ extern void __glutFatalUsage(char *format,...);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#ifndef __BEOS__ #if (!defined(__BEOS__) && !defined(__HAIKU__))
/* private routines from glut_win.c */ /* private routines from glut_win.c */
extern GLUTwindow *__glutGetWindow(Window win); extern GLUTwindow *__glutGetWindow(Window win);
+1 -1
View File
@@ -325,7 +325,7 @@ static INLINE int iround(float f)
} }
#define IROUND(x) iround(x) #define IROUND(x) iround(x)
#elif defined(USE_X86_ASM) && defined(__GNUC__) && defined(__i386__) && \ #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) static INLINE int iround(float f)
{ {
int r; int r;
+2 -2
View File
@@ -61,7 +61,7 @@ do { \
printf( "\n" ); \ printf( "\n" ); \
} while (0) } while (0)
#if defined(__BEOS__) || defined(_LP64) #if (defined(__BEOS__) || defined(__HAIKU__)) || defined(_LP64)
#define OFFSET( s, t, m ) \ #define OFFSET( s, t, m ) \
printf( "#define %s\t%ld\n", s, offsetof( t, m ) ); printf( "#define %s\t%ld\n", s, offsetof( t, m ) );
#else #else
@@ -69,7 +69,7 @@ do { \
printf( "#define %s\t%d\n", s, offsetof( t, m ) ); printf( "#define %s\t%d\n", s, offsetof( t, m ) );
#endif #endif
#if defined(__BEOS__) || defined(_LP64) #if (defined(__BEOS__) || defined(__HAIKU__)) || defined(_LP64)
#define SIZEOF( s, t ) \ #define SIZEOF( s, t ) \
printf( "#define %s\t%ld\n", s, sizeof(t) ); printf( "#define %s\t%ld\n", s, sizeof(t) );
#else #else
+1 -1
View File
@@ -8,7 +8,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#include <unistd.h> #include <unistd.h>
#endif #endif
+1 -1
View File
@@ -186,7 +186,7 @@
#endif #endif
/* Additional config for us */ /* Additional config for us */
#ifdef __BEOS__ #if (defined(__BEOS__) || defined(__HAIKU__))
#define WITHOUT_SERVER 1 #define WITHOUT_SERVER 1
#include <support/SupportDefs.h> #include <support/SupportDefs.h>
+3 -3
View File
@@ -635,7 +635,7 @@ unsigned int fluid_curtime()
} }
#elif __BEOS__ #elif defined(__BEOS__) || defined(__HAIKU__)
struct _fluid_timer_t 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; return (wait_result == WAIT_OBJECT_0)? FLUID_OK : FLUID_FAILED;
} }
#elif defined(__BEOS__) #elif defined(__BEOS__) || defined(__HAIKU__)
/* Not implemented */ /* Not implemented */
fluid_thread_t* new_fluid_thread(fluid_thread_func_t func, void* data, int detach) { return NULL; } 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; } int delete_fluid_thread(fluid_thread_t* thread) { return 0; }
@@ -1288,7 +1288,7 @@ void fluid_socket_close(fluid_socket_t sock)
#endif #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) fluid_istream_t fluid_socket_get_istream(fluid_socket_t sock)
+1 -1
View File
@@ -90,7 +90,7 @@ double fluid_utime(void);
unsigned int fluid_curtime(); unsigned int fluid_curtime();
#define fluid_utime() 0.0 #define fluid_utime() 0.0
#elif defined(__BEOS__) #elif (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h> #include <OS.h>
unsigned int fluid_curtime(void); unsigned int fluid_curtime(void);

Some files were not shown because too many files have changed in this diff Show More