|
|
1.1 root 1: /*
1.1.1.2 root 2: * UAE - The Un*x Amiga Emulator - CPU core
1.1 root 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
1.1.1.2 root 13: *
14: * Adaptation to Hatari by Thomas Huth
15: *
1.1.1.9 ! root 16: * This file is distributed under the GNU General Public License, version 2
! 17: * or at your option any later version. Read the file gpl.txt for details.
1.1 root 18: */
19:
1.1.1.4 root 20: #ifndef UAE_SYSDEPS_H
21: #define UAE_SYSDEPS_H
1.1 root 22:
23: #include <stdio.h>
24: #include <stdlib.h>
25: #include <assert.h>
26: #include <limits.h>
27:
28: #ifndef __STDC__
29: #error "Your compiler is not ANSI. Get a real one."
30: #endif
31:
32: #include <stdarg.h>
1.1.1.7 root 33: #include <stdint.h>
1.1.1.3 root 34:
35:
1.1 root 36: #if EEXIST == ENOTEMPTY
37: #define BROKEN_OS_PROBABLY_AIX
38: #endif
39:
40: #ifdef __NeXT__
41: #define S_IRUSR S_IREAD
42: #define S_IWUSR S_IWRITE
43: #define S_IXUSR S_IEXEC
44: #define S_ISDIR(val) (S_IFDIR & val)
45: struct utimbuf
46: {
47: time_t actime;
48: time_t modtime;
49: };
50: #endif
51:
52:
53: #if defined(WARPUP)
54: #include "devices/timer.h"
55: #include "osdep/posixemu.h"
56: #define REGPARAM
57: #define REGPARAM2
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:
1.1.1.3 root 83: /* The variable-types used in the CPU core: */
1.1.1.7 root 84: typedef uint8_t uae_u8;
85: typedef int8_t uae_s8;
1.1 root 86:
1.1.1.7 root 87: typedef uint16_t uae_u16;
88: typedef int16_t uae_s16;
1.1.1.3 root 89:
1.1.1.7 root 90: typedef uint32_t uae_u32;
91: typedef int32_t uae_s32;
1.1 root 92:
93: typedef uae_u32 uaecptr;
94:
95: #undef uae_s64
96: #undef uae_u64
97:
1.1.1.7 root 98: #if defined(INT64_MAX)
99: # define uae_u64 uint64_t
100: # define uae_s64 int64_t
1.1.1.5 root 101: # if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C)
102: # define VAL64(a) (a ## LL)
103: # define UVAL64(a) (a ## ULL)
104: # else
105: # define VAL64(a) (a ## L)
106: # define UVAL64(a) (a ## UL)
107: # endif
1.1 root 108: #endif
109:
110:
111: /* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known
112: * to have problems, and it's likely that other compilers choke too. */
113: #ifdef __GNUC__
114: #define ENUMDECL typedef enum
115: #define ENUMNAME(name) name
116: #else
117: #define ENUMDECL enum
118: #define ENUMNAME(name) ; typedef int name
119: #endif
120:
1.1.1.5 root 121: /* When using GNU C, make abort more useful. */
122: #ifdef __GNUC__
123: #define abort() \
124: do { \
125: fprintf(stderr, "Internal error; file %s, line %d\n", __FILE__, __LINE__); \
126: (abort) (); \
127: } while (0)
128: #endif
129:
1.1 root 130:
131: #ifndef O_BINARY
132: #define O_BINARY 0
133: #endif
134:
135: #ifndef STATIC_INLINE
136: #define STATIC_INLINE static __inline__
137: #endif
138:
139: /*
140: * You can specify numbers from 0 to 5 here. It is possible that higher
141: * numbers will make the CPU emulation slightly faster, but if the setting
142: * is too high, you will run out of memory while compiling.
143: * Best to leave this as it is.
144: */
145: #define CPU_EMU_SIZE 0
146:
147: #ifndef REGPARAM
148: # define REGPARAM
149: #endif
150: #ifndef REGPARAM2
151: # define REGPARAM2
152: #endif
153:
1.1.1.4 root 154: #endif /* ifndef UAE_SYSDEPS_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.