[trunk] fix compilation on OS where ssize_t is not defined.

This commit is contained in:
Mathieu Malaterre 2012-03-27 07:44:28 +00:00
parent 0c5193c588
commit 9642c7f990
3 changed files with 9 additions and 0 deletions

View File

@ -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"

View File

@ -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 */

View File

@ -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