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.129.124]) by mx.groups.io with SMTP id smtpd.web10.7933.1681376002384351650 for ; Thu, 13 Apr 2023 01:53:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XgYZE8ZE; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681376001; 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=XgYZE8ZEE+l42QQ+UBaK7meVkVZ+XtF7kMKGstTumUW4wcorcUhjg9GjJciJxIBBRd9Jor h8AfrOSVK4zvdCs6NOXTDtfhd87EzKwdWn/ZGqo/EqY3TSJsKqUKaNSLtP8/HLPBFmYf9C 9mutmB+CuqdJb5qz3OQS4SIoYTg8sjw= 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-235-ibEnVIVNPV6cxmNSszJTwg-1; Thu, 13 Apr 2023 04:53:18 -0400 X-MC-Unique: ibEnVIVNPV6cxmNSszJTwg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7B460858F0E; Thu, 13 Apr 2023 08:53:17 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 10074492C13; Thu, 13 Apr 2023 08:53:17 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C27EC18003BF; Thu, 13 Apr 2023 10:53:13 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Sunil V L , Zhiguang Liu , Rebecca Cran , Chao Li , Michael D Kinney , Pawel Polawski , Baoqi Zhang , Leif Lindholm , Dongyan Qian , Oliver Steffen , Bob Feng , Liming Gao , Ard Biesheuvel , =?UTF-8?q?Marvin=20H=C3=A4user?= , Daniel Schaefer , Yuwei Chen , Gerd Hoffmann Subject: [PATCH v3 03/10] BaseTools: remove WinNtInclude.h Date: Thu, 13 Apr 2023 10:53:06 +0200 Message-Id: <20230413085313.273483-4-kraxel@redhat.com> In-Reply-To: <20230413085313.273483-1-kraxel@redhat.com> References: <20230413085313.273483-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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