diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2018-03-16 10:57:47 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2018-03-17 16:03:38 +0000 |
commit | 63c7a8e7257678a172ba1e8247662a36e361d1ed (patch) | |
tree | bbd8d23b787f7ffd7727f5e72b7b14069a20d092 /src/corelib/global/qglobal.h | |
parent | 8aeed99d77b8876d42e19be7123142e5fe2d2a78 (diff) |
qglobal.h: compile Q_UINT64_C in C mode
This is used by qfloat_f16c.c → qsimd_p.h → qsimd_x86_p.h.
Change-Id: I359898686ce545f69847fffd151c785237a54b94
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 5 |
1 files changed, 5 insertions, 0 deletions
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<long long>(c ## LL) /* signed 64 bit constant */ # define Q_UINT64_C(c) static_cast<unsigned long long>(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 |