[webkit-dev] Potential patch for building webkit on Visual Studio 2010

Adam Roben aroben at apple.com
Wed Dec 15 08:38:46 PST 2010


On Dec 14, 2010, at 8:24 PM, Jake wrote:

> 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.

It would be great to move this discussion to bugs.webkit.org, even if you aren't sure of the exact correct approach yet. Please file a bug there and attach your patch so that contributors can discuss it.

-Adam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101215/c4a7c145/attachment.html>


More information about the webkit-dev mailing list