From 1db27208ba7c5a15e027bb39e5a41cfdca2fb4e5 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Wed, 8 Nov 2000 22:38:57 +0000 Subject: [PATCH] test fix for beos svn path=/trunk/vorbis/; revision=1039 --- lib/os.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/os.h b/lib/os.h index d0e7f9c..a900fe9 100644 --- a/lib/os.h +++ b/lib/os.h @@ -14,7 +14,7 @@ ******************************************************************** function: #ifdef jail to whip a few platforms into the UNIX ideal. - last mod: $Id: os.h,v 1.14 2000/11/06 20:36:07 jack Exp $ + last mod: $Id: os.h,v 1.15 2000/11/08 22:38:57 jack Exp $ ********************************************************************/ @@ -62,6 +62,8 @@ #if defined(__i386__) && defined(__GNUC__) +#ifndef __BEOS__ + /* both GCC and MSVC are kinda stupid about rounding/casting to int. Because of encapsulation constraints (GCC can't see inside the asm block and so we end up doing stupid things like a store/load that @@ -96,6 +98,18 @@ static inline int vorbis_ftoi(double f){ /* yes, double! Otherwise, } #else +/* this is for beos */ +static int vorbis_ftoi(double f){ + return (int)(f+.5); +} + +/* We don't have special code for this compiler/arch, so do it the slow way */ +#define vorbis_fpu_setround(vorbis_fpu_control) {} +#define vorbis_fpu_restore(vorbis_fpu_control) {} + +#endif + +#else typedef int vorbis_fpu_control; -- 2.7.4