[trunk] fix compilation on OS where ssize_t is not defined.
This commit is contained in:
parent
0c5193c588
commit
9642c7f990
|
@ -209,6 +209,9 @@ IF(BUILD_CODEC OR BUILD_MJ2)
|
||||||
ADD_SUBDIRECTORY(applications)
|
ADD_SUBDIRECTORY(applications)
|
||||||
ENDIF (BUILD_CODEC OR BUILD_MJ2)
|
ENDIF (BUILD_CODEC OR BUILD_MJ2)
|
||||||
|
|
||||||
|
include(CheckTypeSize)
|
||||||
|
CHECK_TYPE_SIZE(ssize_t SSIZE_T)
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# opj_config.h generation (2/2)
|
# opj_config.h generation (2/2)
|
||||||
CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_config.h.cmake.in"
|
CONFIGURE_FILE("${OPENJPEG_SOURCE_DIR}/opj_config.h.cmake.in"
|
||||||
|
|
|
@ -48,4 +48,9 @@ typedef size_t OPJ_SIZE_T;
|
||||||
/* 64-bit file offset type */
|
/* 64-bit file offset type */
|
||||||
typedef int64_t OPJ_OFF_T;
|
typedef int64_t OPJ_OFF_T;
|
||||||
|
|
||||||
|
#ifndef HAVE_SSIZE_T
|
||||||
|
#include <BaseTsd.h>
|
||||||
|
typedef SSIZE_T ssize_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* OPJ_STDINT_H */
|
#endif /* OPJ_STDINT_H */
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#cmakedefine HAVE_PNG_H @HAVE_PNG_H@
|
#cmakedefine HAVE_PNG_H @HAVE_PNG_H@
|
||||||
#cmakedefine HAVE_LIBTIFF @HAVE_LIBTIFF@
|
#cmakedefine HAVE_LIBTIFF @HAVE_LIBTIFF@
|
||||||
#cmakedefine HAVE_TIFF_H @HAVE_TIFF_H@
|
#cmakedefine HAVE_TIFF_H @HAVE_TIFF_H@
|
||||||
|
#cmakedefine HAVE_SSIZE_T @HAVE_SSIZE_T@
|
||||||
|
|
||||||
#cmakedefine _LARGEFILE_SOURCE
|
#cmakedefine _LARGEFILE_SOURCE
|
||||||
#cmakedefine _LARGE_FILES
|
#cmakedefine _LARGE_FILES
|
||||||
|
|
Loading…
Reference in New Issue