Bug 1852806 - Remove macros for older Windows SDK from xpcom/. r=xpcom-reviewers,glandium

Depends on D188032

Differential Revision: https://phabricator.services.mozilla.com/D188033
This commit is contained in:
Masatoshi Kimura 2023-09-15 03:19:28 +00:00
Родитель f4d8600268
Коммит 197e069ce0
4 изменённых файлов: 3 добавлений и 30 удалений

Просмотреть файл

@ -34,8 +34,7 @@ namespace {
#if defined(XP_WIN)
# if defined(__MINGW32__) || (NTDDI_VERSION < NTDDI_WINBLUE) || \
(NTDDI_VERSION == NTDDI_WINBLUE && !defined(WINBLUE_KBSPRING14))
# if defined(__MINGW32__)
// Definitions for heap optimization that require the Windows SDK to target the
// Windows 8.1 Update
static const HEAP_INFORMATION_CLASS HeapOptimizeResources =

Просмотреть файл

@ -930,7 +930,7 @@ nsresult CollectProcessInfo(ProcessInfo& info) {
return NS_OK;
}
#if defined(XP_WIN) && (_WIN32_WINNT < 0x0A00) || defined(__MINGW32__)
#if defined(__MINGW32__)
WINBASEAPI
BOOL WINAPI IsUserCetAvailableInEnvironment(_In_ DWORD UserCetEnvironment);

Просмотреть файл

@ -50,14 +50,7 @@ void mozilla::PrefetchMemory(uint8_t* aStart, size_t aNumBytes) {
#elif defined(XP_WIN)
MaybeInitPrefetchVirtualMemory();
if (*sPrefetchVirtualMemory) {
// Normally, we'd use WIN32_MEMORY_RANGE_ENTRY, but that requires
// a different _WIN32_WINNT value before including windows.h, but
// that causes complications with unified sources. It's a simple
// enough struct anyways.
struct {
PVOID VirtualAddress;
SIZE_T NumberOfBytes;
} entry;
WIN32_MEMORY_RANGE_ENTRY entry;
entry.VirtualAddress = aStart;
entry.NumberOfBytes = aNumBytes;
(*sPrefetchVirtualMemory)(GetCurrentProcess(), 1, &entry, 0);

Просмотреть файл

@ -93,25 +93,6 @@ static nsresult GetWindowsFolder(int aFolder, nsIFile** aFile) {
return NS_NewLocalFile(nsDependentString(path, len), true, aFile);
}
# if WINVER < 0x0601
__inline HRESULT SHLoadLibraryFromKnownFolder(REFKNOWNFOLDERID aFolderId,
DWORD aMode, REFIID riid,
void** ppv) {
*ppv = nullptr;
IShellLibrary* plib;
HRESULT hr = CoCreateInstance(CLSID_ShellLibrary, nullptr,
CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&plib));
if (SUCCEEDED(hr)) {
hr = plib->LoadLibraryFromKnownFolder(aFolderId, aMode);
if (SUCCEEDED(hr)) {
hr = plib->QueryInterface(riid, ppv);
}
plib->Release();
}
return hr;
}
# endif
# if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
/*
* Return the default save-to location for the Windows Library passed in