mirror of
https://github.com/digarok/gsplus.git
synced 2024-06-15 10:29:29 +00:00
GCC's documentation states that __LP64__ is defined if sizeof(void *) == 8 and sizeof(int) == 4. Well, under mingw64 that doesn't seem to be true. And it causes lots of warnings.
Anyhow, as of c99, stdint.h defines a type specifically for casting pointers to integers. It also defines fixed size types so no need to guess or sniff compilers.
This commit is contained in:
parent
9d1422e6cc
commit
731d5c3a5b
20
src/defc.h
20
src/defc.h
|
@ -22,6 +22,7 @@
|
|||
*/
|
||||
|
||||
#include "defcomm.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// OG redirect printf to console
|
||||
#ifdef ACTIVEGS
|
||||
|
@ -34,14 +35,11 @@ extern "C" int fOutputInfo(FILE*,const char* format,...);
|
|||
|
||||
#define STRUCT(a) typedef struct _ ## a a; struct _ ## a
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word16;
|
||||
typedef unsigned int word32;
|
||||
#if _MSC_VER
|
||||
typedef unsigned __int64 word64;
|
||||
#else
|
||||
typedef unsigned long long word64;
|
||||
#endif
|
||||
typedef uint8_t byte;
|
||||
typedef uint16_t word16;
|
||||
typedef uint32_t word32;
|
||||
typedef uint64_t word64;
|
||||
#define PTR2WORD(a) ((uintptr_t)(a))
|
||||
|
||||
void U_STACK_TRACE();
|
||||
|
||||
|
@ -244,12 +242,6 @@ STRUCT(Emustate_word32list) {
|
|||
word32 *wptr;
|
||||
};
|
||||
|
||||
#ifdef __LP64__
|
||||
# define PTR2WORD(a) ((unsigned long)(a))
|
||||
#else
|
||||
# define PTR2WORD(a) ((unsigned int)(a))
|
||||
#endif
|
||||
|
||||
|
||||
#define ALTZP (g_c068_statereg & 0x80)
|
||||
/* #define PAGE2 (g_c068_statereg & 0x40) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user