summaryrefslogtreecommitdiff
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
parent8bedb5c510d9e329600ec4c5de050e58be51fa42 (diff)
downloadrockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.tar.gz
rockbox-d6877bc9ae594a7c6dbf125e602bf72d9a528813.zip
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
-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 9d181a0c4e..7e580c4e8f 100644
--- a/apps/codecs/libmad/fixed.h
+++ b/apps/codecs/libmad/fixed.h
@@ -22,17 +22,12 @@
22# ifndef LIBMAD_FIXED_H 22# ifndef LIBMAD_FIXED_H
23# define LIBMAD_FIXED_H 23# define LIBMAD_FIXED_H
24 24
25# if SIZEOF_INT >= 4 25#include <inttypes.h>
26typedef signed int mad_fixed_t;
27 26
28typedef signed int mad_fixed64hi_t; 27typedef int32_t mad_fixed_t;
29typedef unsigned int mad_fixed64lo_t;
30# else
31typedef signed long mad_fixed_t;
32 28
33typedef signed long mad_fixed64hi_t; 29typedef int32_t mad_fixed64hi_t;
34typedef unsigned long mad_fixed64lo_t; 30typedef uint32_t mad_fixed64lo_t;
35# endif
36 31
37# if defined(_MSC_VER) 32# if defined(_MSC_VER)
38# define mad_fixed64_t signed __int64 33# define mad_fixed64_t signed __int64
diff --git a/apps/codecs/libmad/mad.h b/apps/codecs/libmad/mad.h
index 9ef6cc8f70..f5d8f1dbcc 100644
--- a/apps/codecs/libmad/mad.h
+++ b/apps/codecs/libmad/mad.h
@@ -20,19 +20,14 @@
20 * so by contacting: Underbit Technologies, Inc. <info@underbit.com> 20 * so by contacting: Underbit Technologies, Inc. <info@underbit.com>
21 */ 21 */
22 22
23#include <inttypes.h>
24
23# ifdef __cplusplus 25# ifdef __cplusplus
24extern "C" { 26extern "C" {
25# endif 27# endif
26 28
27# define FPM_INTEL 29# define FPM_DEFAULT
28 30
29
30
31# define SIZEOF_INT 4
32# define SIZEOF_LONG 4
33# define SIZEOF_LONG_LONG 8
34
35
36/* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */ 31/* Id: version.h,v 1.26 2004/01/23 09:41:33 rob Exp */
37 32
38# ifndef LIBMAD_VERSION_H 33# ifndef LIBMAD_VERSION_H
@@ -67,17 +62,10 @@ extern char const mad_build[];
67# ifndef LIBMAD_FIXED_H 62# ifndef LIBMAD_FIXED_H
68# define LIBMAD_FIXED_H 63# define LIBMAD_FIXED_H
69 64
70# if SIZEOF_INT >= 4 65typedef int32_t mad_fixed_t;
71typedef signed int mad_fixed_t;
72
73typedef signed int mad_fixed64hi_t;
74typedef unsigned int mad_fixed64lo_t;
75# else
76typedef signed long mad_fixed_t;
77 66
78typedef signed long mad_fixed64hi_t; 67typedef int32_t mad_fixed64hi_t;
79typedef unsigned long mad_fixed64lo_t; 68typedef uint32_t mad_fixed64lo_t;
80# endif
81 69
82# if defined(_MSC_VER) 70# if defined(_MSC_VER)
83# define mad_fixed64_t signed __int64 71# define mad_fixed64_t signed __int64