diff --git a/xpcom/base/AvailableMemoryTracker.cpp b/xpcom/base/AvailableMemoryTracker.cpp index b9939bdf83e4..a14c43bcbc45 100644 --- a/xpcom/base/AvailableMemoryTracker.cpp +++ b/xpcom/base/AvailableMemoryTracker.cpp @@ -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 = diff --git a/xpcom/base/nsSystemInfo.cpp b/xpcom/base/nsSystemInfo.cpp index b4f129a1e677..b9b9ca136da0 100644 --- a/xpcom/base/nsSystemInfo.cpp +++ b/xpcom/base/nsSystemInfo.cpp @@ -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); diff --git a/xpcom/glue/MemUtils.cpp b/xpcom/glue/MemUtils.cpp index 531a5ea2f525..402568383c65 100644 --- a/xpcom/glue/MemUtils.cpp +++ b/xpcom/glue/MemUtils.cpp @@ -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); diff --git a/xpcom/io/SpecialSystemDirectory.cpp b/xpcom/io/SpecialSystemDirectory.cpp index fcb366aede1a..2abbbe4c0aab 100644 --- a/xpcom/io/SpecialSystemDirectory.cpp +++ b/xpcom/io/SpecialSystemDirectory.cpp @@ -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