Bug 17769

Summary: WebKit compilation fixes for HP/UX acc
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Change forward declarations used with RefPtr
none
Fix for scoping with broken compilers
darin: review-
Avoid the use of typename with aCC 6 darin: review-

Description Simon Hausmann 2008-03-11 08:40:59 PDT
The three attached patches make the Qt port of WebKit compile on HP/UX using aCC 6.
Comment 1 Simon Hausmann 2008-03-11 08:42:47 PDT
Created attachment 19665 [details]
Change forward declarations used with RefPtr
Comment 2 Simon Hausmann 2008-03-11 08:43:27 PDT
Created attachment 19666 [details]
Fix for scoping with broken compilers
Comment 3 Simon Hausmann 2008-03-11 08:43:57 PDT
Created attachment 19667 [details]
Avoid the use of typename with aCC 6
Comment 4 Darin Adler 2008-03-11 12:26:02 PDT
Comment on attachment 19665 [details]
Change forward declarations used with RefPtr

r=me
Comment 5 Darin Adler 2008-03-11 12:26:26 PDT
We're going to need a buildbot using HP/UX, or this will keep regressing over and over again.
Comment 6 Darin Adler 2008-03-11 12:30:34 PDT
Comment on attachment 19667 [details]
Avoid the use of typename with aCC 6

This is not correctly using include files. Definitions like this should not be in Platform.h.

What *should* go in Platform.h is a definition to let us use COMPILER() to identify the HP compiler.

The actual macro can either go in ListHashSet.h or a new header, but should not go in Platform.h.

Have you checked to see if you can leave typename out with the other compilers? Maybe this doesn't require a macro at all?

If it does require a macro, then I don't think WTF_TYPENAME is descriptive enough. It makes it sound like you have to use this everywhere, when really it's only for a few specific call sites. The name will probably need to mention HP specifically.
Comment 7 Darin Adler 2008-03-11 12:32:48 PDT
Comment on attachment 19666 [details]
Fix for scoping with broken compilers

This workaround does not belong in Platform.h. That file only defines macros to identify the platform, not workarounds for bugs or anything like that. It should not be commandeered for this new purpose.

+#if (defined(_MSC_VER) && _MSC_VER-0 < 1300 && !defined(__INTEL_COMPILER)) || defined(__sgi) || (defined(__HP_aCC) && defined(__ia64))

This is not how we do things with the Platform.h file. You should be using the COMPILER() macros defined in there and adding new ones as needed.

This should go in a new header file. There may be some clever way of including it in all the projects, but adding it to Platform.h is not right.
Comment 8 Darin Adler 2008-03-16 13:25:46 PDT
Comment on attachment 19665 [details]
Change forward declarations used with RefPtr

Committed revision 31082.
Comment 9 Darin Adler 2008-03-16 13:26:08 PDT
Comment on attachment 19665 [details]
Change forward declarations used with RefPtr

Cleared review flag since this was landed so it doesn't show up in the uncommitted queue.
Comment 10 Alexey Proskuryakov 2010-06-11 17:27:44 PDT
Marking as fixed, because something was landed here. Please open new bugs for other patches if they are still needed.