[webkit-dev] Potential patch for building webkit on Visual Studio 2010
Jake
jake at jakeonthenet.com
Tue Dec 14 17:24:58 PST 2010
Hello,
I've made some changes to the webkit trunk that allows me to build webkit
(more specifically QtWebkit) with Visual Studio 2010. I had to make several
changes to handle the ambiguous operator = error from NullPtr.h.
To get the build to work I made two primary changes:
First, NullPtr.h
#ifndef NullPtr_h
#define NullPtr_h
// For compilers and standard libraries that do not yet include it, this
adds the
// nullptr_t type and nullptr object. They are defined in the same
namespaces they
// would be in compiler and library that had the support.
#if !defined(_MSC_VER)
#ifndef __has_feature
#define __has_feature(feature) 0
#endif
#if !__has_feature(cxx_nullptr)
namespace std {
class nullptr_t { };
}
extern std::nullptr_t nullptr;
#endif
#elseif _MSC_VER < 1600
//to maintain compatibility with previous versions of msvc
#ifndef nullptr
#define nullptr 0
#endif
#endif //_MSC_VER
#endif
And secondly I changed all = 0 errors to = nullptr (approximately 450
instances).
My question is, does this look like a sound approach? If so, I'll submit a
patch.
Thanks,
-Jake Helfert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101214/31b3b5d3/attachment.html>
More information about the webkit-dev
mailing list