]> Shamusworld >> Repos - virtualjaguar/blob - src/m68000/sysdeps.h
Added new 68000 cpu core based on UAE's 68000. Here be dragons. ;-)
[virtualjaguar] / src / m68000 / sysdeps.h
1 /*
2  * UAE - The Un*x Amiga Emulator - CPU core
3  *
4  * Try to include the right system headers and get other system-specific
5  * stuff right & other collected kludges.
6  *
7  * If you think about modifying this, think twice. Some systems rely on
8  * the exact order of the #include statements. That's also the reason
9  * why everything gets included unconditionally regardless of whether
10  * it's actually needed by the .c file.
11  *
12  * Copyright 1996, 1997 Bernd Schmidt
13  *
14  * Adaptation to Hatari by Thomas Huth
15  * Adaptation to Virtual Jagaur by James Hammons
16  *
17  * This file is distributed under the GNU Public License, version 3 or at
18  * your option any later version. Read the file GPLv3 for details.
19  *
20  */
21
22 #ifndef UAE_SYSDEPS_H
23 #define UAE_SYSDEPS_H
24
25 #include <stdio.h>
26 #include <stdlib.h>
27 #include <assert.h>
28 #include <limits.h>
29
30 #ifndef __STDC__
31 #error "Your compiler is not ANSI. Get a real one."
32 #endif
33
34 #include <stdarg.h>
35 #include <stdint.h>
36
37
38 #if EEXIST == ENOTEMPTY
39 #define BROKEN_OS_PROBABLY_AIX
40 #endif
41
42 #ifdef __NeXT__
43 #define S_IRUSR S_IREAD
44 #define S_IWUSR S_IWRITE
45 #define S_IXUSR S_IEXEC
46 #define S_ISDIR(val) (S_IFDIR & val)
47 struct utimbuf
48 {
49     time_t actime;
50     time_t modtime;
51 };
52 #endif
53
54
55 #if defined(WARPUP)
56 #include "devices/timer.h"
57 #include "osdep/posixemu.h"
58 #define RETSIGTYPE
59 #define USE_ZFILE
60 #define strcasecmp stricmp
61 #define memcpy q_memcpy
62 #define memset q_memset
63 #define strdup my_strdup
64 #define random rand
65 #define creat(x,y) open("T:creat",O_CREAT|O_RDWR|O_TRUNC,777)
66 extern void * q_memset(void *, int, size_t);
67 extern void * q_memcpy(void *, const void *, size_t);
68 #endif
69
70
71 /* Acorn specific stuff */
72 #ifdef ACORN
73
74 #define S_IRUSR S_IREAD
75 #define S_IWUSR S_IWRITE
76 #define S_IXUSR S_IEXEC
77
78 #define strcasecmp stricmp
79
80 #endif
81
82 /* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known
83  * to have problems, and it's likely that other compilers choke too. */
84 #ifdef __GNUC__
85 #define ENUMDECL typedef enum
86 #define ENUMNAME(name) name
87 #else
88 #define ENUMDECL enum
89 #define ENUMNAME(name) ; typedef int name
90 #endif
91
92 /* When using GNU C, make abort more useful.  */
93 #ifdef __GNUC__
94 #define abort() \
95   do { \
96     fprintf(stderr, "Internal error; file %s, line %d\n", __FILE__, __LINE__); \
97     (abort) (); \
98 } while (0)
99 #endif
100
101
102 #ifndef O_BINARY
103 #define O_BINARY 0
104 #endif
105
106 #ifndef STATIC_INLINE
107 #define STATIC_INLINE static __inline__
108 #endif
109
110 /*
111  * You can specify numbers from 0 to 5 here. It is possible that higher
112  * numbers will make the CPU emulation slightly faster, but if the setting
113  * is too high, you will run out of memory while compiling.
114  * Best to leave this as it is.
115  */
116 #define CPU_EMU_SIZE 0
117
118 #endif /* ifndef UAE_SYSDEPS_H */