Annotation of hatari/src/uae-cpu/sysdeps.h, revision 1.1.1.4

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