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)); 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