Fix compilation with MinGW.
Change-Id: I494c84e8e6889a7d7bb3b29669337483732d02c2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
538386f36f
commit
4bdb7a0780
@ -169,7 +169,7 @@ static uint qt_create_qhash_seed()
|
||||
}
|
||||
#endif // Q_OS_UNIX
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#if defined(Q_OS_WIN32) && !defined(Q_CC_GNU)
|
||||
errno_t err;
|
||||
err = rand_s(&seed);
|
||||
if (err == 0)
|
||||
|
@ -47,7 +47,9 @@
|
||||
# if defined(Q_OS_WINCE)
|
||||
# include <qt_windows.h>
|
||||
# endif
|
||||
# include <intrin.h>
|
||||
# if !defined(Q_CC_GNU)
|
||||
# include <intrin.h>
|
||||
# endif
|
||||
#elif defined(Q_OS_LINUX) && defined(__arm__)
|
||||
#include "private/qcore_unix_p.h"
|
||||
|
||||
@ -377,12 +379,16 @@ static const uint minFeature = None
|
||||
;
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if defined(Q_CC_GNU)
|
||||
# define ffs __builtin_ffs
|
||||
#else
|
||||
int ffs(int i)
|
||||
{
|
||||
unsigned long result;
|
||||
return _BitScanForward(&result, i) ? result : 0;
|
||||
}
|
||||
#endif
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
uint qDetectCPUFeatures()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user