summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/blargg_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libgme/blargg_common.h')
-rw-r--r--apps/codecs/libgme/blargg_common.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/apps/codecs/libgme/blargg_common.h b/apps/codecs/libgme/blargg_common.h
index 65ae76ae99..a023d6b842 100644
--- a/apps/codecs/libgme/blargg_common.h
+++ b/apps/codecs/libgme/blargg_common.h
@@ -7,12 +7,12 @@
7#include <stddef.h> 7#include <stddef.h>
8#include <stdlib.h> 8#include <stdlib.h>
9#include <string.h> 9#include <string.h>
10#include <assert.h>
11#include <limits.h> 10#include <limits.h>
12 11
13#undef BLARGG_COMMON_H 12#undef BLARGG_COMMON_H
14// allow blargg_config.h to #include blargg_common.h 13// allow blargg_config.h to #include blargg_common.h
15#include "blargg_config.h" 14#include "blargg_config.h"
15#include "blargg_source.h"
16#ifndef BLARGG_COMMON_H 16#ifndef BLARGG_COMMON_H
17#define BLARGG_COMMON_H 17#define BLARGG_COMMON_H
18 18
@@ -98,19 +98,13 @@
98 static bool false = 0; 98 static bool false = 0;
99#endif 99#endif
100 100
101// blargg_long/blargg_ulong = at least 32 bits, int if it's big enough 101/* My code depends on int being at least 32 bits. Almost everything these days
102#include <limits.h> 102uses at least 32-bit ints, so it's hard to even find a system with 16-bit ints
103 103to test with. The issue can't be gotten around by using a suitable blargg_int
104#if INT_MAX >= 0x7FFFFFFF 104everywhere either, because int is often converted to implicitly when doing
105 typedef int blargg_long; 105arithmetic on smaller types. */
106#else 106#if UINT_MAX < 0xFFFFFFFF
107 typedef long blargg_long; 107 #error "int must be at least 32 bits"
108#endif
109
110#if UINT_MAX >= 0xFFFFFFFF
111 typedef unsigned blargg_ulong;
112#else
113 typedef unsigned long blargg_ulong;
114#endif 108#endif
115 109
116// int8_t etc. 110// int8_t etc.