From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.4033.1681459381818650286 for ; Fri, 14 Apr 2023 01:03:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WMnCMTXd; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681459380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LujFCuEfTAqI4mWKH8xxG0Lt4v1Jvk1yrXqrJD16UoY=; b=WMnCMTXdv4KKf0OqnQAqm+TXJYh6cwmxxR4ZMETJm1yCdgdRM17IYuIgCg7thjp/qHB3As hRmLHD0DhfTXkPKfCX4RtoXeRTWkNdsKA+t6gUWZMfS8cYivqed0BR9Nyj9tlEuKTolaJB 3XEtYhrnyn7KDupwOXhzw4tLKjkvoiY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-568-WIbLmHlkOfSNnm3H4eEZ4w-1; Fri, 14 Apr 2023 04:02:55 -0400 X-MC-Unique: WIbLmHlkOfSNnm3H4eEZ4w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6B398858297; Fri, 14 Apr 2023 08:02:54 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2954BC88; Fri, 14 Apr 2023 08:02:53 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A9ECA18000AA; Fri, 14 Apr 2023 10:02:50 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Pawel Polawski , Dongyan Qian , Sunil V L , Baoqi Zhang , Chao Li , Rebecca Cran , Ard Biesheuvel , Zhiguang Liu , Liming Gao , Yuwei Chen , =?UTF-8?q?Marvin=20H=C3=A4user?= , Leif Lindholm , Michael D Kinney , Daniel Schaefer , Bob Feng , Oliver Steffen , Gerd Hoffmann Subject: [PATCH v4 03/10] BaseTools: remove WinNtInclude.h Date: Fri, 14 Apr 2023 10:02:43 +0200 Message-Id: <20230414080250.1357004-4-kraxel@redhat.com> In-Reply-To: <20230414080250.1357004-1-kraxel@redhat.com> References: <20230414080250.1357004-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Appears to be a relic for ancient windows / compiler versions, windows builds in CI work just fine without it. Signed-off-by: Gerd Hoffmann --- BaseTools/Source/C/Common/WinNtInclude.h | 66 --------------------- BaseTools/Source/C/GenFv/GenFvInternalLib.c | 1 - BaseTools/Source/C/GenFw/Elf32Convert.c | 2 - BaseTools/Source/C/GenFw/Elf64Convert.c | 2 - BaseTools/Source/C/GenFw/ElfConvert.c | 2 - BaseTools/Source/C/GenFw/GenFw.c | 2 - 6 files changed, 75 deletions(-) delete mode 100644 BaseTools/Source/C/Common/WinNtInclude.h diff --git a/BaseTools/Source/C/Common/WinNtInclude.h b/BaseTools/Source/C/Common/WinNtInclude.h deleted file mode 100644 index 181e6ac33370..000000000000 --- a/BaseTools/Source/C/Common/WinNtInclude.h +++ /dev/null @@ -1,66 +0,0 @@ -/** @file -Include file for the WinNt Library - -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef __WIN_NT_INCLUDE_H__ -#define __WIN_NT_INCLUDE_H__ - -#define GUID _WINNT_DUP_GUID_____ -#define _LIST_ENTRY _WINNT_DUP_LIST_ENTRY_FORWARD -#define LIST_ENTRY _WINNT_DUP_LIST_ENTRY - -#if (_MSC_VER < 1800) -#define InterlockedIncrement _WINNT_DUP_InterlockedIncrement -#define InterlockedDecrement _WINNT_DUP_InterlockedDecrement -#define InterlockedCompareExchange64 _WINNT_DUP_InterlockedCompareExchange64 -#endif - -#undef UNALIGNED -#undef CONST -#undef VOID - -#ifndef __GNUC__ -#include "windows.h" - -// -// Win32 include files do not compile clean with /W4, so we use the warning -// pragma to suppress the warnings for Win32 only. This way our code can still -// compile at /W4 (highest warning level) with /WX (warnings cause build -// errors). -// -#pragma warning(disable : 4115) -#pragma warning(disable : 4201) -#pragma warning(disable : 4214) -#pragma warning(disable : 4028) -#pragma warning(disable : 4133) - -// -// Set the warnings back on as the EFI code must be /W4. -// -#pragma warning(default : 4115) -#pragma warning(default : 4201) -#pragma warning(default : 4214) - -#endif - -#undef GUID -#undef _LIST_ENTRY -#undef LIST_ENTRY -#undef InterlockedIncrement -#undef InterlockedDecrement -#undef InterlockedCompareExchange64 -#undef InterlockedCompareExchangePointer - -#define VOID void - -// -// Prevent collisions with Windows API name macros that deal with Unicode/Not issues -// -#undef LoadImage -#undef CreateEvent - -#endif diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index 2df7182f8b52..c8d5cac8e26e 100644 --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -25,7 +25,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include -#include "WinNtInclude.h" #include "GenFvInternalLib.h" #include "FvLib.h" #include "PeCoffLib.h" diff --git a/BaseTools/Source/C/GenFw/Elf32Convert.c b/BaseTools/Source/C/GenFw/Elf32Convert.c index 87d7f133f132..e9fb3593a91b 100644 --- a/BaseTools/Source/C/GenFw/Elf32Convert.c +++ b/BaseTools/Source/C/GenFw/Elf32Convert.c @@ -9,8 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include "WinNtInclude.h" - #ifndef __GNUC__ #include #include diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c index 9c17c90b1660..dfcb100a594f 100644 --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -10,8 +10,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include "WinNtInclude.h" - #ifndef __GNUC__ #include #include diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c index be98544056ec..3205f61494b6 100644 --- a/BaseTools/Source/C/GenFw/ElfConvert.c +++ b/BaseTools/Source/C/GenFw/ElfConvert.c @@ -7,8 +7,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include "WinNtInclude.h" - #ifndef __GNUC__ #include #include diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c index d0e52ccc2643..80ee73a80399 100644 --- a/BaseTools/Source/C/GenFw/GenFw.c +++ b/BaseTools/Source/C/GenFw/GenFw.c @@ -6,8 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ -#include "WinNtInclude.h" - #ifndef __GNUC__ #include #include -- 2.39.2