From 63c7a8e7257678a172ba1e8247662a36e361d1ed Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 16 Mar 2018 10:57:47 -0700 Subject: qglobal.h: compile Q_UINT64_C in C mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is used by qfloat_f16c.c → qsimd_p.h → qsimd_x86_p.h. Change-Id: I359898686ce545f69847fffd151c785237a54b94 Reviewed-by: Allan Sandfeld Jensen --- src/corelib/global/qglobal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index cd4b4a29a9..33885021ba 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -242,8 +242,13 @@ typedef unsigned int quint32; /* 32 bit unsigned */ typedef __int64 qint64; /* 64 bit signed */ typedef unsigned __int64 quint64; /* 64 bit unsigned */ #else +#ifdef __cplusplus # define Q_INT64_C(c) static_cast(c ## LL) /* signed 64 bit constant */ # define Q_UINT64_C(c) static_cast(c ## ULL) /* unsigned 64 bit constant */ +#else +# define Q_INT64_C(c) ((long long)(c ## LL)) /* signed 64 bit constant */ +# define Q_UINT64_C(c) ((unsigned long long)(c ## ULL)) /* unsigned 64 bit constant */ +#endif typedef long long qint64; /* 64 bit signed */ typedef unsigned long long quint64; /* 64 bit unsigned */ #endif -- cgit v1.2.3