From c2ff9af2eb8d372af3f6cf8fc2953dc90f9ead78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 10 Jun 2016 19:11:14 +0200 Subject: erts: Fix undefined shift to msb in monotonic time --- erts/emulator/sys/unix/erl_unix_sys.h | 2 +- erts/emulator/sys/win32/erl_win_sys.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'erts/emulator') diff --git a/erts/emulator/sys/unix/erl_unix_sys.h b/erts/emulator/sys/unix/erl_unix_sys.h index 241540b894..3a0d23cd36 100644 --- a/erts/emulator/sys/unix/erl_unix_sys.h +++ b/erts/emulator/sys/unix/erl_unix_sys.h @@ -163,7 +163,7 @@ typedef long long ErtsSysHrTime; typedef ErtsMonotonicTime ErtsSystemTime; typedef ErtsSysHrTime ErtsSysPerfCounter; -#define ERTS_MONOTONIC_TIME_MIN (((ErtsMonotonicTime) 1) << 63) +#define ERTS_MONOTONIC_TIME_MIN ((ErtsMonotonicTime) (1ULL << 63)) #define ERTS_MONOTONIC_TIME_MAX (~ERTS_MONOTONIC_TIME_MIN) /* diff --git a/erts/emulator/sys/win32/erl_win_sys.h b/erts/emulator/sys/win32/erl_win_sys.h index 7bdfac168b..04fbf23109 100644 --- a/erts/emulator/sys/win32/erl_win_sys.h +++ b/erts/emulator/sys/win32/erl_win_sys.h @@ -187,7 +187,7 @@ typedef ErtsMonotonicTime ErtsSysPerfCounter; ErtsSystemTime erts_os_system_time(void); -#define ERTS_MONOTONIC_TIME_MIN (((ErtsMonotonicTime) 1) << 63) +#define ERTS_MONOTONIC_TIME_MIN ((ErtsMonotonicTime) (1ULL << 63)) #define ERTS_MONOTONIC_TIME_MAX (~ERTS_MONOTONIC_TIME_MIN) #define ERTS_HAVE_OS_MONOTONIC_TIME_SUPPORT 1 -- cgit v1.2.3