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.17798.1681227965128979090 for ; Tue, 11 Apr 2023 08:46:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fSuTFaSr; 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=1681227964; 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=fSuTFaSrKoO3nVGYkof287kXWY06JZj2h93rjCKgNCIsf3kIyezjhimH6rskHh2FAV560E gbg/aEMIBW/reHrqtVhS0nfSurEXYvpm8lbZL9RjAFgR2XbutS2UFvLBMqmOssJvi3ScM4 cnA1teGelDkQOqxRkLfope7rJg+ABKQ= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-xjt4IgHTMXiufdo1oq0MZQ-1; Tue, 11 Apr 2023 11:46:01 -0400 X-MC-Unique: xjt4IgHTMXiufdo1oq0MZQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 262B93C0ED40; Tue, 11 Apr 2023 15:46:00 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.194.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F91C492B00; Tue, 11 Apr 2023 15:45:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5EB241802395; Tue, 11 Apr 2023 17:45:56 +0200 (CEST) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Baoqi Zhang , Leif Lindholm , Michael D Kinney , Bob Feng , Pawel Polawski , Dongyan Qian , Zhiguang Liu , Sunil V L , Liming Gao , =?UTF-8?q?Marvin=20H=C3=A4user?= , Chao Li , Ard Biesheuvel , Yuwei Chen , Daniel Schaefer , Oliver Steffen , Gerd Hoffmann Subject: [PATCH v2 1/8] BaseTools: remove WinNtInclude.h Date: Tue, 11 Apr 2023 17:45:49 +0200 Message-Id: <20230411154556.835538-2-kraxel@redhat.com> In-Reply-To: <20230411154556.835538-1-kraxel@redhat.com> References: <20230411154556.835538-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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