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.69890.1679570266694085235 for ; Thu, 23 Mar 2023 04:17:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=G65wnN+p; 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=1679570265; 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=nYHZZCBAApPtpDX5nHIkvR17vib/clQhlzfll9fKNr0=; b=G65wnN+pm40ViIPhQJpj47QdjVKRjFZO33e/v+7pbkE9pV8zywYpS5fwMwEcVOEGv0C5rB afs/iaFATvU2xXTa4iSrxGSa3XOgs1KH/MBcUDwBOWy1ePj8rap/Xdo5IQjSxKmySGbLL9 odeR8pGY9LJ9O1xFgeATOXKundbqfe4= 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-519-FqG2PA5aMN6FwCJN1Jvesw-1; Thu, 23 Mar 2023 07:17:41 -0400 X-MC-Unique: FqG2PA5aMN6FwCJN1Jvesw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 245158028AD; Thu, 23 Mar 2023 11:17:40 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BD3842166B29; Thu, 23 Mar 2023 11:17:35 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9FA2418000AA; Thu, 23 Mar 2023 12:17:33 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Leif Lindholm , Pawel Polawski , Bob Feng , Sunil V L , =?UTF-8?q?Marvin=20H=C3=A4user?= , Chao Li , Dongyan Qian , Michael D Kinney , Zhiguang Liu , Yuwei Chen , Liming Gao , Ard Biesheuvel , Baoqi Zhang , Oliver Steffen , Daniel Schaefer , Gerd Hoffmann Subject: [PATCH 1/8] BaseTools: remove WinNtInclude.h Date: Thu, 23 Mar 2023 12:17:26 +0100 Message-Id: <20230323111733.690211-2-kraxel@redhat.com> In-Reply-To: <20230323111733.690211-1-kraxel@redhat.com> References: <20230323111733.690211-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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 8b50774beb1e..2078ff42002f 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 6f61f16788cd..3f79732a9160 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