Bug 3826

Summary: GW: Add defs to KWQDefs
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Eric Seidel (no email) <eric>
Status: RESOLVED FIXED    
Severity: Enhancement    
Priority: P4    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on:    
Bug Blocks: 3250    
Attachments:
Description Flags
Adds a few defs to KWQDefs
mjs: review-
fixes mjs's concerns
ggaren: review-
patch to fix failed build
none
patch that builds w/gcc 3.3 mjs: review+

Description Eric Seidel (no email) 2005-07-02 20:34:26 PDT
These defs are necessary for compiling kdom, and other products on top of KWQ.
Comment 1 Eric Seidel (no email) 2005-07-02 20:36:02 PDT
Created attachment 2765 [details]
Adds a few defs to KWQDefs

This patch also removes the Q_UNUSED(a) hack, or at least changes the
implementation thereof.  The previous implementation did not work with unused
"const" arguments.   At least not under GCC 4.0
Comment 2 Maciej Stachowiak 2005-07-03 00:36:31 PDT
Comment on attachment 2765 [details]
Adds a few defs to KWQDefs

> +typedef __int64_t Q_INT64;
> +typedef __uint64_t Q_UINT64;

Suggest using int64_t and uint_64_t with no underscores instead.

Regarding QMAX/QMIN and KMAX/KMIN, I think it would be better to port the
relevant code to kMax kMin, since that's the direction KHTML went, but failing
that, at least use the typesafe version for QMAX/QMIN.

> +#define qRound(a) lround(a)

Suggest an inline function instead of a macro.
Comment 3 Eric Seidel (no email) 2005-07-04 01:14:34 PDT
Created attachment 2783 [details]
fixes mjs's concerns
Comment 4 Maciej Stachowiak 2005-07-04 18:11:36 PDT
Comment on attachment 2783 [details]
fixes mjs's concerns

r=me
Comment 5 Geoffrey Garen 2005-07-05 11:17:48 PDT
Comment on attachment 2783 [details]
fixes mjs's concerns

this patch fails to build
Comment 6 Geoffrey Garen 2005-07-05 11:20:36 PDT
Created attachment 2819 [details]
patch to fix failed build

This patch will build successfully
Comment 7 Eric Seidel (no email) 2005-07-05 11:26:49 PDT
Comment on attachment 2783 [details]
fixes mjs's concerns

ggaren, can I get a log message, or a reason?  This patch builds for me just
fine.  I'm using gcc 4.0
Comment 8 Eric Seidel (no email) 2005-07-05 11:38:45 PDT
The build failure was only on 3.3 (which Apple internal is the only one left using).
Comment 9 Geoffrey Garen 2005-07-05 13:38:58 PDT
Created attachment 2821 [details]
patch that builds w/gcc 3.3

This version of the patch builds successfully w/gcc 3.3
Comment 10 Maciej Stachowiak 2005-07-05 18:58:46 PDT
Comment on attachment 2821 [details]
patch that builds w/gcc 3.3

r=me