Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixes for c++ builder #881

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lib/openjp2/opj_includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@
#endif


#if defined(WIN32) && !defined(Windows95) && !defined(__BORLANDC__) && \
#if defined(WIN32) && !defined(Windows95) && !defined(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This !defined( newline ) seems erroneous

) && \
!(defined(_MSC_VER) && _MSC_VER < 1400) && \
!(defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x800)
/*
Expand Down Expand Up @@ -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));
Expand Down
7 changes: 7 additions & 0 deletions src/lib/openjp2/opj_inttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@
#include <inttypes.h>
#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
Expand Down