Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
windows:mingw:win64
mingw64-webkitgtk
qt5-qtwebkit-fix-building-with-gcc-12.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File qt5-qtwebkit-fix-building-with-gcc-12.patch of Package mingw64-webkitgtk
diff -ur webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginDatabaseWin.cpp webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginDatabaseWin.cpp --- webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginDatabaseWin.cpp 2016-04-10 08:48:37.000000000 +0200 +++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginDatabaseWin.cpp 2023-05-30 22:41:18.229591659 +0200 @@ -115,7 +115,7 @@ for (Vector<String>::const_iterator it = m_pluginDirectories.begin(); it != end; ++it) { String pattern = *it + "\\*"; - hFind = FindFirstFileW(pattern.charactersWithNullTermination().data(), &findFileData); + hFind = FindFirstFileW((LPCWSTR)pattern.charactersWithNullTermination().data(), &findFileData); if (hFind == INVALID_HANDLE_VALUE) continue; @@ -215,7 +215,7 @@ HKEY extensionsKey; // Try opening the key - result = RegOpenKeyEx(key, extensionsPath.charactersWithNullTermination().data(), 0, KEY_READ, &extensionsKey); + result = RegOpenKeyEx(key, (LPCWSTR)extensionsPath.charactersWithNullTermination().data(), 0, KEY_READ, &extensionsKey); if (result == ERROR_SUCCESS) { // Now get the plugins directory @@ -305,7 +305,7 @@ DWORD acrobatInstallPathSize = sizeof(acrobatInstallPathStr); String acrobatPluginKeyPath = "Software\\Adobe\\Acrobat Reader\\" + latestAcrobatVersionString + "\\InstallPath"; - result = getRegistryValue(HKEY_LOCAL_MACHINE, acrobatPluginKeyPath.charactersWithNullTermination().data(), 0, &type, acrobatInstallPathStr, &acrobatInstallPathSize); + result = getRegistryValue(HKEY_LOCAL_MACHINE, (LPCWSTR)acrobatPluginKeyPath.charactersWithNullTermination().data(), 0, &type, acrobatInstallPathStr, &acrobatInstallPathSize); if (result == ERROR_SUCCESS) { String acrobatPluginDirectory = String(acrobatInstallPathStr, acrobatInstallPathSize / sizeof(WCHAR) - 1) + "\\browser"; @@ -352,10 +352,10 @@ DWORD useNewPluginSize; String javaPluginKeyPath = "Software\\JavaSoft\\Java Plug-in\\" + latestJavaVersionString; - result = getRegistryValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination().data(), L"UseNewJavaPlugin", &type, &useNewPluginValue, &useNewPluginSize); + result = getRegistryValue(HKEY_LOCAL_MACHINE, (LPCWSTR)javaPluginKeyPath.charactersWithNullTermination().data(), L"UseNewJavaPlugin", &type, &useNewPluginValue, &useNewPluginSize); if (result == ERROR_SUCCESS && useNewPluginValue == 1) { - result = getRegistryValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination().data(), L"JavaHome", &type, javaInstallPathStr, &javaInstallPathSize); + result = getRegistryValue(HKEY_LOCAL_MACHINE, (LPCWSTR)javaPluginKeyPath.charactersWithNullTermination().data(), L"JavaHome", &type, javaInstallPathStr, &javaInstallPathSize); if (result == ERROR_SUCCESS) { String javaPluginDirectory = String(javaInstallPathStr, javaInstallPathSize / sizeof(WCHAR) - 1) + "\\bin\\new_plugin"; directories.append(javaPluginDirectory); @@ -383,7 +383,7 @@ if (!PathRemoveFileSpec(moduleFileNameStr)) goto exit; - pluginsDirectory = String(moduleFileNameStr) + "\\Plugins"; + pluginsDirectory = String((UCHAR*)moduleFileNameStr) + "\\Plugins"; } exit: return pluginsDirectory; @@ -400,10 +400,10 @@ WCHAR macromediaDirectoryStr[MAX_PATH]; PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Flash")); - directories.append(macromediaDirectoryStr); + directories.append((UCHAR*)macromediaDirectoryStr); PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Shockwave 10")); - directories.append(macromediaDirectoryStr); + directories.append((UCHAR*)macromediaDirectoryStr); #endif } diff -ur webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginPackageWin.cpp webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginPackageWin.cpp --- webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginPackageWin.cpp 2016-04-10 08:48:37.000000000 +0200 +++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginPackageWin.cpp 2023-05-30 22:43:52.149794687 +0200 @@ -47,7 +47,7 @@ UINT bufferLength; String subInfo = "\\StringfileInfo\\040904E4\\" + info; bool retval = VerQueryValueW(versionInfoData, - const_cast<UChar*>(subInfo.charactersWithNullTermination().data()), + (LPCWSTR)subInfo.charactersWithNullTermination().data(), &buffer, &bufferLength); if (!retval || bufferLength == 0) return String(); @@ -167,13 +167,13 @@ bool PluginPackage::fetchInfo() { DWORD versionInfoSize, zeroHandle; - versionInfoSize = GetFileVersionInfoSizeW(const_cast<UChar*>(m_path.charactersWithNullTermination().data()), &zeroHandle); + versionInfoSize = GetFileVersionInfoSizeW((LPCWSTR)m_path.charactersWithNullTermination().data(), &zeroHandle); if (versionInfoSize == 0) return false; auto versionInfoData = std::make_unique<char[]>(versionInfoSize); - if (!GetFileVersionInfoW(const_cast<UChar*>(m_path.charactersWithNullTermination().data()), + if (!GetFileVersionInfoW((LPCWSTR)m_path.charactersWithNullTermination().data(), 0, versionInfoSize, versionInfoData.get())) return false; @@ -238,7 +238,7 @@ return true; } else { #if OS(WINCE) - m_module = ::LoadLibraryW(m_path.charactersWithNullTermination().data()); + m_module = ::LoadLibraryW((LPCWSTR)m_path.charactersWithNullTermination().data()); #else WCHAR currentPath[MAX_PATH]; @@ -247,11 +247,11 @@ String path = m_path.substring(0, m_path.reverseFind('\\')); - if (!::SetCurrentDirectoryW(path.charactersWithNullTermination().data())) + if (!::SetCurrentDirectoryW((LPCWSTR)path.charactersWithNullTermination().data())) return false; // Load the library - m_module = ::LoadLibraryExW(m_path.charactersWithNullTermination().data(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); + m_module = ::LoadLibraryExW((LPCWSTR)m_path.charactersWithNullTermination().data(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); if (!::SetCurrentDirectoryW(currentPath)) { if (m_module) Nur in webkitgtk-2.4.11/Source/WebCore/plugins/win: PluginPackageWin.cpp.orig. Nur in webkitgtk-2.4.11/Source/WebCore/plugins/win: PluginPackageWin.cpp.rej. diff -ur webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginViewWin.cpp webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginViewWin.cpp --- webkitgtk-2.4.11.orig/Source/WebCore/plugins/win/PluginViewWin.cpp 2016-04-10 08:48:37.000000000 +0200 +++ webkitgtk-2.4.11/Source/WebCore/plugins/win/PluginViewWin.cpp 2023-05-30 22:41:18.229591659 +0200 @@ -873,13 +873,13 @@ // Get file info WIN32_FILE_ATTRIBUTE_DATA attrs; - if (GetFileAttributesExW(filename.charactersWithNullTermination().data(), GetFileExInfoStandard, &attrs) == 0) + if (GetFileAttributesExW((LPCWSTR)filename.charactersWithNullTermination().data(), GetFileExInfoStandard, &attrs) == 0) return NPERR_FILE_NOT_FOUND; if (attrs.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) return NPERR_FILE_NOT_FOUND; - HANDLE fileHandle = CreateFileW(filename.charactersWithNullTermination().data(), FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); + HANDLE fileHandle = CreateFileW((LPCWSTR)filename.charactersWithNullTermination().data(), FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); if (fileHandle == INVALID_HANDLE_VALUE) return NPERR_FILE_NOT_FOUND; @@ -887,7 +887,7 @@ buffer.resize(attrs.nFileSizeLow); DWORD bytesRead; - int retval = ReadFile(fileHandle, buffer.data(), attrs.nFileSizeLow, &bytesRead, 0); + int retval = ReadFile((HANDLE)fileHandle, buffer.data(), attrs.nFileSizeLow, &bytesRead, 0); CloseHandle(fileHandle); Nur in webkitgtk-2.4.11/Source/WebCore/plugins/win: PluginViewWin.cpp.orig. diff -ur webkitgtk-2.4.11.orig/Source/WTF/wtf/text/WTFString.cpp webkitgtk-2.4.11/Source/WTF/wtf/text/WTFString.cpp --- webkitgtk-2.4.11.orig/Source/WTF/wtf/text/WTFString.cpp 2016-04-10 08:48:36.000000000 +0200 +++ webkitgtk-2.4.11/Source/WTF/wtf/text/WTFString.cpp 2023-05-30 23:00:40.663116189 +0200 @@ -42,6 +42,13 @@ using namespace Unicode; // Construct a string with UTF-16 data. +String::String(const wchar_t* characters, unsigned length) +{ + if (characters) + m_impl = StringImpl::create((const UChar*)characters, length); +} + +// Construct a string with UTF-16 data. String::String(const UChar* characters, unsigned length) { if (characters) Nur in webkitgtk-2.4.11/Source/WTF/wtf/text: WTFString.cpp.orig. diff -ur webkitgtk-2.4.11.orig/Source/WTF/wtf/text/WTFString.h webkitgtk-2.4.11/Source/WTF/wtf/text/WTFString.h --- webkitgtk-2.4.11.orig/Source/WTF/wtf/text/WTFString.h 2016-04-10 08:48:36.000000000 +0200 +++ webkitgtk-2.4.11/Source/WTF/wtf/text/WTFString.h 2023-05-30 22:41:18.229591659 +0200 @@ -87,6 +87,9 @@ String() { } // Construct a string with UTF-16 data. + WTF_EXPORT_STRING_API String(const wchar_t* characters, unsigned length); + + // Construct a string with UTF-16 data. WTF_EXPORT_STRING_API String(const UChar* characters, unsigned length); // Construct a string by copying the contents of a vector. To avoid Nur in webkitgtk-2.4.11/Source/WTF/wtf/text: WTFString.h.orig.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor