Sources/WTF/config.h already disables it:

// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
// Also generates errors on wx on Windows and QNX, because these functions
// are used from wx and QNX headers.
#if !PLATFORM(QT) && !PLATFORM(WX) && !OS(QNX)
#include <wtf/DisallowCType.h>
#endif

I don't think there is a better solution than disabling it for all modules. Your compile error seems to be the result of not having it disabled in Sources/WebKit2/config.h. Hope that helps.

On 06/08/2012 01:05 PM, Milian Wolff wrote:
Hey all,

I'm currently trying to patch (Qt-)WebKit in order to build it for QNX. Now
I'm running into an issue which I wonder how to address properly. Most *.cpp
files start with the following lines in WebKit:

// file foo.cpp:
#include "config.h"
#include "foo.h"

Now, this might trigger the inclusion of system headers from QNX eventually.
If these contain stuff like e.g.:

                // FUNCTION _Tolower
inline int _Tolower(int _Byte, const _Ctypevec *)
        {       // perform locale-specific tolower
        return (_CSTD tolower(_Byte&  0xff));
        }

you get a compile time error:
'tolower_WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h'
is not a member of 'std'

I see how this is useful for WebKit code, but it should not be triggered for
system includes or third-party includes, should it? Does anyone have an idea
on how I could solve this?

For now I'll work-around this issue by disabling DisallowCType.h on QNX, but I
whether anyone has a better idea.

Cheers

PS: Here's a full error trace that shows how we end up at the function
_Tolower I quoted above:

~~~~~~~~~~~~~~~~
In file included from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/xlocale:12,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/xiosbase:7,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/streambuf:7,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/xlocnum:10,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/ios:7,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/ostream:7,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/istream:7,
                  from
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/string:7,
                  from /home/milian/projects/qt5/install-
playbook/include/QtCore/qstring.h:50,
                  from /home/milian/projects/qt5/install-
playbook/include/QtCore/qobject.h:48,
                  from /home/milian/projects/qt5/install-
playbook/include/QtCore/qiodevice.h:46,
                  from /home/milian/projects/qt5/install-
playbook/include/QtCore/qdatastream.h:46,
                  from /home/milian/projects/qt5/install-
playbook/include/QtCore/QDataStream:1,
                  from
/home/milian/projects/qt5/qtwebkit/Source/WTF/wtf/Vector.h:35,
                  from
/home/milian/projects/qt5/qtwebkit/Source/WTF/wtf/Deque.h:37,
                  from
/home/milian/projects/qt5/qtwebkit/Source/WebKit2/Platform/CoreIPC/ArgumentDecoder.h:31,
                  from
/home/milian/projects/qt5/qtwebkit/Source/WebKit2/Platform/CoreIPC/Attachment.cpp:29:
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/xlocinfo: In function
'int std::_Tolower(int, const std::_Ctypevec*)':
/home/milian/bbndk-2.0.1/target/qnx6/usr/include/cpp/xlocinfo:173: error:
'tolower_WTF_Please_use_ASCIICType_instead_of_ctype_see_comment_in_ASCIICType_h'
is not a member of 'std'
~~~~~~~~~~~~~~~~



_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to