Bug 162262 - [Win] Compile fix.
Summary: [Win] Compile fix.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-20 03:09 PDT by Per Arne Vollan
Modified: 2016-09-29 08:49 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.63 KB, patch)
2016-09-20 03:15 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (1.16 KB, patch)
2016-09-29 01:57 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2016-09-20 03:09:03 PDT
If the CoreText headers already has defined 'kCTFontTableOptionNoOptions', I get the following compile error:

Source\WebCore\platform\spi\win\CoreTextSPIWin.h(44): error C2365: 'kCTFontTableOptionNoOptions': redefinition; previous definition was 'enumerator' (compiling source file Source\WebCore\platform\graphics\ca\PlatformCALayer.cpp)
include\CoreText/CTFont.h(1285): note: see declaration of 'kCTFontTableOptionNoOptions' (compiling source file Source\WebCore\platform\graphics\ca\PlatformCALayer.cpp)
Comment 1 Per Arne Vollan 2016-09-20 03:15:24 PDT
Created attachment 289339 [details]
Patch
Comment 2 Brent Fulgham 2016-09-20 07:04:50 PDT
Comment on attachment 289339 [details]
Patch

This doesn't seem to work. Usually the compiler is happy if we typedef in multiple places as long as they are the same. Maybe expanding the CF_OPTIONS macro manually would work.
Comment 3 Brent Fulgham 2016-09-20 09:14:49 PDT
Comment on attachment 289339 [details]
Patch

Usually we don't have a problem as long as the typdef's match. It might be that expanding the CF_OPTIONS macro manually would make the compiler happy?

At any rate, this code change doesn't seem to work on the build machines.
Comment 4 Myles C. Maxfield 2016-09-26 14:58:54 PDT
This error doesn't make any sense. What does "previous definition was 'enumerator' mean? Where is 'enumerator'?

I don't see the symbol defined twice inside WebKit sources...
Comment 5 Per Arne Vollan 2016-09-29 01:57:58 PDT
Created attachment 290190 [details]
Patch
Comment 6 Per Arne Vollan 2016-09-29 02:03:32 PDT
Thanks for reviewing :)

The symbol is not defined twice in WebKit, but when compiling with some older SDK versions, the symbol is included when including <CoreText/CoreText.h>.
Comment 7 WebKit Commit Bot 2016-09-29 08:49:22 PDT
Comment on attachment 290190 [details]
Patch

Clearing flags on attachment: 290190

Committed r206584: <http://trac.webkit.org/changeset/206584>
Comment 8 WebKit Commit Bot 2016-09-29 08:49:26 PDT
All reviewed patches have been landed.  Closing bug.