--- BasiliskII/src/Unix/sysdeps.h 2001/07/03 15:59:47 1.18 +++ BasiliskII/src/Unix/sysdeps.h 2004/06/23 14:30:48 1.30 @@ -1,7 +1,7 @@ /* * sysdeps.h - System dependent definitions for Unix * - * Basilisk II (C) 1997-2001 Christian Bauer + * Basilisk II (C) 1997-2004 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,6 +43,10 @@ #include #include +#ifdef HAVE_PTHREADS +# include +#endif + #ifdef HAVE_FCNTL_H # include #endif @@ -94,8 +98,8 @@ #endif -/* Direct Addressing requires Video on SEGV signals */ -#if DIRECT_ADDRESSING && !ENABLE_VOSF +/* Direct Addressing requires Video on SEGV signals in plain X11 mode */ +#if DIRECT_ADDRESSING && (!ENABLE_VOSF && !USE_SDL_VIDEO) # undef ENABLE_VOSF # define ENABLE_VOSF 1 #endif @@ -103,6 +107,9 @@ /* ExtFS is supported */ #define SUPPORTS_EXTFS 1 +/* BSD socket API supported */ +#define SUPPORTS_UDP_TUNNEL 1 + /* Data types */ typedef unsigned char uint8; @@ -148,6 +155,13 @@ typedef int64 intptr; #error "Unsupported size of pointer" #endif +#ifndef HAVE_LOFF_T +typedef off_t loff_t; +#endif +#ifndef HAVE_CADDR_T +typedef char * caddr_t; +#endif + /* Time data type for Time Manager emulation */ #ifdef HAVE_CLOCK_GETTIME typedef struct timespec tm_time_t; @@ -155,8 +169,13 @@ typedef struct timespec tm_time_t; typedef struct timeval tm_time_t; #endif -/* Offset Mac->Unix time in seconds */ -#define TIME_OFFSET 0x7c25b080 +/* Define codes for all the float formats that we know of. + * Though we only handle IEEE format. */ +#define UNKNOWN_FLOAT_FORMAT 0 +#define IEEE_FLOAT_FORMAT 1 +#define VAX_FLOAT_FORMAT 2 +#define IBM_FLOAT_FORMAT 3 +#define C4X_FLOAT_FORMAT 4 /* UAE CPU data types */ #define uae_s8 int8 @@ -170,7 +189,7 @@ typedef struct timeval tm_time_t; typedef uae_u32 uaecptr; /* Alignment restrictions */ -#if defined(__i386__) || defined(__powerpc__) || defined(__m68k__) +#if defined(__i386__) || defined(__powerpc__) || defined(__m68k__) || defined(__x86_64__) # define CPU_CAN_ACCESS_UNALIGNED #endif @@ -178,6 +197,11 @@ typedef uae_u32 uaecptr; extern uint64 GetTicks_usec(void); extern void Delay_usec(uint32 usec); +#ifdef HAVE_PTHREADS +/* Centralized pthread attribute setup */ +void Set_pthread_attr(pthread_attr_t *attr, int priority); +#endif + /* UAE CPU defines */ #ifdef WORDS_BIGENDIAN @@ -218,7 +242,7 @@ static inline void do_put_mem_word(uae_u #else /* WORDS_BIGENDIAN */ -#ifdef __i386__ +#if defined(__i386__) || defined(__x86_64__) /* Intel x86 */ #define X86_PPRO_OPT @@ -289,7 +313,7 @@ static inline uae_u32 do_byteswap_16(uae #define ENUMNAME(name) name #define write_log printf -#ifdef X86_ASSEMBLY +#if defined(X86_ASSEMBLY) || defined(X86_64_ASSEMBLY) #define ASM_SYM_FOR_FUNC(a) __asm__(a) #else #define ASM_SYM_FOR_FUNC(a)