--- include/mikmod.h.in +++ include/mikmod.h.in @@ -85,30 +85,16 @@ @DOES_NOT_HAVE_SIGNED@ -#if defined(__arch64__) || defined(__alpha) -/* 64 bit architectures */ - -typedef signed char SBYTE; /* 1 byte, signed */ -typedef unsigned char UBYTE; /* 1 byte, unsigned */ -typedef signed short SWORD; /* 2 bytes, signed */ -typedef unsigned short UWORD; /* 2 bytes, unsigned */ -typedef signed int SLONG; /* 4 bytes, signed */ -typedef unsigned int ULONG; /* 4 bytes, unsigned */ -typedef int BOOL; /* 0=false, <>0 true */ - -#else -/* 32 bit architectures */ - -typedef signed char SBYTE; /* 1 byte, signed */ -typedef unsigned char UBYTE; /* 1 byte, unsigned */ -typedef signed short SWORD; /* 2 bytes, signed */ -typedef unsigned short UWORD; /* 2 bytes, unsigned */ -typedef signed long SLONG; /* 4 bytes, signed */ +#include +typedef int8_t SBYTE; /* 1 byte, signed */ +typedef uint8_t UBYTE; /* 1 byte, unsigned */ +typedef int16_t SWORD; /* 2 bytes, signed */ +typedef uint16_t UWORD; /* 2 bytes, unsigned */ +typedef int32_t SLONG; /* 4 bytes, signed */ #if !defined(__OS2__)&&!defined(__EMX__)&&!defined(WIN32) -typedef unsigned long ULONG; /* 4 bytes, unsigned */ +typedef uint32_t ULONG; /* 4 bytes, unsigned */ typedef int BOOL; /* 0=false, <>0 true */ #endif -#endif /* * ========== Error codes --- include/mikmod_internals.h +++ include/mikmod_internals.h @@ -50,15 +50,11 @@ /*========== More type definitions */ /* SLONGLONG: 64bit, signed */ -#if defined (__arch64__) || defined(__alpha) -typedef long SLONGLONG; +#include +typedef int64_t SLONGLONG; +#include +#if ULONG_MAX > 0xffffffff #define NATIVE_64BIT_INT -#elif defined(__WATCOMC__) -typedef __int64 SLONGLONG; -#elif defined(WIN32) && !defined(__MWERKS__) -typedef LONGLONG SLONGLONG; -#else -typedef long long SLONGLONG; #endif /*========== Error handling */