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
#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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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_ */
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -38,7 +38,7 @@
*/
#if !defined(__SCITECH_SNAP__)
#if defined(__BEOS__)
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <stdlib.h> /* 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
+2 -2
View File
@@ -30,7 +30,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <limits.h>
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h>
#else
#include <iostream.h>
@@ -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;
+2 -2
View File
@@ -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<charT *>(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
+3 -3
View File
@@ -42,7 +42,7 @@
# include <new>
# define __THROW_BAD_ALLOC throw bad_alloc()
#elif !defined(__THROW_BAD_ALLOC)
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <stdio.h>
# 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 <bool __threads, int __inst>
__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, };
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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__) */
+1 -1
View File
@@ -231,7 +231,7 @@
# endif
#endif
#if defined (__BEOS__)
#if (defined(__BEOS__) || defined(__HAIKU__))
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# 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, ...);
#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"
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -38,7 +38,7 @@
*/
#if !defined(__SCITECH_SNAP__)
#if defined(__BEOS__)
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <stdlib.h> /* 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
+1 -1
View File
@@ -28,7 +28,7 @@
#ifndef _REGEX_H
#define _REGEX_H 1
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# undef __STDC__
# define __STDC__ 1
#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
#undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
#endif
@@ -232,7 +232,7 @@
#elif defined(__NetBSD__)
#include "acnetbsd.h"
#elif defined(__BEOS__)
#elif (defined(__BEOS__) || defined(__HAIKU__))
#include "achaiku.h"
#elif defined(MODESTO)
@@ -6,7 +6,7 @@
#include <sys/types.h>
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# if __POWERPC__
# include "regex.h" // use included regex if system doesn't provide one
# else
@@ -36,7 +36,7 @@
#include "IOCallback.h"
#include <string>
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <sstream>
#else
#include <strstream>
@@ -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 <SupportDefs.h>
#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 <support/SupportDefs.h>
#else // anything else (Linux, BSD, ...)
# include <sys/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 <inttypes.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
+1 -1
View File
@@ -34,7 +34,7 @@
#include <hpgsimage.h>
#include <math.h>
#include <errno.h>
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <png.h>
#else
#include <libpng12/png.h>
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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 <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/param.h>
+6 -6
View File
@@ -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__ */
}
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -20462,7 +20462,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.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
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.
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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";
+2 -2
View File
@@ -58,7 +58,7 @@
/* BeOS <sys/socket.h> 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 <OS.h> /* 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. */
+1 -1
View File
@@ -54,7 +54,7 @@
#include "xreadlink.h"
#include "yesno.h"
#if __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <fs_attr.h>
#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
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)))
{
+1 -1
View File
@@ -172,7 +172,7 @@ extern int errno;
#include <unixlib.h>
#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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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. */
+2 -2
View File
@@ -32,7 +32,7 @@
#include <stdio.h>
#include <sys/types.h>
#if !defined(_MINIX) && !defined(__BEOS__)
#if !defined(_MINIX) && !(defined(__BEOS__) || defined(__HAIKU__))
# include <sys/file.h>
#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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -2,7 +2,7 @@
#ifndef HAVE_GETPAGESIZE
#if !defined getpagesize && defined __BEOS__
#if !defined getpagesize && (defined(__BEOS__) || defined(__HAIKU__))
# include <OS.h>
# define getpagesize() B_PAGE_SIZE
#endif
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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__
+1 -1
View File
@@ -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
+2 -2
View File
@@ -55,7 +55,7 @@
/* BeOS <sys/socket.h> 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 <OS.h> /* 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. */
+1 -1
View File
@@ -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 <ar.h>
# else
/* 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
#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)
@@ -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
+6 -6
View File
@@ -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] == '.' &&
+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 <time.h>
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <timeconv.h>
#include <utmp.h>
#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];
+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>
#endif
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
#include <machine/endian.h>
#include <sys/endian.h>
#endif
+2 -2
View File
@@ -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.
+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 $");
#include <sys/param.h>
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <sys/file.h>
#endif
#include <sys/socket.h>
+2 -2
View File
@@ -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
+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 <libutil.h>
#include <stdlib.h>
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <sys/tty.h>
# include <utmp.h>
#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);
+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 <paths.h>
#include <termcap.h>
#ifndef __BEOS__
#if (!defined(__BEOS__) && !defined(__HAIKU__))
# include <utmp.h>
#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
+1 -1
View File
@@ -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
+6 -6
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL.
======================================================================*/
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h>
#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)
+4 -4
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL.
======================================================================*/
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h>
#endif
#include <sys/types.h>
@@ -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");
+4 -4
View File
@@ -30,7 +30,7 @@
file under either the MPL or the GPL.
======================================================================*/
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <OS.h>
#endif
#include <sys/types.h>
@@ -51,7 +51,7 @@
#include <pcmcia/ds.h>
/*====================================================================*/
#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");
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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 <varargs.h> 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
+2 -2
View File
@@ -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 <varargs.h> 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"
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -58,7 +58,7 @@
/* BeOS <sys/socket.h> 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 <OS.h> /* 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. */
+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'.
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
+1 -1
View File
@@ -24,7 +24,7 @@
#endif
#endif
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#define _UNIX
#define _BEOS
#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 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
+1 -1
View File
@@ -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__) */
+3 -3
View File
@@ -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__
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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))
+2 -2
View File
@@ -292,7 +292,7 @@
BeOS section:
---------------------------------------------------------------------------*/
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include <sys/types.h> /* [cjh]: This is pretty much a generic */
# include <sys/stat.h> /* POSIX 1003.1 system; see beos/ for */
# include <fcntl.h> /* 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
+1 -1
View File
@@ -4694,7 +4694,7 @@ f_has(argvars, retvar)
"arp",
# endif
#endif
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
"beos",
#endif
#ifdef MSDOS
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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
+5 -5
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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 !=
+3 -3
View File
@@ -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
+2 -2
View File
@@ -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().
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -52,7 +52,7 @@
# include "atari/zipup.h"
#endif
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
# include "beos/zipup.h"
#endif
@@ -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)
+1 -1
View File
@@ -7,7 +7,7 @@
#include <stdlib.h>
#if !defined(_WIN32) && !defined(__BEOS__)
#if !defined(_WIN32) && !(defined(__BEOS__) || defined(__HAIKU__))
#include <GL/glx.h>
#endif
+5 -5
View File
@@ -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);
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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
+1 -1
View File
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#include <unistd.h>
#endif
+1 -1
View File
@@ -186,7 +186,7 @@
#endif
/* Additional config for us */
#ifdef __BEOS__
#if (defined(__BEOS__) || defined(__HAIKU__))
#define WITHOUT_SERVER 1
#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
{
@@ -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)
+1 -1
View File
@@ -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 <OS.h>
unsigned int fluid_curtime(void);

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