As noticed by Stephan, clang on Mac is nowhere near to support thread_local for
some reason:
http://stackoverflow.com/questions/
28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports
It does not look realistic to me to provide a configure-based alternative. The
solution is to not use thread_local until it is reasonably supported on
Mac. According to sources, this means requiring Xcode >= 8.
This reverts commit
82d4f1a446260333ef1590f3622196e7c76e414d partially.
bool FontLoader::available(FontInfo const & f)
{
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
- static vector<bool> cache_set(NUM_FAMILIES, false);
- static vector<bool> cache(NUM_FAMILIES, false);
-#else
- thread_local vector<bool> cache_set(NUM_FAMILIES, false);
- thread_local vector<bool> cache(NUM_FAMILIES, false);
-#endif
+ // FIXME THREAD
+ static vector<int> cache_set(NUM_FAMILIES, false);
+ static vector<int> cache(NUM_FAMILIES, false);
FontFamily family = f.family();
#ifdef Q_OS_MAC
return;
// double the size if needed
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
+ // FIXME THREAD
static QVector<QPoint> points(32);
-#else
- thread_local QVector<QPoint> points(32);
-#endif
if (np > points.size())
points.resize(2 * np);
QString getBlock(char_type c)
{
// store an educated guess for the next search
-#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
+ // FIXME THREAD
static int lastBlock = 0;
-#else
- thread_local int lastBlock = 0;
-#endif
// "clever reset"
if (c < 0x7f)