Skip to content
Open
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
8 changes: 8 additions & 0 deletions DevIL/src-IL/src/il_jp2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,22 +324,30 @@ ILboolean iLoadJp2Internal(jas_stream_t *Stream, ILimage *Image)
// see: https://github.com/OSGeo/gdal/commit/9ef8e16e27c5fc4c491debe50bf2b7f3e94ed334
// https://github.com/DentonW/DevIL/issues/90
#if defined(PRIjas_seqent)
#if JAS_VERSION_MAJOR >= 3
static long int iJp2_file_read(jas_stream_obj_t *obj, char *buf, long unsigned int cnt)
#elif JAS_VERSION_MAJOR < 3
static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
#else
static int iJp2_file_read(jas_stream_obj_t *obj, char *buf, int cnt)
#endif
#endif
{
obj;
return iread(buf, 1, cnt);
}

#if defined(JAS_INCLUDE_JP2_CODEC)
#if JAS_VERSION_MAJOR >= 3
static long int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, long unsigned int cnt)
#elif JAS_VERSION_MAJOR < 3
static int iJp2_file_write(jas_stream_obj_t *obj, const char *buf, unsigned cnt)
#elif defined(PRIjas_seqent)
static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, unsigned cnt)
#else
static int iJp2_file_write(jas_stream_obj_t *obj, char *buf, int cnt)
#endif
#endif
{
obj;
return iwrite(buf, 1, cnt);
Expand Down