Bug 182679 - [WinCairo] Fix build errors which come from including headers and not suitable implementation for windows
Summary: [WinCairo] Fix build errors which come from including headers and not suitabl...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yousuke Kimoto
URL:
Keywords: InRadar
Depends on: 182681
Blocks: 174003
  Show dependency treegraph
 
Reported: 2018-02-11 20:25 PST by Yousuke Kimoto
Modified: 2018-02-14 17:43 PST (History)
10 users (show)

See Also:


Attachments
bz182679-1.patch (12.95 KB, patch)
2018-02-11 20:31 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff
bz182679-2.patch (13.21 KB, patch)
2018-02-13 04:56 PST, Yousuke Kimoto
no flags Details | Formatted Diff | Diff
Patch (14.47 KB, patch)
2018-02-13 13:05 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (14.69 KB, patch)
2018-02-13 16:46 PST, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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