summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-03-23 00:52:12 +0000
committerThom Johansen <thomj@rockbox.org>2006-03-23 00:52:12 +0000
commitd6877bc9ae594a7c6dbf125e602bf72d9a528813 (patch)
tree2f58c114f040de73c9befbeabf904389ef4f4205 /apps/codecs
parent8bedb5c510d9e329600ec4c5de050e58be51fa42 (diff)
downloadrockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.zip
rockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.tar.gz
rockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.tar.bz2
rockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.tar.xz
Make libmad use inttypes.h types and remove the old ad-hoc typedefs.
Makes mpa.c work somewhat better in 64 bit sims, thought there's still another crash issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9199 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libmad/fixed.h13
-rw-r--r--apps/codecs/libmad/mad.h26
2 files changed, 11 insertions, 28 deletions
diff --git a/apps/codecs/libmad/fixed.h b/apps/codecs/libmad/fixed.h
index 9d181a0..7e580c4 100644
--- a/apps/codecs/libmad/fixed.h
+++ b/apps/codecs/libmad/fixed.h
@@ -22,17 +22,12 @@
# ifndef LIBMAD_FIXED_H
# define LIBMAD_FIXED_H
-# if SIZEOF_INT >= 4
-typedef signed int mad_fixed_t;
+#include <inttypes.h>
-typedef signed int mad_fixed64hi_t;
-typedef unsigned int mad_fixed64lo_t;
-# else
-typedef signed long mad_fixed_t;
+typedef int32_t mad_fixed_t;
-typedef signed long mad_fixed64hi_t;
-typedef unsigned long mad_fixed64lo_t;
-# endif
+typedef int32_t mad_fixed64hi_t;
+typedef uint32_t mad_fixed64lo_t;
# if defined(_MSC_VER)
# define mad_fixed64_t signed __int64
diff --git a/apps/codecs/libmad/mad.h b/apps/codecs/libmad/mad.h
index 9ef6cc8..f5d8f1d 100644
--- a/apps/codecs/libmad/mad.h
+++ b/apps/codecs/libmad/mad.h
@@ -20,19 +20,14 @@
* so by contacting: Underbit Technologies, Inc. <info@underbit.com>
*/
+#include <inttypes.h>
+
# ifdef __cplusplus
extern "C" {
# endif
-# define FPM_INTEL
-
-
-
-# define SIZEOF_INT 4
-# define SIZEOF_LONG 4
-# define SIZEOF_LONG_LONG 8
-
-
+# define FPM_DEFAULT
+
/* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */
# ifndef LIBMAD_VERSION_H
@@ -67,17 +62,10 @@ extern char const mad_build[];
# ifndef LIBMAD_FIXED_H
# define LIBMAD_FIXED_H
-# if SIZEOF_INT >= 4
-typedef signed int mad_fixed_t;
-
-typedef signed int mad_fixed64hi_t;
-typedef unsigned int mad_fixed64lo_t;
-# else
-typedef signed long mad_fixed_t;
+typedef int32_t mad_fixed_t;
-typedef signed long mad_fixed64hi_t;
-typedef unsigned long mad_fixed64lo_t;
-# endif
+typedef int32_t mad_fixed64hi_t;
+typedef uint32_t mad_fixed64lo_t;
# if defined(_MSC_VER)
# define mad_fixed64_t signed __int64