From 9fd532ac9639962de05196bcf235cc0bce03a59d Mon Sep 17 00:00:00 2001 From: erayhanoglu Date: Fri, 6 Jan 2017 09:03:51 +0200 Subject: [PATCH 1/2] Fix warning for bcc64 compiler bcc64 produces a warning for fprintf methods, that uses PRIi64 specifier. "[bcc64 Warning] j2k.c(9454): invalid conversion specifier 'I'" This modification fixes the warning. --- src/lib/openjp2/opj_inttypes.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/openjp2/opj_inttypes.h b/src/lib/openjp2/opj_inttypes.h index e74aed6a1..ed6befa2e 100644 --- a/src/lib/openjp2/opj_inttypes.h +++ b/src/lib/openjp2/opj_inttypes.h @@ -36,10 +36,17 @@ #include #else #if defined(_WIN32) +#if defined(__BORLANDC__) && defined(_WIN64) +#define PRId64 "lld" +#define PRIi64 "lli" +#define PRIu64 "llu" +#define PRIx64 "llx" +#else #define PRId64 "I64d" #define PRIi64 "I64i" #define PRIu64 "I64u" #define PRIx64 "I64x" +#endif #else #error unsupported platform #endif From 2b962d5bd555a43764c2cf9b01386975115d23fb Mon Sep 17 00:00:00 2001 From: erayhanoglu Date: Fri, 6 Jan 2017 09:33:54 +0200 Subject: [PATCH 2/2] Fix for c++ builder non windows compilers This fix is needed to compile with non windows c++ builder compilers --- src/lib/openjp2/opj_includes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h index e3de42dae..c35f7fe18 100644 --- a/src/lib/openjp2/opj_includes.h +++ b/src/lib/openjp2/opj_includes.h @@ -68,7 +68,8 @@ #endif -#if defined(WIN32) && !defined(Windows95) && !defined(__BORLANDC__) && \ +#if defined(WIN32) && !defined(Windows95) && !defined( +) && \ !(defined(_MSC_VER) && _MSC_VER < 1400) && \ !(defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x800) /* @@ -153,7 +154,7 @@ static INLINE long opj_lrintf(float f){ return (long)((f>0.0f) ? (f + 0.5f) : (f - 0.5f)); #endif } -#elif defined(__BORLANDC__) +#elif defined(__BORLANDC__) && defined(_WIN32) static INLINE long opj_lrintf(float f) { #ifdef _M_X64 return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));