make TIFF_SSIZE_T the same bitwidth as TIFF_SIZE_T
it was previously the same bitwidth as unsigned char * Pointers can be larger than size_t.
This commit is contained in:
parent
69ce2652ef
commit
4d26884a15
@ -338,29 +338,21 @@ endif()
|
||||
if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T)
|
||||
set(TIFF_SIZE_T "unsigned int")
|
||||
set(TIFF_SIZE_FORMAT "%u")
|
||||
set(TIFF_SSIZE_T "signed int")
|
||||
set(TIFF_SSIZE_FORMAT "%d")
|
||||
elseif(SIZEOF_UNSIGNED_LONG EQUAL SIZEOF_SIZE_T)
|
||||
set(TIFF_SIZE_T "unsigned long")
|
||||
set(TIFF_SIZE_FORMAT "%lu")
|
||||
elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T)
|
||||
set(TIFF_SIZE_T "unsigned long long")
|
||||
if (MINGW)
|
||||
set(TIFF_SIZE_FORMAT "%I64u")
|
||||
else()
|
||||
set(TIFF_SIZE_FORMAT "%llu")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SIZEOF_SIGNED_INT EQUAL SIZEOF_UNSIGNED_CHAR_P)
|
||||
set(TIFF_SSIZE_T "signed int")
|
||||
set(TIFF_SSIZE_FORMAT "%d")
|
||||
elseif(SIZEOF_SIGNED_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
|
||||
set(TIFF_SSIZE_T "signed long")
|
||||
set(TIFF_SSIZE_FORMAT "%ld")
|
||||
elseif(SIZEOF_SIGNED_LONG_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
|
||||
elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T)
|
||||
set(TIFF_SIZE_T "unsigned long long")
|
||||
set(TIFF_SSIZE_T "signed long long")
|
||||
if (MINGW)
|
||||
set(TIFF_SIZE_FORMAT "%I64u")
|
||||
set(TIFF_SSIZE_FORMAT "%I64d")
|
||||
else()
|
||||
set(TIFF_SIZE_FORMAT "%llu")
|
||||
set(TIFF_SSIZE_FORMAT "%lld")
|
||||
endif()
|
||||
endif()
|
||||
|
@ -365,15 +365,15 @@ AC_DEFINE_UNQUOTED([TIFF_SIZE_FORMAT],[$SIZE_FORMAT],[Size type formatter])
|
||||
AC_MSG_CHECKING(for signed size type)
|
||||
SSIZE_T='unknown'
|
||||
SSIZE_FORMAT='unknown'
|
||||
if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_unsigned_char_p
|
||||
if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_size_t
|
||||
then
|
||||
SSIZE_T='signed int'
|
||||
SSIZE_FORMAT='"%d"'
|
||||
elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
|
||||
elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_size_t
|
||||
then
|
||||
SSIZE_T='signed long'
|
||||
SSIZE_FORMAT='"%ld"'
|
||||
elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p
|
||||
elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_size_t
|
||||
then
|
||||
SSIZE_T='signed long long'
|
||||
case "${host_os}" in
|
||||
|
@ -51,7 +51,7 @@ main()
|
||||
CHECK_TYPE(TIFF_UINT32_T, 4)
|
||||
CHECK_TYPE(TIFF_UINT64_T, 8)
|
||||
CHECK_TYPE(TIFF_SIZE_T, sizeof(size_t))
|
||||
CHECK_TYPE(TIFF_SSIZE_T, sizeof(unsigned char *))
|
||||
CHECK_TYPE(TIFF_SSIZE_T, sizeof(size_t))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user