Bug 16720 - remove #ifdefs in header/source files and use them in include sites instead
Summary: remove #ifdefs in header/source files and use them in include sites instead
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-03 04:45 PST by Jan Alonzo
Modified: 2009-07-30 04:27 PDT (History)
4 users (show)

See Also:


Attachments
move feature guards out of header/source files (24.51 KB, patch)
2008-01-03 04:46 PST, Jan Alonzo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Alonzo 2008-01-03 04:45:29 PST
Hi! 

Attached is a patch to move the #if feature guards outside of the header (and some source) files. This patch is a followup based on the discussion that happened at [1].

This is a work in progress patch. Currently done are database, xpath, and xslt. Feel free to comment/suggest, if any.

Regards

[1] http://lists.webkit.org/pipermail/webkit-dev/2007-December/003062.html
Comment 1 Jan Alonzo 2008-01-03 04:46:24 PST
Created attachment 18250 [details]
move feature guards out of header/source files
Comment 2 Jan Alonzo 2008-01-03 05:13:25 PST
Btw, this doesn't suggest that there was a concensus as per the discussion at [1]. The attached patch makes the #if guards consistent with the rest because even if we maintain guards in the header files, afaik there are still some headers (e.g., some autogenerated headers) that need to be guarded in the include site. That is why i opt to just do that instead of making an exception for autogenerated header files.
Comment 3 David Kilzer (:ddkilzer) 2008-01-03 09:44:53 PST
This patch should also include an update (addition) to the coding style guidelines:

http://webkit.org/coding/coding-style.html

Comment 4 Jan Alonzo 2008-01-04 16:15:42 PST
ddkilzer, hi! Do you know if this require changes to the different build systems, esp mac and windows? Thanks.
Comment 5 David Kilzer (:ddkilzer) 2008-01-04 16:41:40 PST
(In reply to comment #4)
> ddkilzer, hi! Do you know if this require changes to the different build
> systems, esp mac and windows? Thanks.

No.  I'm pretty sure these changes will be platform-agnostic since they're all a matter of moving C-preprocessor definitions from source files to header files (or vice-versa, depending on which way we go).

Comment 6 Jan Alonzo 2009-07-30 04:27:38 PDT
This is invalid now as this isn't really how WebKit code is/should be organized.