ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/sysdeps.h
(Generate patch)

Comparing BasiliskII/src/MacOSX/sysdeps.h (file contents):
Revision 1.3 by nigel, 2002-10-31T08:52:59Z vs.
Revision 1.7 by nigel, 2004-01-20T23:35:47Z

# Line 4 | Line 4
4   *
5   *      $Id$
6   *
7 < *      Basilisk II (C) 1997-2001 Christian Bauer
7 > *      Basilisk II (C) 1997-2004 Christian Bauer
8   *
9   *      This program is free software; you can redistribute it and/or modify
10   *      it under the terms of the GNU General Public License as published by
# Line 46 | Line 46
46   #include <stdlib.h>
47   #include <string.h>
48  
49 + #ifdef HAVE_PTHREADS
50 + # include <pthread.h>
51 + #endif
52 +
53   #ifdef HAVE_FCNTL_H
54   # include <fcntl.h>
55   #endif
# Line 71 | Line 75
75   # define REAL_ADDRESSING 0
76   #endif
77  
74 /* Linear address translation (i.e. just an offset between Emulator & host)  */
75 #ifndef DIRECT_ADDRESSING
76 # ifdef MAC_OS_X_VERSION_10_2
77 /* For some reason, compiling on 10.2 with DIRECT_ADDRESSING enabled gives an   */
78 /* app that never writes to its screen! (i.e. it never calls most of video.cpp) */
79 #  define DIRECT_ADDRESSING 1
80 //#  define DIRECT_ADDRESSING 0
81 # else
82 #  define DIRECT_ADDRESSING 1
83 # endif
84 #endif
85
78   /* Using 68k emulator */
79   #define EMULATED_68K 1
80  
# Line 97 | Line 89
89   # define ROM_IS_WRITE_PROTECTED 1
90   #endif
91  
92 + /* Direct Addressing requires Video on SEGV signals */
93 + #if DIRECT_ADDRESSING && !ENABLE_VOSF
94 + # undef  ENABLE_VOSF
95 + # define ENABLE_VOSF 1
96 + #endif
97  
98   /* ExtFS is supported */
99   #define SUPPORTS_EXTFS 1
100  
101 + /* BSD socket API supported */
102 + #define SUPPORTS_UDP_TUNNEL 1
103  
104   /* Data types */
105   typedef unsigned char uint8;
# Line 146 | Line 145 | typedef int64 intptr;
145   #error "Unsupported size of pointer"
146   #endif
147  
148 + #ifndef HAVE_LOFF_T
149 + typedef off_t loff_t;
150 + #endif
151 + #ifndef HAVE_CADDR_T
152 + typedef char * caddr_t;
153 + #endif
154 +
155   /* Time data type for Time Manager emulation */
156   #ifdef HAVE_CLOCK_GETTIME
157   typedef struct timespec tm_time_t;
# Line 153 | Line 159 | typedef struct timespec tm_time_t;
159   typedef struct timeval tm_time_t;
160   #endif
161  
162 < /* Offset Mac->Unix time in seconds */
163 < #define TIME_OFFSET 0x7c25b080
162 > /* Define codes for all the float formats that we know of.
163 > * Though we only handle IEEE format.  */
164 > #define UNKNOWN_FLOAT_FORMAT 0
165 > #define IEEE_FLOAT_FORMAT 1
166 > #define VAX_FLOAT_FORMAT 2
167 > #define IBM_FLOAT_FORMAT 3
168 > #define C4X_FLOAT_FORMAT 4
169  
170   /* UAE CPU data types */
171   #define uae_s8 int8
# Line 168 | Line 179 | typedef struct timeval tm_time_t;
179   typedef uae_u32 uaecptr;
180  
181   /* Alignment restrictions */
182 < #if defined(__i386__) || defined(__powerpc__) || defined(__m68k__)
182 > #if defined(__i386__) || defined(__powerpc__) || defined(__m68k__) || defined(__x86_64__)
183   # define CPU_CAN_ACCESS_UNALIGNED
184   #endif
185  
# Line 176 | Line 187 | typedef uae_u32 uaecptr;
187   extern uint64 GetTicks_usec(void);
188   extern void Delay_usec(uint32 usec);
189  
190 + #ifdef HAVE_PTHREADS
191 + /* Centralized pthread attribute setup */
192 + void Set_pthread_attr(pthread_attr_t *attr, int priority);
193 + #endif
194 +
195   /* UAE CPU defines */
196   #ifdef WORDS_BIGENDIAN
197  
# Line 216 | Line 232 | static inline void do_put_mem_word(uae_u
232  
233   #else /* WORDS_BIGENDIAN */
234  
235 < #ifdef __i386__
235 > #if defined(__i386__) || defined(__x86_64__)
236  
237   /* Intel x86 */
238   #define X86_PPRO_OPT
# Line 286 | Line 302 | static inline uae_u32 do_byteswap_16(uae
302   #define ENUMDECL typedef enum
303   #define ENUMNAME(name) name
304   #define write_log printf
289 #undef USE_MAPPED_MEMORY
290 #undef CAN_MAP_MEMORY
305  
306 < #ifdef X86_ASSEMBLY
306 > #if defined(X86_ASSEMBLY) || defined(X86_64_ASSEMBLY)
307   #define ASM_SYM_FOR_FUNC(a) __asm__(a)
308   #else
309   #define ASM_SYM_FOR_FUNC(a)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines