Bug 77809

Summary: Use the wide character version of win32 API by default
Product: WebKit Reporter: Kalev Lember <kalevlember>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
[GTK] Use the wide character version of win32 API by default none

Description Kalev Lember 2012-02-04 03:33:42 PST
Some win32 specific code makes the assumption that the build system is turning on the wide character win32 API. For example, PluginDatabaseWin.cpp uses wchar_t* as an argument to PathRemoveFileSpec(). Depending on whether _UNICODE and UNICODE are defined by the build system, it resolves to either PathRemoveFileSpecA(char *) or PathRemoveFileSpecW(wchar_t *). Now, since PluginDatabaseWin.cpp uses wchar_t* there, the A() version of the API can't work and we need to define _UNICODE and UNICODE to make it use the W() variant.

PluginDatabaseWin.cpp:397:50: error: cannot convert 'WCHAR* {aka wchar_t*}' to 'LPSTR {aka char*}' for argument '1' to 'BOOL PathRemoveFileSpecA(LPSTR)'
Comment 1 Kalev Lember 2012-02-04 03:37:46 PST
Created attachment 125491 [details]
[GTK] Use the wide character version of win32 API by default

[GTK] Use the wide character version of win32 API by default
https://bugs.webkit.org/show_bug.cgi?id=77809

Reviewed by NOBODY (OOPS!).

Certain win32-specific files (like PluginDatabaseWin.cpp) make the
assumption that the wide character version of win32 API is the default.
Define _UNICODE and UNICODE to do this, similar to what other win32
ports are doing.

* GNUmakefile.am:
Comment 2 WebKit Review Bot 2012-02-04 14:24:17 PST
Comment on attachment 125491 [details]
[GTK] Use the wide character version of win32 API by default

Clearing flags on attachment: 125491

Committed r106742: <http://trac.webkit.org/changeset/106742>
Comment 3 WebKit Review Bot 2012-02-04 14:24:21 PST
All reviewed patches have been landed.  Closing bug.