Bug 29535 - [Qt] Buildfix on Windows building with MSVC
Summary: [Qt] Buildfix on Windows building with MSVC
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Blocker
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2009-09-21 00:18 PDT by Csaba Osztrogonác
Modified: 2009-09-21 08:50 PDT (History)
1 user (show)

See Also:


Attachments
proposed patch (924 bytes, patch)
2009-09-21 00:20 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff
proposed patch (948 bytes, patch)
2009-09-21 07:54 PDT, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2009-09-21 00:18:59 PDT
The error message:
..\..\..\JavaScriptCore\wtf/Vector.h(276) : warning C4003: not enough actual parameters for macro 'max'
t:\webkit_git\javascriptcore\wtf\HashTraits.h(72) : warning C4003: not enough actual parameters for macro 'max'
t:\webkit_git\javascriptcore\wtf\HashTraits.h(73) : warning C4003: not enough actual parameters for macro 'max'
t:\webkit_git\javascriptcore\wtf\HashTraits.h(74) : warning C4003: not enough actual parameters for macro 'max'
..\..\..\JavaScriptCore\runtime/UString.h(93) : warning C4003: not enough actual parameters for macro 'max'
..\..\..\JavaScriptCore\runtime/UString.h(93) : error C2589: '(' : illegal token on right side of '::'
..\..\..\JavaScriptCore\runtime/UString.h(93) : error C2059: syntax error : '::'
..\..\..\JavaScriptCore\runtime/UString.h(93) : error C2143: syntax error : missing ';' before '{'
..\..\..\JavaScriptCore\jit\ExecutableAllocator.h(60) : warning C4003: not enough actual parameters for macro 'max'
..\..\..\JavaScriptCore\jit\ExecutableAllocator.h(60) : error C2589: '(' : illegal token on right side of '::'
..\..\..\JavaScriptCore\jit\ExecutableAllocator.h(60) : error C2059: syntax error : '::'
..\..\..\JavaScriptCore\jit\ExecutableAllocator.h(61) : error C2143: syntax error : missing ';' before '{' QNetworkReplyHandler.cpp

Build error caused by define max(a,b) in a standard windows header (WinDef.h). Here max function must be used instead of max macro, accordingly max macro shouldn't be defined here. ( std::numeric_limits<T>::max() , ... )
Comment 1 Csaba Osztrogonác 2009-09-21 00:20:51 PDT
Created attachment 39841 [details]
proposed patch
Comment 2 Csaba Osztrogonác 2009-09-21 07:54:52 PDT
Created attachment 39851 [details]
proposed patch

Simon Hausmann pointed to missing include config.h .
I tried it, and works correctly. Here is the simpler patch.
Comment 3 Zoltan Horvath 2009-09-21 08:50:20 PDT
Landed in http://trac.webkit.org/changeset/48583