Commit | Line | Data |
---|---|---|
cf76e892 JPM |
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 | // JPM = Jean-Paul Mari <djipi.mari@gmail.com> | |
23 | // | |
24 | // Who When What | |
25 | // --- ---------- ------------------------------------------------------------ | |
26 | // JPM 06/06/2016 Visual Studio support | |
27 | ||
28 | #ifndef UAE_SYSDEPS_H | |
29 | #define UAE_SYSDEPS_H | |
30 | ||
31 | #include <stdio.h> | |
32 | #include <stdlib.h> | |
33 | #include <assert.h> | |
34 | #include <limits.h> | |
35 | ||
36 | #ifndef _MSC_VER | |
37 | #ifndef __STDC__ | |
38 | #error "Your compiler is not ANSI. Get a real one." | |
39 | #endif | |
40 | #endif // !_MSC_VER | |
41 | ||
42 | #include <stdarg.h> | |
43 | #include <stdint.h> | |
44 | ||
45 | ||
46 | #if EEXIST == ENOTEMPTY | |
47 | #define BROKEN_OS_PROBABLY_AIX | |
48 | #endif | |
49 | ||
50 | #ifdef __NeXT__ | |
51 | #define S_IRUSR S_IREAD | |
52 | #define S_IWUSR S_IWRITE | |
53 | #define S_IXUSR S_IEXEC | |
54 | #define S_ISDIR(val) (S_IFDIR & val) | |
55 | struct utimbuf | |
56 | { | |
57 | time_t actime; | |
58 | time_t modtime; | |
59 | }; | |
60 | #endif | |
61 | ||
62 | ||
63 | #if defined(WARPUP) | |
64 | #include "devices/timer.h" | |
65 | #include "osdep/posixemu.h" | |
66 | #define RETSIGTYPE | |
67 | #define USE_ZFILE | |
68 | #define strcasecmp stricmp | |
69 | #define memcpy q_memcpy | |
70 | #define memset q_memset | |
71 | #define strdup my_strdup | |
72 | #define random rand | |
73 | #define creat(x,y) open("T:creat",O_CREAT|O_RDWR|O_TRUNC,777) | |
74 | extern void * q_memset(void *, int, size_t); | |
75 | extern void * q_memcpy(void *, const void *, size_t); | |
76 | #endif | |
77 | ||
78 | ||
79 | /* Acorn specific stuff */ | |
80 | #ifdef ACORN | |
81 | ||
82 | #define S_IRUSR S_IREAD | |
83 | #define S_IWUSR S_IWRITE | |
84 | #define S_IXUSR S_IEXEC | |
85 | ||
86 | #define strcasecmp stricmp | |
87 | ||
88 | #endif | |
89 | ||
90 | /* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known | |
91 | * to have problems, and it's likely that other compilers choke too. */ | |
92 | #ifdef __GNUC__ | |
93 | #define ENUMDECL typedef enum | |
94 | #define ENUMNAME(name) name | |
95 | #else | |
96 | #define ENUMDECL enum | |
97 | #define ENUMNAME(name) ; typedef int name | |
98 | #endif | |
99 | ||
100 | /* When using GNU C, make abort more useful. */ | |
101 | #ifdef __GNUC__ | |
102 | #define abort() \ | |
103 | do { \ | |
104 | fprintf(stderr, "Internal error; file %s, line %d\n", __FILE__, __LINE__); \ | |
105 | (abort) (); \ | |
106 | } while (0) | |
107 | #endif | |
108 | ||
109 | ||
110 | #ifndef O_BINARY | |
111 | #define O_BINARY 0 | |
112 | #endif | |
113 | ||
114 | #ifndef STATIC_INLINE | |
115 | #ifdef _MSC_VER | |
116 | #define STATIC_INLINE static __inline | |
117 | #else | |
118 | #define STATIC_INLINE static __inline__ | |
119 | #endif // _MSC_VER | |
120 | #endif | |
121 | ||
122 | /* | |
123 | * You can specify numbers from 0 to 5 here. It is possible that higher | |
124 | * numbers will make the CPU emulation slightly faster, but if the setting | |
125 | * is too high, you will run out of memory while compiling. | |
126 | * Best to leave this as it is. | |
127 | */ | |
128 | #define CPU_EMU_SIZE 0 | |
129 | ||
130 | #endif /* ifndef UAE_SYSDEPS_H */ |