Description: Change Q_OS_LINUX ifdefs to __GLIBC__
 There are a number of #ifdef clauses in the sources that are checking
 for Linux.  This means arches such as kFreeBSD fail.  The correct check
 is for __GLIBC__
Bug-Debian: http://bugs.debian.org/644592
Author: Craig Small <csmall@debian.org>
Last-Update: 2017-06-08
--- a/src/TConsole.cpp
+++ b/src/TConsole.cpp
@@ -1002,7 +1002,7 @@
     }
     else if( mIsSubConsole )
     {
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         mDisplayFont.setStyleStrategy( (QFont::StyleStrategy)(QFont::NoAntialias | QFont::PreferQuality ) );
         QPixmap pixmap = QPixmap( 2000, 600 );
         QPainter p(&pixmap);
@@ -1047,7 +1047,7 @@
             mpHost->mDisplayFont.setStyleStrategy( (QFont::StyleStrategy)( QFont::PreferAntialias | QFont::PreferQuality ) );
         mpHost->mDisplayFont.setFixedPitch(true);
         mDisplayFont.setFixedPitch(true);
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         QPixmap pixmap = QPixmap( 2000, 600 );
         QPainter p(&pixmap);
         QFont _font = mpHost->mDisplayFont;
--- a/src/TTextEdit.cpp
+++ b/src/TTextEdit.cpp
@@ -76,7 +76,7 @@
         }
 
         mpHost->mDisplayFont.setFixedPitch(true);
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         QPixmap pixmap = QPixmap( mScreenWidth*mFontWidth*2, mFontHeight*2 );
         QPainter p(&pixmap);
         p.setFont(mpHost->mDisplayFont);
@@ -96,7 +96,7 @@
         mFontWidth = QFontMetrics( mDisplayFont ).width( QChar('W') );
         mScreenWidth = 100;
         mDisplayFont.setFixedPitch(true);
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         QPixmap pixmap = QPixmap( mScreenWidth*mFontWidth*2, mFontHeight*2 );
         QPainter p(&pixmap);
         p.setFont(mDisplayFont);
@@ -196,7 +196,7 @@
     mFgColor = QColor(192,192,192);
     mBgColor = QColor(Qt::black);
     mDisplayFont = QFont("Bitstream Vera Sans Mono", 10, QFont::Normal);
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         int width = mScreenWidth*mFontWidth*2;
         int height = mFontHeight*2;
         // sometimes mScreenWidth is 0, and QPainter doesn't like dimensions of 0x#. Need to work out why is
@@ -230,7 +230,7 @@
         mFontDescent = QFontMetrics( mDisplayFont ).descent();
         mFontAscent = QFontMetrics( mDisplayFont ).ascent();
         mFontHeight = mFontAscent + mFontDescent;
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         QPixmap pixmap = QPixmap( 2000,600 );
         QPainter p(&pixmap);
         mDisplayFont.setLetterSpacing(QFont::AbsoluteSpacing, 0);
@@ -253,7 +253,7 @@
         mFontHeight = mFontAscent + mFontDescent;
         mBgColor = mpHost->mBgColor;
         mFgColor = mpHost->mFgColor;
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         QPixmap pixmap = QPixmap( mScreenWidth*mFontWidth*2, mFontHeight*2 );
         QPainter p(&pixmap);
         mpHost->mDisplayFont.setLetterSpacing(QFont::AbsoluteSpacing, 0);
@@ -275,7 +275,7 @@
         mFontDescent = QFontMetrics( mDisplayFont ).descent();
         mFontAscent = QFontMetrics( mDisplayFont ).ascent();
         mFontHeight = mFontAscent + mFontDescent;
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         int width = mScreenWidth*mFontWidth*2;
         int height = mFontHeight*2;
         // sometimes mScreenWidth is 0, and QPainter doesn't like dimensions of 0x#. Need to work out why is
@@ -459,7 +459,7 @@
         font.setUnderline( isUnderline );
         font.setItalic( isItalics );
         font.setStrikeOut( isStrikeOut );
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
         font.setLetterSpacing(QFont::AbsoluteSpacing, mLetterSpacing);
 #endif
         painter.setFont( font );
@@ -468,7 +468,7 @@
     {
         painter.setPen( fgColor );
     }
-#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
+#if defined(Q_OS_MAC) || defined(__GLIBC__)
     QPointF _p(rect.x(), rect.bottom()-mFontDescent);
     painter.drawText( _p, text );
 #else
--- a/src/TCommandLine.cpp
+++ b/src/TCommandLine.cpp
@@ -49,7 +49,7 @@
 , mpHunspellSuggestionList()
 {
     QString path;
-#ifdef Q_OS_LINUX
+#ifdef __GLIBC__
     if (QFile::exists("/usr/share/hunspell/" + pHost->mSpellDic + ".aff"))
         path = "/usr/share/hunspell/";
     else
--- a/src/dlgProfilePreferences.cpp
+++ b/src/dlgProfilePreferences.cpp
@@ -80,7 +80,7 @@
     checkBox_showLineFeedsAndParagraphs->setChecked(mudlet::self()->mEditorTextOptions & QTextOption::ShowLineAndParagraphSeparators);
 
     QString path;
-#ifdef Q_OS_LINUX
+#ifdef __GLIBC__
     if (QFile::exists("/usr/share/hunspell/" + mpHost->mSpellDic + ".aff"))
         path = "/usr/share/hunspell/";
     else
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -73,21 +73,21 @@
 
 // A crude and simplistic commandline options processor - note that Qt deals
 // with its options automagically!
-#if !(defined(Q_OS_LINUX) || defined(Q_OS_WIN32) || defined(Q_OS_MAC))
+#if !(defined(__GLIBC__) || defined(Q_OS_WIN32) || defined(Q_OS_MAC))
     // Handle other currently unconsidered OSs - what are they - by returning the
     // normal GUI type application handle.
     return new QApplication(argc, argv);
 #endif
 
     for (int i = 1; i < argc; ++i) {
-#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
+#if defined(__GLIBC__) || defined(Q_OS_MAC)
         if (qstrcmp(argv[i], "--") == 0)
             break; // Bail out on end of option type arguments
 #endif
 
         char argument = 0;
         bool isOption = false;
-#if defined(Q_OS_LINUX) || defined(Q_OS_MAC)
+#if defined(__GLIBC__) || defined(Q_OS_MAC)
         if (strlen(argv[i]) > 2 && strncmp(argv[i], "--", 2) == 0) {
             argument = argv[i][2];
             isOption = true;
@@ -212,7 +212,7 @@
             std::cout << "                       " << OPT_PREFIX << "dograb wins over " << OPT_PREFIX << "nograb even when" << std::endl;
             std::cout << "                       " << OPT_PREFIX << "nograb is last on the command line." << std::endl;
             std::cout << "       " << OPT_PREFIX << "nograb         the application should never grab the mouse or the" << std::endl;
-#if defined(Q_OS_LINUX)
+#if defined(__GLIBC__)
             std::cout << "                       keyboard. This option is set by default when Mudlet is" << std::endl;
             std::cout << "                       running in the gdb debugger under Linux." << std::endl;
 #else
