Ticket #41280: tiff-datatypes-configure.ac.diff

File tiff-datatypes-configure.ac.diff, 3.6 KB (added by mojca (Mojca Miklavec), 11 years ago)

a patch for tiff data types during configuration phase

  • configure.ac

    old new AC_CHECK_SIZEOF(unsigned long long) 
    215215AC_CHECK_SIZEOF(unsigned char *)
    216216
    217217AC_MSG_CHECKING(for signed 8-bit type)
    218 INT8_T='signed char'
     218INT8_T='int8_t'
    219219AC_MSG_RESULT($INT8_T)
    220220AC_DEFINE_UNQUOTED(TIFF_INT8_T,$INT8_T,[Signed 8-bit type])
    221221
    222222AC_MSG_CHECKING(for unsigned 8-bit type)
    223 UINT8_T='unsigned char'
     223UINT8_T='uint8_t'
    224224AC_MSG_RESULT($UINT8_T)
    225225AC_DEFINE_UNQUOTED(TIFF_UINT8_T,$UINT8_T,[Unsigned 8-bit type])
    226226
    227227AC_MSG_CHECKING(for signed 16-bit type)
    228 INT16_T='signed short'
     228INT16_T='int16_t'
    229229AC_MSG_RESULT($INT16_T)
    230230AC_DEFINE_UNQUOTED(TIFF_INT16_T,$INT16_T,[Signed 16-bit type])
    231231
    232232
    233233AC_MSG_CHECKING(for unsigned 16-bit type)
    234 UINT16_T='unsigned short'
     234UINT16_T='uint16_t'
    235235AC_MSG_RESULT($UINT16_T)
    236236AC_DEFINE_UNQUOTED(TIFF_UINT16_T,$UINT16_T,[Unsigned 16-bit type])
    237237
    238238AC_MSG_CHECKING(for signed 32-bit type)
    239 INT32_T='none'
    240 INT32_FORMAT='none'
    241 if test $ac_cv_sizeof_signed_int -eq 4
    242 then
    243   INT32_T='signed int'
    244   INT32_FORMAT='"%d"'
    245 elif test $ac_cv_sizeof_signed_long -eq 4
    246 then
    247   INT32_T='signed long'
    248   INT32_FORMAT='"%ld"'
    249 fi
     239INT32_T='int32_t'
    250240AC_MSG_RESULT($INT32_T)
    251241AC_DEFINE_UNQUOTED(TIFF_INT32_T,$INT32_T,[Signed 32-bit type])
    252 AC_DEFINE_UNQUOTED(TIFF_INT32_FORMAT,$INT32_FORMAT,[Signed 32-bit type formatter])
    253242
    254243AC_MSG_CHECKING(for unsigned 32-bit type)
    255 UINT32_T='none'
    256 UINT32_FORMAT='none'
    257 if test $ac_cv_sizeof_unsigned_int -eq 4
    258 then
    259   UINT32_T='unsigned int'
    260   UINT32_FORMAT='"%u"'
    261 elif test $ac_cv_sizeof_unsigned_long -eq 4
    262 then
    263   UINT32_T='unsigned long'
    264   UINT32_FORMAT='"%lu"'
    265 fi
     244UINT32_T='uint32_t'
    266245AC_MSG_RESULT($UINT32_T)
    267246AC_DEFINE_UNQUOTED(TIFF_UINT32_T,$UINT32_T,[Unsigned 32-bit type])
    268 AC_DEFINE_UNQUOTED(TIFF_UINT32_FORMAT,$UINT32_FORMAT,[Unsigned 32-bit type formatter])
    269247
    270248AC_MSG_CHECKING(for signed 64-bit type)
    271 INT64_T='none'
    272 INT64_FORMAT='none'
    273 if test $ac_cv_sizeof_signed_long -eq 8
    274 then
    275   INT64_T='signed long'
    276   INT64_FORMAT='"%ld"'
    277 elif test $ac_cv_sizeof_signed_long_long -eq 8
    278 then
    279   INT64_T='signed long long'
    280   case "${host_os}" in
    281     mingw32*)
    282       # MinGW32 understands 'long long', but uses printf from WIN32 CRT
    283       INT64_FORMAT='"%I64d"'
    284       ;;
    285     *)
    286       INT64_FORMAT='"%lld"'
    287       ;;
    288   esac
    289 fi
    290 
    291 
     249INT64_T='int64_t'
    292250AC_MSG_RESULT($INT64_T)
    293251AC_DEFINE_UNQUOTED(TIFF_INT64_T,$INT64_T,[Signed 64-bit type])
    294 AC_DEFINE_UNQUOTED(TIFF_INT64_FORMAT,$INT64_FORMAT,[Signed 64-bit type formatter])
    295252
    296253AC_MSG_CHECKING(for unsigned 64-bit type)
    297 UINT64_T='none'
    298 UINT64_FORMAT='none'
    299 if test $ac_cv_sizeof_unsigned_long -eq 8
    300 then
    301   UINT64_T='unsigned long'
    302   UINT64_FORMAT='"%lu"'
    303 elif test $ac_cv_sizeof_unsigned_long_long -eq 8
    304 then
    305   UINT64_T='unsigned long long'
    306   case "${host_os}" in
    307     mingw32*)
    308       # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT
    309       UINT64_FORMAT='"%I64u"'
    310       ;;
    311     *)
    312       UINT64_FORMAT='"%llu"'
    313       ;;
    314   esac
    315 fi
     254UINT64_T='uint64_t'
    316255AC_MSG_RESULT($UINT64_T)
    317256AC_DEFINE_UNQUOTED(TIFF_UINT64_T,$UINT64_T,[Unsigned 64-bit type])
    318 AC_DEFINE_UNQUOTED(TIFF_UINT64_FORMAT,$UINT64_FORMAT,[Unsigned 64-bit type formatter])
    319257
    320258# Determine TIFF equivalent of ssize_t
    321259AC_MSG_CHECKING(for signed size type)
  • libtiff/tif_config.h.in

    old new  
    11/* libtiff/tif_config.h.in.  Generated from configure.ac by autoheader.  */
    22
     3#include <stdint.h>
     4
    35/* Define if building universal (internal helper macro) */
    46#undef AC_APPLE_UNIVERSAL_BUILD
    57
  • libtiff/tiffconf.h.in

    old new  
    77#ifndef _TIFFCONF_
    88#define _TIFFCONF_
    99
     10#include <stdint.h>
     11
    1012/* Signed 16-bit type */
    1113#undef TIFF_INT16_T
    1214