Bug 77809 - Use the wide character version of win32 API by default
: Use the wide character version of win32 API by default
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebKit Gtk
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-04 03:33 PST by Kalev Lember
Modified: 2012-02-04 14:24 PST (History)
1 user (show)

See Also:


Attachments
[GTK] Use the wide character version of win32 API by default (1.68 KB, patch)
2012-02-04 03:37 PST, Kalev Lember
no flags Details | Formatted Diff | Diff

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