Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
clipboardwin compile error for win64
https://bugs.webkit.org/show_bug.cgi?id=94124

Patch by Alex Christensen <alex.christensen@flexsim.com> on 2012-11-26
Reviewed by Brent Fulgham.

The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
To resolve this issue, we specify the template type as the type the return value is being cast into

Fixed a few compile errors for Windows x64 by specifying template parameters.

* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
under 64-bit builds.


Canonical link: https://commits.webkit.org/121421@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@135763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Alex Christensen authored and Brent Fulgham committed Nov 26, 2012
1 parent 1034fe9 commit ee96317
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,20 @@
2012-11-26 Alex Christensen <alex.christensen@flexsim.com>

clipboardwin compile error for win64
https://bugs.webkit.org/show_bug.cgi?id=94124

Reviewed by Brent Fulgham.

The clipboard utilities code uses std::min with one unsigned int parameter and one size_t parameter.
This causes a problem when compiling for 64-bit Windows because the two types are not the same size.
To resolve this issue, we specify the template type as the type the return value is being cast into

Fixed a few compile errors for Windows x64 by specifying template parameters.

* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::setFileDescriptorData): Specify the types for the std::min macro to avoid compiler errors
under 64-bit builds.

2012-11-26 Arnaud Renevier <a.renevier@sisa.samsung.com>

[GTK] GtkSocket is leaked until webview is destroyed.
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
Expand Up @@ -433,7 +433,7 @@ void setFileDescriptorData(IDataObject* dataObject, int size, const String& pass
fgd->fgd[0].dwFlags = FD_FILESIZE;
fgd->fgd[0].nFileSizeLow = size;

int maxSize = std::min(pathname.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
int maxSize = std::min<int>(pathname.length(), WTF_ARRAY_LENGTH(fgd->fgd[0].cFileName));
CopyMemory(fgd->fgd[0].cFileName, pathname.charactersWithNullTermination(), maxSize * sizeof(UChar));
GlobalUnlock(medium.hGlobal);

Expand Down

0 comments on commit ee96317

Please sign in to comment.