Changeset 217105 in webkit


Ignore:
Timestamp:
May 19, 2017 1:58:30 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[CMake] Add HAVE check for int128_t
https://bugs.webkit.org/show_bug.cgi?id=172317

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-19
Reviewed by Yusuke Suzuki.

.:

  • Source/cmake/OptionsCommon.cmake:

Source/WTF:

  • wtf/MediaTime.cpp:

(WTF::MediaTime::setTimeScale):

  • wtf/Platform.h:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r216928 r217105  
     12017-05-19  Don Olmstead  <don.olmstead@am.sony.com>
     2
     3        [CMake] Add HAVE check for __int128_t
     4        https://bugs.webkit.org/show_bug.cgi?id=172317
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        * Source/cmake/OptionsCommon.cmake:
     9
    1102017-05-16  Zan Dobersek  <zdobersek@igalia.com>
    211
  • trunk/Source/WTF/ChangeLog

    r217101 r217105  
     12017-05-19  Don Olmstead  <don.olmstead@am.sony.com>
     2
     3        [CMake] Add HAVE check for __int128_t
     4        https://bugs.webkit.org/show_bug.cgi?id=172317
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        * wtf/MediaTime.cpp:
     9        (WTF::MediaTime::setTimeScale):
     10        * wtf/Platform.h:
     11
    1122017-05-18  Andreas Kling  <akling@apple.com>
    213
  • trunk/Source/WTF/wtf/MediaTime.cpp

    r213419 r217105  
    490490    timeScale = std::min(MaximumTimeScale, timeScale);
    491491
    492 #if !PLATFORM(WIN) && (CPU(X86_64) || CPU(ARM64))
     492#if HAVE(INT128_T)
    493493    __int128_t newValue = static_cast<__int128_t>(m_timeValue) * timeScale;
    494494    int64_t remainder = newValue % m_timeScale;
  • trunk/Source/WTF/wtf/Platform.h

    r216827 r217105  
    649649#define HAVE_TM_ZONE 1
    650650#define HAVE_TIMEGM 1
     651
     652#if CPU(X86_64) || CPU(ARM64)
     653#define HAVE_INT128_T 1
     654#endif
    651655#endif /* OS(DARWIN) */
    652656
  • trunk/Source/cmake/OptionsCommon.cmake

    r216705 r217105  
    229229include(CheckSymbolExists)
    230230include(CheckStructHasMember)
     231include(CheckTypeSize)
    231232
    232233macro(_HAVE_CHECK_INCLUDE _variable _header)
     
    281282_HAVE_CHECK_STRUCT(HAVE_TM_GMTOFF "struct tm" tm_gmtoff time.h)
    282283_HAVE_CHECK_STRUCT(HAVE_TM_ZONE "struct tm" tm_zone time.h)
     284
     285# Check for int types
     286check_type_size("__int128_t" INT128_VALUE)
     287
     288if (HAVE_INT128_VALUE)
     289  SET_AND_EXPOSE_TO_BUILD(HAVE_INT128_T INT128_VALUE)
     290endif ()
Note: See TracChangeset for help on using the changeset viewer.