From d6877bc9ae594a7c6dbf125e602bf72d9a528813 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Thu, 23 Mar 2006 00:52:12 +0000 Subject: [PATCH] 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 --- apps/codecs/libmad/fixed.h | 13 ++++--------- apps/codecs/libmad/mad.h | 26 +++++++------------------- 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 @@ # ifndef LIBMAD_FIXED_H # define LIBMAD_FIXED_H -# if SIZEOF_INT >= 4 -typedef signed int mad_fixed_t; +#include -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 9ef6cc8f70..f5d8f1dbcc 100644 --- a/apps/codecs/libmad/mad.h +++ b/apps/codecs/libmad/mad.h @@ -20,19 +20,14 @@ * so by contacting: Underbit Technologies, Inc. */ +#include + # 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 int32_t mad_fixed_t; -typedef signed int mad_fixed64hi_t; -typedef unsigned int mad_fixed64lo_t; -# else -typedef signed long 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