Bug 54168 - Move WTF_USE_CFNETWORK to Platform.h
Summary: Move WTF_USE_CFNETWORK to Platform.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Pratik Solanki
URL:
Keywords:
Depends on:
Blocks: 51836
  Show dependency treegraph
 
Reported: 2011-02-09 22:29 PST by Pratik Solanki
Modified: 2011-02-15 15:02 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.07 KB, patch)
2011-02-09 22:38 PST, Pratik Solanki
no flags Details | Formatted Diff | Diff
Patch (2.88 KB, patch)
2011-02-15 14:35 PST, Pratik Solanki
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2011-02-09 22:29:05 PST
WTF_USE_CFNETWORK is defined in WebCore/config.h. It should be defined in Platform.h which will make it easier to have #if USE(CFNETWORK) blocks in WebKit.
Comment 1 Pratik Solanki 2011-02-09 22:38:08 PST
Created attachment 81925 [details]
Patch

Patch attached. Though I will wait for the Windows EWS to build it before checking it in.
Comment 2 David Kilzer (:ddkilzer) 2011-02-15 14:13:58 PST
Comment on attachment 81925 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=81925&action=review

r=me with the fix to provide a default for WTF_USE_CFNETWORK.

> Source/JavaScriptCore/wtf/Platform.h:684
> +#define WTF_USE_CFNETWORK 1

You need to add a section closer to the end of Platform.h that provides a default:

#if !defined(WTF_USE_CFNETWORK)
#define WTF_USE_CFNETWORK 0
#endif

You might want to move it close to this line just for proximity's sake:

/* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
#define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
Comment 3 Pratik Solanki 2011-02-15 14:35:04 PST
Created attachment 82520 [details]
Patch
Comment 4 Darin Adler 2011-02-15 14:35:42 PST
Comment on attachment 81925 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=81925&action=review

>> Source/JavaScriptCore/wtf/Platform.h:684
>> +#define WTF_USE_CFNETWORK 1
> 
> You need to add a section closer to the end of Platform.h that provides a default:
> 
> #if !defined(WTF_USE_CFNETWORK)
> #define WTF_USE_CFNETWORK 0
> #endif
> 
> You might want to move it close to this line just for proximity's sake:
> 
> /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
> #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK

I don’t think that’s right about needing a default. The USE macro checks for a symbol that’s not defined, so why would we need to define it as 0?
Comment 5 Darin Adler 2011-02-15 14:36:09 PST
Comment on attachment 82520 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=82520&action=review

> Source/JavaScriptCore/wtf/Platform.h:1136
> +#if !defined(WTF_USE_CFNETWORK)
> +#define WTF_USE_CFNETWORK 0
> +#endif

I know Dave Kilzer told you this is needed, but I don’t think it is.
Comment 6 David Kilzer (:ddkilzer) 2011-02-15 14:38:41 PST
(In reply to comment #5)
> (From update of attachment 82520 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82520&action=review
> 
> > Source/JavaScriptCore/wtf/Platform.h:1136
> > +#if !defined(WTF_USE_CFNETWORK)
> > +#define WTF_USE_CFNETWORK 0
> > +#endif
> 
> I know Dave Kilzer told you this is needed, but I don’t think it is.

I see, we only need this when the default is to enable.  Okay.
Comment 7 Pratik Solanki 2011-02-15 15:02:25 PST
Committed r78622: <http://trac.webkit.org/changeset/78622>