Skip to content

Commit

Permalink
Use SDL types, on the assumption it does a better job of figuring the…
Browse files Browse the repository at this point in the history
…m out.
  • Loading branch information
slouken committed Oct 3, 2009
1 parent 6bbd26a commit 51ab09e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mikmod/mikmod.h
Expand Up @@ -69,6 +69,19 @@ MIKMODAPI extern long MikMod_GetVersion(void);
* ========== Platform independent-type definitions
*/

#if 1
#include "SDL_types.h"

typedef Sint8 SBYTE; /* 1 byte, signed */
typedef Uint8 UBYTE; /* 1 byte, unsigned */
typedef Sint16 SWORD; /* 2 bytes, signed */
typedef Uint16 UWORD; /* 2 bytes, unsigned */
typedef Sint32 SLONG; /* 4 bytes, signed */
typedef Uint32 ULONG; /* 4 bytes, unsigned */
typedef int BOOL; /* 0=false, <>0 true */
typedef char CHAR;

#else
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
Expand Down Expand Up @@ -111,6 +124,7 @@ typedef unsigned long ULONG; /* 4 bytes, unsigned */
typedef int BOOL; /* 0=false, <>0 true */
#endif
#endif
#endif /* 1 */

/*
* ========== Error codes
Expand Down
5 changes: 5 additions & 0 deletions mikmod/mikmod_internals.h
Expand Up @@ -69,6 +69,10 @@ extern "C" {
/*========== More type definitions */

/* SLONGLONG: 64bit, signed */
#if 1
#include "SDL_types.h"
typedef Sint64 SLONGLONG;
#else
#if defined (__arch64__) || defined(__alpha) || defined(_LP64)
typedef long SLONGLONG;
#define NATIVE_64BIT_INT
Expand All @@ -79,6 +83,7 @@ typedef LONGLONG SLONGLONG;
#else
typedef long long SLONGLONG;
#endif
#endif /* 1 */

/*========== Error handling */

Expand Down

0 comments on commit 51ab09e

Please sign in to comment.