From 0c671c842e45e7776b0c06e06f86176d235f1d51 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Wed, 8 Jan 2003 08:04:42 +0000 Subject: [PATCH] working 64-bit literals for MSVC --- src/libFLAC/lpc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libFLAC/lpc.c b/src/libFLAC/lpc.c index 8225cff..a996c39 100644 --- a/src/libFLAC/lpc.c +++ b/src/libFLAC/lpc.c @@ -220,9 +220,8 @@ void FLAC__lpc_compute_residual_from_qlp_coefficients(const FLAC__int32 data[], sum += qlp_coeff[j] * (*(--history)); #ifdef FLAC__OVERFLOW_DETECT sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history); -#if defined _MSC_VER || defined __MINGW32__ /* don't know how to do 64-bit literals in VC++ */ - if(sumo < 0) sumo = -sumo; - if(sumo > 2147483647) +#if defined _MSC_VER /* don't know how to do 64-bit literals in VC++ */ + if(sumo > 2147483647I64 || sumo < -2147483648I64) #else if(sumo > 2147483647ll || sumo < -2147483648ll) #endif @@ -304,9 +303,8 @@ void FLAC__lpc_restore_signal(const FLAC__int32 residual[], unsigned data_len, c sum += qlp_coeff[j] * (*(--history)); #ifdef FLAC__OVERFLOW_DETECT sumo += (FLAC__int64)qlp_coeff[j] * (FLAC__int64)(*history); -#if defined _MSC_VER || defined __MINGW32__ /* don't know how to do 64-bit literals in VC++ */ - if(sumo < 0) sumo = -sumo; - if(sumo > 2147483647) +#if defined _MSC_VER /* don't know how to do 64-bit literals in VC++ */ + if(sumo > 2147483647I64 || sumo < -2147483648I64) #else if(sumo > 2147483647ll || sumo < -2147483648ll) #endif -- 2.7.4