Ticket #6694: int64.patch

File int64.patch, 2.4 KB (added by Ben Craig <ben.craig@…>, 11 years ago)

Tweaks to integer.hpp and cstdint.hpp

  • \boost\cstdint.hpp

    old new  
    455455//  64-bit types + intmax_t and uintmax_t  ----------------------------------//
    456456#ifndef INT64_C
    457457#  if defined(BOOST_HAS_LONG_LONG) && \
    458     (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX))
     458    (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX))
    459459
    460460#    if defined(__hpux)
    461461        // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
     
    464464#    elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) ||  \
    465465        (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) ||  \
    466466        (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \
    467         (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL)
     467        (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \
     468        (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL)
    468469
    469470#       define INT64_C(value) value##LL
    470471#       define UINT64_C(value) value##uLL
  • \boost\integer.hpp

    old new  
    170170  {
    171171      typedef typename detail::int_least_helper
    172172        <
    173 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
     173#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
    174174          (MaxValue <= ::boost::integer_traits<boost::long_long_type>::const_max) +
    175175#else
    176176           1 +
     
    192192  {
    193193      typedef typename detail::int_least_helper
    194194        <
    195 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
     195#if !defined(BOOST_NO_INTEGRAL_INT64_T)  && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
    196196          (MinValue >= ::boost::integer_traits<boost::long_long_type>::const_min) +
    197197#else
    198198           1 +
     
    237237      typedef typename detail::int_least_helper
    238238        <
    239239          5 +
    240 #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG)
     240#if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG)
    241241          (MaxValue <= ::boost::integer_traits<boost::ulong_long_type>::const_max) +
    242242#else
    243243           1 +