Annotation of previous/src/uae-cpu/sysdeps.h, revision 1.1

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 <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>
        !            33: #include <stdint.h>
        !            34: 
        !            35: 
        !            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: 
        !            83: /* The variable-types used in the CPU core: */
        !            84: typedef uint8_t uae_u8;
        !            85: typedef int8_t uae_s8;
        !            86: 
        !            87: typedef uint16_t uae_u16;
        !            88: typedef int16_t uae_s16;
        !            89: 
        !            90: typedef uint32_t uae_u32;
        !            91: typedef int32_t uae_s32;
        !            92: 
        !            93: typedef uae_u32 uaecptr;
        !            94: 
        !            95: #undef uae_s64
        !            96: #undef uae_u64
        !            97: 
        !            98: #if defined(INT64_MAX)
        !            99: # define uae_u64 uint64_t
        !           100: # define uae_s64 int64_t
        !           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
        !           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: 
        !           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: 
        !           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: 
        !           154: #endif /* ifndef UAE_SYSDEPS_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.