Bug 182679

Summary: [WinCairo] Fix build errors which come from including headers and not suitable implementation for windows
Product: WebKit Reporter: Yousuke Kimoto <Yousuke.Kimoto>
Component: WebKit2Assignee: Yousuke Kimoto <Yousuke.Kimoto>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cgarcia, commit-queue, don.olmstead, ews-watchlist, mcatanzaro, ross.kirsling, ryanhaddad, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=182797
https://bugs.webkit.org/show_bug.cgi?id=182810
Bug Depends on: 182681    
Bug Blocks: 174003    
Attachments:
Description Flags
bz182679-1.patch
none
bz182679-2.patch
none
Patch
none
Patch none

Description Yousuke Kimoto 2018-02-11 20:25:22 PST
For WinCairo WebKit build, some build errors which come from including headers must be fixed.
Those headers are not supported by the Windows SDK.
Comment 1 Yousuke Kimoto 2018-02-11 20:31:28 PST
Created attachment 333576 [details]
bz182679-1.patch
Comment 2 Yousuke Kimoto 2018-02-11 21:24:34 PST
A patch for bug 182681 is required before landing this patch.
Comment 3 Yousuke Kimoto 2018-02-13 04:56:51 PST
Created attachment 333682 [details]
bz182679-2.patch
Comment 4 Ross Kirsling 2018-02-13 13:05:26 PST
Created attachment 333716 [details]
Patch
Comment 5 Ross Kirsling 2018-02-13 13:08:44 PST
Comment on attachment 333716 [details]
Patch

Fixed the #include guard in WKBase.h.

Seems like something other than the C preprocessor is running over this file, so even `#if 0` doesn't remove anything. #elifs did the trick though.
Comment 6 Michael Catanzaro 2018-02-13 16:31:57 PST
Comment on attachment 333716 [details]
Patch

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

> Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:37
> +#if !OS(WINDOWS)
>  #include <sys/mman.h>
>  #include <sys/stat.h>
>  #include <unistd.h>
> +#endif

Style: please move these down beneath the other #includes, and leave one blank like before #if !OS(WINDOWS). You got it right *almost* everywhere else.

> Source/WebKit/WebProcess/WebProcess.cpp:122
> +#if !OS(WINDOWS)
>  #include <unistd.h>
> +#endif

Here too.
Comment 7 Ross Kirsling 2018-02-13 16:46:37 PST
Created attachment 333744 [details]
Patch
Comment 8 Michael Catanzaro 2018-02-13 21:00:03 PST
Comment on attachment 333744 [details]
Patch

OK. Since there are no changes to the cross-platform code, I don't think this needs an owner. Consider adding FIXMEs for the stuff you've disabled in NetworkCache.
Comment 9 WebKit Commit Bot 2018-02-13 22:01:42 PST
Comment on attachment 333744 [details]
Patch

Clearing flags on attachment: 333744

Committed r228455: <https://trac.webkit.org/changeset/228455>
Comment 10 WebKit Commit Bot 2018-02-13 22:01:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-02-13 22:02:16 PST
<rdar://problem/37525619>
Comment 12 John Wilander 2018-02-14 10:47:54 PST
This causes an iOS build failure for me when building with -Wunused-lambda-capture:

Sources/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:911:79: error: lambda capture 'maximumParallelReadCount' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
            traverseOperation.activeCondition.wait(lock, [&traverseOperation, maximumParallelReadCount] {
                                                                              ^
1 error generated.

I will get a patch up removing this capture.
Comment 13 John Wilander 2018-02-14 11:13:48 PST
Build fix patch: https://bugs.webkit.org/show_bug.cgi?id=182797

BTW, this should not have been landed as an unreviewed WinCairo fix when it changed platform independent code.
Comment 14 Ryan Haddad 2018-02-14 11:30:36 PST
(In reply to John Wilander from comment #13)
> BTW, this should not have been landed as an unreviewed WinCairo fix when it
> changed platform independent code.

The change was reviewed by Michael. It is reflected in the changelog and commit message for https://trac.webkit.org/changeset/228455/webkit
Comment 15 John Wilander 2018-02-14 11:32:16 PST
(In reply to Ryan Haddad from comment #14)
> (In reply to John Wilander from comment #13)
> > BTW, this should not have been landed as an unreviewed WinCairo fix when it
> > changed platform independent code.
> 
> The change was reviewed by Michael. It is reflected in the changelog and
> commit message for https://trac.webkit.org/changeset/228455/webkit

Got it. I was looking at the patch.
Comment 16 Michael Catanzaro 2018-02-14 12:04:16 PST
Eh, actually I should not have approved it because I'm not an owner. I just missed that that line was changed outside the #if. Sorry.
Comment 17 Ross Kirsling 2018-02-14 14:51:27 PST
An even more trivial follow-up fix (which I probably should've noticed while helping get this patch landed):
https://bugs.webkit.org/show_bug.cgi?id=182810