1 |
|
/* |
2 |
|
* sysdeps.h - System dependent definitions for Unix |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-2001 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
43 |
|
#include <stdlib.h> |
44 |
|
#include <string.h> |
45 |
|
|
46 |
+ |
#ifdef HAVE_PTHREADS |
47 |
+ |
# include <pthread.h> |
48 |
+ |
#endif |
49 |
+ |
|
50 |
|
#ifdef HAVE_FCNTL_H |
51 |
|
# include <fcntl.h> |
52 |
|
#endif |
98 |
|
|
99 |
|
#endif |
100 |
|
|
101 |
< |
/* Direct Addressing requires Video on SEGV signals */ |
102 |
< |
#if DIRECT_ADDRESSING && !ENABLE_VOSF |
101 |
> |
/* Direct Addressing requires Video on SEGV signals in plain X11 mode */ |
102 |
> |
#if DIRECT_ADDRESSING && (!ENABLE_VOSF && !USE_SDL_VIDEO) |
103 |
|
# undef ENABLE_VOSF |
104 |
|
# define ENABLE_VOSF 1 |
105 |
|
#endif |
155 |
|
#error "Unsupported size of pointer" |
156 |
|
#endif |
157 |
|
|
158 |
+ |
#ifndef HAVE_LOFF_T |
159 |
+ |
typedef off_t loff_t; |
160 |
+ |
#endif |
161 |
+ |
#ifndef HAVE_CADDR_T |
162 |
+ |
typedef char * caddr_t; |
163 |
+ |
#endif |
164 |
+ |
|
165 |
|
/* Time data type for Time Manager emulation */ |
166 |
|
#ifdef HAVE_CLOCK_GETTIME |
167 |
|
typedef struct timespec tm_time_t; |
169 |
|
typedef struct timeval tm_time_t; |
170 |
|
#endif |
171 |
|
|
172 |
+ |
/* Define codes for all the float formats that we know of. |
173 |
+ |
* Though we only handle IEEE format. */ |
174 |
+ |
#define UNKNOWN_FLOAT_FORMAT 0 |
175 |
+ |
#define IEEE_FLOAT_FORMAT 1 |
176 |
+ |
#define VAX_FLOAT_FORMAT 2 |
177 |
+ |
#define IBM_FLOAT_FORMAT 3 |
178 |
+ |
#define C4X_FLOAT_FORMAT 4 |
179 |
+ |
|
180 |
|
/* UAE CPU data types */ |
181 |
|
#define uae_s8 int8 |
182 |
|
#define uae_u8 uint8 |
189 |
|
typedef uae_u32 uaecptr; |
190 |
|
|
191 |
|
/* Alignment restrictions */ |
192 |
< |
#if defined(__i386__) || defined(__powerpc__) || defined(__m68k__) |
192 |
> |
#if defined(__i386__) || defined(__powerpc__) || defined(__m68k__) || defined(__x86_64__) |
193 |
|
# define CPU_CAN_ACCESS_UNALIGNED |
194 |
|
#endif |
195 |
|
|
197 |
|
extern uint64 GetTicks_usec(void); |
198 |
|
extern void Delay_usec(uint32 usec); |
199 |
|
|
200 |
+ |
#ifdef HAVE_PTHREADS |
201 |
+ |
/* Centralized pthread attribute setup */ |
202 |
+ |
void Set_pthread_attr(pthread_attr_t *attr, int priority); |
203 |
+ |
#endif |
204 |
+ |
|
205 |
|
/* UAE CPU defines */ |
206 |
|
#ifdef WORDS_BIGENDIAN |
207 |
|
|
242 |
|
|
243 |
|
#else /* WORDS_BIGENDIAN */ |
244 |
|
|
245 |
< |
#ifdef __i386__ |
245 |
> |
#if defined(__i386__) || defined(__x86_64__) |
246 |
|
|
247 |
|
/* Intel x86 */ |
248 |
|
#define X86_PPRO_OPT |
313 |
|
#define ENUMNAME(name) name |
314 |
|
#define write_log printf |
315 |
|
|
316 |
< |
#ifdef X86_ASSEMBLY |
316 |
> |
#if defined(X86_ASSEMBLY) || defined(X86_64_ASSEMBLY) |
317 |
|
#define ASM_SYM_FOR_FUNC(a) __asm__(a) |
318 |
|
#else |
319 |
|
#define ASM_SYM_FOR_FUNC(a) |