|
|
1.1 ! root 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: * ! 16: * This file is distributed under the GNU Public License, version 2 or at ! 17: * your option any later version. Read the file gpl.txt for details. ! 18: */ ! 19: ! 20: #ifndef UAE_SYSDEPS_H ! 21: #define UAE_SYSDEPS_H ! 22: ! 23: #include <stdio.h> ! 24: #include <stdlib.h> ! 25: #include <errno.h> ! 26: #include <assert.h> ! 27: #include <limits.h> ! 28: ! 29: #ifndef __STDC__ ! 30: #error "Your compiler is not ANSI. Get a real one." ! 31: #endif ! 32: ! 33: #include <stdarg.h> ! 34: ! 35: #include <errno.h> ! 36: #include <assert.h> ! 37: ! 38: #include <SDL_types.h> ! 39: ! 40: ! 41: #if EEXIST == ENOTEMPTY ! 42: #define BROKEN_OS_PROBABLY_AIX ! 43: #endif ! 44: ! 45: #ifdef __NeXT__ ! 46: #define S_IRUSR S_IREAD ! 47: #define S_IWUSR S_IWRITE ! 48: #define S_IXUSR S_IEXEC ! 49: #define S_ISDIR(val) (S_IFDIR & val) ! 50: struct utimbuf ! 51: { ! 52: time_t actime; ! 53: time_t modtime; ! 54: }; ! 55: #endif ! 56: ! 57: ! 58: #if defined(WARPUP) ! 59: #include "devices/timer.h" ! 60: #include "osdep/posixemu.h" ! 61: #define REGPARAM ! 62: #define REGPARAM2 ! 63: #define RETSIGTYPE ! 64: #define USE_ZFILE ! 65: #define strcasecmp stricmp ! 66: #define memcpy q_memcpy ! 67: #define memset q_memset ! 68: #define strdup my_strdup ! 69: #define random rand ! 70: #define creat(x,y) open("T:creat",O_CREAT|O_RDWR|O_TRUNC,777) ! 71: extern void* q_memset(void*,int,size_t); ! 72: extern void* q_memcpy(void*,const void*,size_t); ! 73: #endif ! 74: ! 75: ! 76: /* Acorn specific stuff */ ! 77: #ifdef ACORN ! 78: ! 79: #define S_IRUSR S_IREAD ! 80: #define S_IWUSR S_IWRITE ! 81: #define S_IXUSR S_IEXEC ! 82: ! 83: #define strcasecmp stricmp ! 84: ! 85: #endif ! 86: ! 87: ! 88: /* The variable-types used in the CPU core: */ ! 89: /* We're mapping them to the SDL types, I hope this will work on all systems... */ ! 90: typedef Uint8 uae_u8; ! 91: typedef Sint8 uae_s8; ! 92: ! 93: typedef Uint16 uae_u16; ! 94: typedef Sint16 uae_s16; ! 95: ! 96: typedef Uint32 uae_u32; ! 97: typedef Sint32 uae_s32; ! 98: ! 99: typedef uae_u32 uaecptr; ! 100: ! 101: #undef uae_s64 ! 102: #undef uae_u64 ! 103: ! 104: #if defined(SDL_HAS_64BIT_TYPE) ! 105: # define uae_s64 Sint64 ! 106: # define uae_u64 Uint64 ! 107: # if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) ! 108: # define VAL64(a) (a ## LL) ! 109: # define UVAL64(a) (a ## ULL) ! 110: # else ! 111: # define VAL64(a) (a ## L) ! 112: # define UVAL64(a) (a ## UL) ! 113: # endif ! 114: #endif ! 115: ! 116: ! 117: /* We can only rely on GNU C getting enums right. Mickeysoft VSC++ is known ! 118: * to have problems, and it's likely that other compilers choke too. */ ! 119: #ifdef __GNUC__ ! 120: #define ENUMDECL typedef enum ! 121: #define ENUMNAME(name) name ! 122: #else ! 123: #define ENUMDECL enum ! 124: #define ENUMNAME(name) ; typedef int name ! 125: #endif ! 126: ! 127: /* When using GNU C, make abort more useful. */ ! 128: #ifdef __GNUC__ ! 129: #define abort() \ ! 130: do { \ ! 131: fprintf(stderr, "Internal error; file %s, line %d\n", __FILE__, __LINE__); \ ! 132: (abort) (); \ ! 133: } while (0) ! 134: #endif ! 135: ! 136: ! 137: #ifndef O_BINARY ! 138: #define O_BINARY 0 ! 139: #endif ! 140: ! 141: #ifndef STATIC_INLINE ! 142: #define STATIC_INLINE static __inline__ ! 143: #endif ! 144: ! 145: /* ! 146: * You can specify numbers from 0 to 5 here. It is possible that higher ! 147: * numbers will make the CPU emulation slightly faster, but if the setting ! 148: * is too high, you will run out of memory while compiling. ! 149: * Best to leave this as it is. ! 150: */ ! 151: #define CPU_EMU_SIZE 0 ! 152: ! 153: #ifndef REGPARAM ! 154: # define REGPARAM ! 155: #endif ! 156: #ifndef REGPARAM2 ! 157: # define REGPARAM2 ! 158: #endif ! 159: ! 160: #endif /* ifndef UAE_SYSDEPS_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.