From 66248cfbcc35c313412983cd66024c0db847cbd1 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 19 Feb 2018 12:27:14 +0100 Subject: Remove always-false #if WINVER < 0x0600 (Windows Vista) checks in widget/windows. --- widget/windows/LSPAnnotator.cpp | 5 --- widget/windows/WindowsUIUtils.cpp | 4 +- widget/windows/mozwrlbase.h | 77 --------------------------------------- widget/windows/nsFilePicker.h | 18 --------- 4 files changed, 2 insertions(+), 102 deletions(-) delete mode 100644 widget/windows/mozwrlbase.h diff --git a/widget/windows/LSPAnnotator.cpp b/widget/windows/LSPAnnotator.cpp index de4a40d2a..97f6e5b50 100644 --- a/widget/windows/LSPAnnotator.cpp +++ b/widget/windows/LSPAnnotator.cpp @@ -11,11 +11,6 @@ * on machines with several LSPs. */ -#if _WIN32_WINNT < 0x0600 -// Redefining _WIN32_WINNT for some Vista APIs that we call -#undef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 -#endif #include "nsICrashReporter.h" #include "nsISupportsImpl.h" #include "nsServiceManagerUtils.h" diff --git a/widget/windows/WindowsUIUtils.cpp b/widget/windows/WindowsUIUtils.cpp index 223511859..1c270b5ec 100644 --- a/widget/windows/WindowsUIUtils.cpp +++ b/widget/windows/WindowsUIUtils.cpp @@ -5,7 +5,8 @@ #include #include -#include "mozwrlbase.h" +#include + #include "nsServiceManagerUtils.h" #include "WindowsUIUtils.h" @@ -179,4 +180,3 @@ WindowsUIUtils::UpdateTabletModeState() return NS_OK; } - diff --git a/widget/windows/mozwrlbase.h b/widget/windows/mozwrlbase.h deleted file mode 100644 index d82be8f04..000000000 --- a/widget/windows/mozwrlbase.h +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#pragma once - -/* - * Includes and it's children. Defines imports needed by - * corewrappers.h in the case where windows.h has already been - * included w/WINVER < 0x600. Also ups WINVER/_WIN32_WINNT prior - * to including wrl.h. Mozilla's build currently has WINVER set to - * 0x502 for XP support. - */ - -#if _WIN32_WINNT < 0x600 - -#include - -VOID -WINAPI -ReleaseSRWLockExclusive( - _Inout_ PSRWLOCK SRWLock - ); - -VOID -WINAPI -ReleaseSRWLockShared( - _Inout_ PSRWLOCK SRWLock - ); - -BOOL -WINAPI -InitializeCriticalSectionEx( - _Out_ LPCRITICAL_SECTION lpCriticalSection, - _In_ DWORD dwSpinCount, - _In_ DWORD Flags - ); - -VOID -WINAPI -InitializeSRWLock( - _Out_ PSRWLOCK SRWLock - ); - -VOID -WINAPI -AcquireSRWLockExclusive( - _Inout_ PSRWLOCK SRWLock - ); - -BOOLEAN -WINAPI -TryAcquireSRWLockExclusive( - _Inout_ PSRWLOCK SRWLock - ); - -BOOLEAN -WINAPI -TryAcquireSRWLockShared( - _Inout_ PSRWLOCK SRWLock - ); - -VOID -WINAPI -AcquireSRWLockShared( - _Inout_ PSRWLOCK SRWLock - ); - -#undef WINVER -#undef _WIN32_WINNT -#define WINVER 0x600 -#define _WIN32_WINNT 0x600 - -#endif // _WIN32_WINNT < 0x600 - -#include diff --git a/widget/windows/nsFilePicker.h b/widget/windows/nsFilePicker.h index 3d692b3d4..740f07a7d 100644 --- a/widget/windows/nsFilePicker.h +++ b/widget/windows/nsFilePicker.h @@ -9,17 +9,6 @@ #include -// For Vista IFileDialog interfaces which aren't exposed -// unless _WIN32_WINNT >= _WIN32_WINNT_LONGHORN. -#if _WIN32_WINNT < _WIN32_WINNT_LONGHORN -#define _WIN32_WINNT_bak _WIN32_WINNT -#undef _WIN32_WINNT -#define _WIN32_WINNT _WIN32_WINNT_LONGHORN -#define _WIN32_IE_bak _WIN32_IE -#undef _WIN32_IE -#define _WIN32_IE _WIN32_IE_IE70 -#endif - #include "nsIFile.h" #include "nsITimer.h" #include "nsISimpleEnumerator.h" @@ -141,11 +130,4 @@ protected: DWORD mFDECookie; }; -#if defined(_WIN32_WINNT_bak) -#undef _WIN32_WINNT -#define _WIN32_WINNT _WIN32_WINNT_bak -#undef _WIN32_IE -#define _WIN32_IE _WIN32_IE_bak -#endif - #endif // nsFilePicker_h__ -- cgit v1.2.3