From 8a634d0fe34cca1295dd9085edd6bf32031ca281 Mon Sep 17 00:00:00 2001 From: Francois-Olivier Devaux Date: Thu, 8 Apr 2010 20:20:34 +0000 Subject: [PATCH] [v2.0] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix. --- ChangeLog | 1 + libopenjpeg/opj_includes.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index db36e551..d20af7e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ What's New for OpenJPEG + : added April 8, 2010 +* [FOD] Fixed problem with Borland C++ Builder (Borland C do not have lrintf). Thanks Marek Mauder for this fix. * [FOD] Fixed pi.c bug (issue 15 on google code). Thanks to Anton Lionel for catching this. * [FOD] Fixed MJ2 codec bugs (issues 23-24 on google code). Thanks to Winfried for these patches. diff --git a/libopenjpeg/opj_includes.h b/libopenjpeg/opj_includes.h index d4ed1ae1..dbf0f505 100644 --- a/libopenjpeg/opj_includes.h +++ b/libopenjpeg/opj_includes.h @@ -87,8 +87,8 @@ Most compilers implement their own version of this keyword ... #endif #endif -/* MSVC does not have lrintf */ -#ifdef _MSC_VER +/* MSVC and Borland C do not have lrintf */ +#if defined(_MSC_VER) || defined(__BORLANDC__) static INLINE long lrintf(float f){ int i;