From 5aa63ec6aafcec26deab9f9fa3e1fc2f7ad80ba9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 1 Apr 2010 21:27:00 +0200 Subject: Fix compilation on solaris-g++: ctype functions are sometimes macros At least with g++ 3.4 on Solaris, they are. So you can't write ::isalpha because that expands to something invalid. Reviewed-by: Trust Me --- tools/linguist/linguist/mainwindow.cpp | 2 +- tools/linguist/shared/po.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp index 7d73596..1611699 100644 --- a/tools/linguist/linguist/mainwindow.cpp +++ b/tools/linguist/linguist/mainwindow.cpp @@ -2392,7 +2392,7 @@ static bool haveMnemonic(const QString &str) // because we get a lot of false positives. if (c != '&' && c != ' ' && QChar(c).isPrint()) { const ushort *pp = p; - for (; *p < 256 && ::isalpha(*p); p++) ; + for (; *p < 256 && isalpha(*p); p++) ; if (pp == p || *p != ';') return true; // This looks like a HTML &entity;, so ignore it. As a HTML string diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 097b4bf..99a8751 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -235,7 +235,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, const QByteArray &line = lines.at(l); if (line.isEmpty() || !line.startsWith(prefix)) break; - while (::isspace(line[offset])) // No length check, as string has no trailing spaces. + while (isspace(line[offset])) // No length check, as string has no trailing spaces. offset++; if (line[offset] != '"') break; @@ -247,7 +247,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, if (c == '"') { if (offset == line.length()) break; - while (::isspace(line[offset])) + while (isspace(line[offset])) offset++; if (line[offset++] != '"') { cd.appendError(QString::fromLatin1( @@ -305,7 +305,7 @@ static QByteArray slurpEscapedString(const QList &lines, int &l, break; case 'x': stoff = offset; - while (::isxdigit(line[offset])) + while (isxdigit(line[offset])) if (++offset == line.length()) goto premature_eol; msg += line.mid(stoff, offset - stoff).toUInt(0, 16); -- cgit v0.12