From 2403e8c8f1f17cf65b7f5c4aa04d70af36aac5c0 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 27 Aug 2023 23:42:53 +0800 Subject: [PATCH 01/16] Remove winternl.h --- src/coreclr/debug/createdump/createdump.h | 2 +- src/coreclr/pal/inc/rt/winternl.h | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/winternl.h diff --git a/src/coreclr/debug/createdump/createdump.h b/src/coreclr/debug/createdump/createdump.h index 50cf53dccfc7aa..35f7258d5d5028 100644 --- a/src/coreclr/debug/createdump/createdump.h +++ b/src/coreclr/debug/createdump/createdump.h @@ -33,7 +33,6 @@ extern void trace_verbose_printf(const char* format, ...); #endif #include -#include #include #include #include @@ -84,6 +83,7 @@ typedef int T_CONTEXT; #define __STDC_FORMAT_MACROS #include #else +#include #include #endif #include diff --git a/src/coreclr/pal/inc/rt/winternl.h b/src/coreclr/pal/inc/rt/winternl.h deleted file mode 100644 index a5e42c6678bc28..00000000000000 --- a/src/coreclr/pal/inc/rt/winternl.h +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: winternl.h -// -// =========================================================================== -// dummy winternl.h for PAL - -#include "palrt.h" From 5154f7f53d73888ac81e854e882d3a590117e8b2 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 27 Aug 2023 23:46:17 +0800 Subject: [PATCH 02/16] Remove winver.h --- src/coreclr/debug/createdump/createdump.h | 1 - src/coreclr/pal/inc/rt/winresrc.h | 1 - src/coreclr/pal/inc/rt/winver.h | 29 ----------------------- src/coreclr/vm/dwreport.cpp | 1 - 4 files changed, 32 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/winver.h diff --git a/src/coreclr/debug/createdump/createdump.h b/src/coreclr/debug/createdump/createdump.h index 35f7258d5d5028..4095a5693794af 100644 --- a/src/coreclr/debug/createdump/createdump.h +++ b/src/coreclr/debug/createdump/createdump.h @@ -33,7 +33,6 @@ extern void trace_verbose_printf(const char* format, ...); #endif #include -#include #include #include #include diff --git a/src/coreclr/pal/inc/rt/winresrc.h b/src/coreclr/pal/inc/rt/winresrc.h index b0843d15f1f2a9..88af2984da3366 100644 --- a/src/coreclr/pal/inc/rt/winresrc.h +++ b/src/coreclr/pal/inc/rt/winresrc.h @@ -10,5 +10,4 @@ // winresrc.h for PAL // Included in .rc files. -#include "winver.h" #include "palrt.h" diff --git a/src/coreclr/pal/inc/rt/winver.h b/src/coreclr/pal/inc/rt/winver.h deleted file mode 100644 index b0f441e1a1d410..00000000000000 --- a/src/coreclr/pal/inc/rt/winver.h +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: winver.h -// -// =========================================================================== -// winver.h for PAL -// Included in .rc files. - -#define VS_VERSION_INFO 1 -#define VS_FFI_FILEFLAGSMASK 0x0000003FL - -#define VS_FF_DEBUG 0x00000001L -#define VS_FF_PRERELEASE 0x00000002L -#define VS_FF_PATCHED 0x00000004L -#define VS_FF_PRIVATEBUILD 0x00000008L -#define VS_FF_INFOINFERRED 0x00000010L -#define VS_FF_SPECIALBUILD 0x00000020L - -#define VFT_UNKNOWN 0x00000000L -#define VFT_APP 0x00000001L -#define VFT_DLL 0x00000002L - -#define VFT2_UNKNOWN 0x00000000L - -#define VOS__WINDOWS32 0x00000004L diff --git a/src/coreclr/vm/dwreport.cpp b/src/coreclr/vm/dwreport.cpp index 875936fed09a42..83e42a27d18e17 100644 --- a/src/coreclr/vm/dwreport.cpp +++ b/src/coreclr/vm/dwreport.cpp @@ -18,7 +18,6 @@ #include #include #include "dbginterface.h" -#include #include "dlwrap.h" #include "eventreporter.h" #include "utilcode.h" From fe4af3efe8cc28bdfb04d36a7e0fc2de40aff097 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 28 Aug 2023 00:31:48 +0800 Subject: [PATCH 03/16] Remove verrsrc.h --- src/coreclr/pal/inc/rt/verrsrc.h | 12 ------------ src/coreclr/pal/prebuilt/inc/fxver.h | 2 -- 2 files changed, 14 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/verrsrc.h diff --git a/src/coreclr/pal/inc/rt/verrsrc.h b/src/coreclr/pal/inc/rt/verrsrc.h deleted file mode 100644 index 0bd71033246bec..00000000000000 --- a/src/coreclr/pal/inc/rt/verrsrc.h +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: verrsrc.h -// -// =========================================================================== -// dummy verrsrc.h for PAL - -#include "palrt.h" diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index 7297587490de46..4226ee0ecc9a52 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,8 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#include - #define QUOTE_MACRO_HELPER(x) #x #define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x) From 15512d819ee66d3712ae3e25fb35142ce17df542 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 28 Aug 2023 00:52:41 +0800 Subject: [PATCH 04/16] Remove dbghelp.h --- src/coreclr/debug/daccess/stdafx.h | 2 ++ src/coreclr/pal/inc/rt/dbghelp.h | 36 ------------------------------ 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/dbghelp.h diff --git a/src/coreclr/debug/daccess/stdafx.h b/src/coreclr/debug/daccess/stdafx.h index 050b4eac513724..b18541f54cb3ea 100644 --- a/src/coreclr/debug/daccess/stdafx.h +++ b/src/coreclr/debug/daccess/stdafx.h @@ -26,7 +26,9 @@ #include +#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)) && !defined(TARGET_UNIX) #include +#endif #include #include diff --git a/src/coreclr/pal/inc/rt/dbghelp.h b/src/coreclr/pal/inc/rt/dbghelp.h deleted file mode 100644 index 1d231d34fc3989..00000000000000 --- a/src/coreclr/pal/inc/rt/dbghelp.h +++ /dev/null @@ -1,36 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -/*++ BUILD Version: 0000 Increment this if a change has global effects - - - -Module Name: - - dbghelp.h - -Abstract: - - This module defines the prototypes and constants required for the image - help routines. - - Contains debugging support routines that are redistributable. - -Revision History: - ---*/ - -#ifndef _DBGHELP_ -#define _DBGHELP_ - -#if _MSC_VER > 1020 -#pragma once -#endif - -// -// options that are set/returned by SymSetOptions() & SymGetOptions() -// these are used as a mask -// -#define SYMOPT_LOAD_LINES 0x00000010 - -#endif // _DBGHELP_ From 9d8968313f0645b53b2e467b7ba1a0f3b4d830be Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 28 Aug 2023 00:55:21 +0800 Subject: [PATCH 05/16] Remove conio.h --- src/coreclr/ildasm/ildasmpch.h | 1 - src/coreclr/pal/inc/rt/conio.h | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/conio.h diff --git a/src/coreclr/ildasm/ildasmpch.h b/src/coreclr/ildasm/ildasmpch.h index b422a059b0eb96..9d89ba46db52c2 100644 --- a/src/coreclr/ildasm/ildasmpch.h +++ b/src/coreclr/ildasm/ildasmpch.h @@ -12,7 +12,6 @@ #include #include #include -#include #ifndef Debug_ReportError #define Debug_ReportError(strMessage) diff --git a/src/coreclr/pal/inc/rt/conio.h b/src/coreclr/pal/inc/rt/conio.h deleted file mode 100644 index 9dd9c0a06d2968..00000000000000 --- a/src/coreclr/pal/inc/rt/conio.h +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: conio.h -// -// =========================================================================== -// dummy conio.h for PAL - -#include "palrt.h" From 9c9b5e97fc44945b172964f3e9f67368de49a91e Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 28 Aug 2023 00:58:28 +0800 Subject: [PATCH 06/16] Remove io.h --- src/coreclr/pal/inc/rt/cpp/io.h | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/coreclr/pal/inc/rt/cpp/io.h diff --git a/src/coreclr/pal/inc/rt/cpp/io.h b/src/coreclr/pal/inc/rt/cpp/io.h deleted file mode 100644 index 64f3a52df7307b..00000000000000 --- a/src/coreclr/pal/inc/rt/cpp/io.h +++ /dev/null @@ -1,12 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// =========================================================================== -// File: io.h -// -// =========================================================================== -// dummy io.h for PAL - -#include "palrt.h" From a01ff7dbdb249c5a0ca77f7c04527fbc8b959a5b Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Sun, 27 Aug 2023 16:54:18 +0800 Subject: [PATCH 07/16] FILECFAbsoluteTimeToFileTime --- src/coreclr/pal/src/file/filetime.cpp | 29 ---------------------- src/coreclr/pal/src/include/pal/filetime.h | 6 ----- 2 files changed, 35 deletions(-) diff --git a/src/coreclr/pal/src/file/filetime.cpp b/src/coreclr/pal/src/file/filetime.cpp index ea8ca6bd0535ad..2500d234d8b65a 100644 --- a/src/coreclr/pal/src/file/filetime.cpp +++ b/src/coreclr/pal/src/file/filetime.cpp @@ -188,35 +188,6 @@ GetSystemTimeAsFileTime( } -#ifdef __APPLE__ -/*++ -Function: - FILECFAbsoluteTimeToFileTime - -Convert a CFAbsoluteTime value to a win32 FILETIME structure, as described -in MSDN documentation. CFAbsoluteTime is the number of seconds elapsed since -00:00 01 January 2001 UTC (Mac OS X epoch), while FILETIME represents a -64-bit number of 100-nanosecond intervals that have passed since 00:00 -01 January 1601 UTC (win32 epoch). ---*/ -FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec ) -{ - __int64 Result; - FILETIME Ret; - - Result = ((__int64)sec + SECS_BETWEEN_1601_AND_2001_EPOCHS) * SECS_TO_100NS; - - Ret.dwLowDateTime = (DWORD)Result; - Ret.dwHighDateTime = (DWORD)(Result >> 32); - - TRACE("CFAbsoluteTime = [%9f] converts to Win32 FILETIME = [%#x:%#x]\n", - sec, Ret.dwHighDateTime, Ret.dwLowDateTime); - - return Ret; -} -#endif // __APPLE__ - - /*++ Function: FILEUnixTimeToFileTime diff --git a/src/coreclr/pal/src/include/pal/filetime.h b/src/coreclr/pal/src/include/pal/filetime.h index 5a06cb5c3063e6..cf177058be47cb 100644 --- a/src/coreclr/pal/src/include/pal/filetime.h +++ b/src/coreclr/pal/src/include/pal/filetime.h @@ -63,12 +63,6 @@ extern "C" FILETIME FILEUnixTimeToFileTime( time_t sec, long nsec ); -#ifdef __APPLE__ -#include - -FILETIME FILECFAbsoluteTimeToFileTime( CFAbsoluteTime sec ); -#endif // __APPLE__ - #ifdef __cplusplus } #endif // __cplusplus From 3dabc1a91cfcf1fc80c3eaf612e08014a8375c9e Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Fri, 28 Jul 2023 16:47:40 +0800 Subject: [PATCH 08/16] Delete some unused header files --- src/coreclr/inc/clr/stack.h | 98 ------------------------------------- src/coreclr/inc/clr/win32.h | 37 -------------- 2 files changed, 135 deletions(-) delete mode 100644 src/coreclr/inc/clr/stack.h delete mode 100644 src/coreclr/inc/clr/win32.h diff --git a/src/coreclr/inc/clr/stack.h b/src/coreclr/inc/clr/stack.h deleted file mode 100644 index 97719c21c9ebed..00000000000000 --- a/src/coreclr/inc/clr/stack.h +++ /dev/null @@ -1,98 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// - -// -// This header provides a basic stack implementation - -#ifndef _clr_Stack_h_ -#define _clr_Stack_h_ - -namespace clr -{ - //------------------------------------------------------------------------------------------------- - // A basic stack class. - // - template < typename T > - class Stack - { - private: - //--------------------------------------------------------------------------------------------- - struct Link - { - template < typename A1 > - Link(A1 && a1, Link * next = nullptr) - : _value(std::forward(a1)) - , _next(next) - {} - - T _value; - Link * _next; - }; - - public: - //--------------------------------------------------------------------------------------------- - // Empty stack constructor. - Stack() - : _top(nullptr) - , _size(0) - {} - - //--------------------------------------------------------------------------------------------- - // Move constructor. - Stack(Stack && stack) - : _top(nullptr) - , _size(0) - { *this = std::move(stack); } - - //--------------------------------------------------------------------------------------------- - ~Stack() - { - while (!empty()) - { - pop(); - } - } - - //--------------------------------------------------------------------------------------------- - // Move assignment. - Stack& operator=(Stack && stack) - { std::swap(_top, stack._top); std::swap(_size, stack._size); } - - //--------------------------------------------------------------------------------------------- - bool empty() const - { return _top == nullptr; } - - //--------------------------------------------------------------------------------------------- - size_t size() const - { return _size; } - - //--------------------------------------------------------------------------------------------- - T & top() - { return _top->_value; } - - //--------------------------------------------------------------------------------------------- - T const & top() const - { return _top->_value; } - - //--------------------------------------------------------------------------------------------- - template < typename A1 > inline - void push(A1 && value) - { - STATIC_CONTRACT_THROWS; - _top = new Link(std::forward(value), _top); - ++_size; - } - - //--------------------------------------------------------------------------------------------- - void pop() - { Link * del = _top; _top = _top->_next; --_size; delete del; } - - private: - //--------------------------------------------------------------------------------------------- - Link * _top; - size_t _size; - }; -} // namespace clr - -#endif // _clr_Stack_h_ diff --git a/src/coreclr/inc/clr/win32.h b/src/coreclr/inc/clr/win32.h deleted file mode 100644 index 0198a732da8ce1..00000000000000 --- a/src/coreclr/inc/clr/win32.h +++ /dev/null @@ -1,37 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// -// clr/win32.h -// -// Provides Win32-specific utility functionality. -// - -// - -#ifndef clr_win32_h -#define clr_win32_h - -#include "winwrap.h" - -namespace clr -{ - namespace win32 - { - // Prevents an HMODULE from being unloaded until process termination. - inline - HRESULT PreventModuleUnload(HMODULE hMod) - { - if (!WszGetModuleHandleEx( - GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_PIN, - reinterpret_cast(hMod), - &hMod)) - { - return HRESULT_FROM_GetLastError(); - } - - return S_OK; - } - } // namespace win -} // namespace clr - -#endif // clr_win32_h From 60ff9dbe76d307e5135546355dc7c435cf492cc0 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 28 Aug 2023 11:23:59 +0800 Subject: [PATCH 09/16] Try add back #include --- src/coreclr/pal/prebuilt/inc/fxver.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index 4226ee0ecc9a52..e6da9b335400d5 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,6 +1,10 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +#ifdef HOST_WINDOWS +#include +#endif + #define QUOTE_MACRO_HELPER(x) #x #define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x) From 871effbef1b48f0c9c4afdb9fd44ac5ba1e7ceab Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 29 Aug 2023 00:02:11 +0800 Subject: [PATCH 10/16] Change condition to HOST_WINDOWS --- src/coreclr/debug/daccess/stdafx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/debug/daccess/stdafx.h b/src/coreclr/debug/daccess/stdafx.h index b18541f54cb3ea..bb7b7b2365de59 100644 --- a/src/coreclr/debug/daccess/stdafx.h +++ b/src/coreclr/debug/daccess/stdafx.h @@ -26,7 +26,7 @@ #include -#if (defined(FEATURE_COMINTEROP) || defined(FEATURE_COMWRAPPERS)) && !defined(TARGET_UNIX) +#ifdef HOST_WINDOWS #include #endif From 5bf9045c30d8edb4cff530c25b6a8fe4a49eff21 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 29 Aug 2023 11:44:21 +0800 Subject: [PATCH 11/16] Change to #ifndef TARGET_UNIX --- src/coreclr/pal/prebuilt/inc/fxver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index e6da9b335400d5..079304992b3831 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifdef HOST_WINDOWS +#ifndef TARGET_UNIX #include #endif From e42b22084950f1e6a2dd0327e5076679b16f1bbc Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 29 Aug 2023 14:39:52 +0800 Subject: [PATCH 12/16] Use HOST_UNIX instead --- src/coreclr/pal/prebuilt/inc/fxver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index 079304992b3831..38580f49059483 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -#ifndef TARGET_UNIX +#ifndef HOST_UNIX #include #endif From 8040203a7d81920408ef3f99a085ef578a5973b5 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 29 Aug 2023 21:50:36 +0800 Subject: [PATCH 13/16] Delete CSTR macros --- src/coreclr/pal/inc/rt/palrt.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/coreclr/pal/inc/rt/palrt.h b/src/coreclr/pal/inc/rt/palrt.h index fffc116766f9c0..1ffebead9c27f5 100644 --- a/src/coreclr/pal/inc/rt/palrt.h +++ b/src/coreclr/pal/inc/rt/palrt.h @@ -630,10 +630,6 @@ typedef unsigned int ALG_ID; // 1 null termination #define LOCALE_NAME_MAX_LENGTH 85 -#define CSTR_LESS_THAN 1 -#define CSTR_EQUAL 2 -#define CSTR_GREATER_THAN 3 - #ifdef __cplusplus /* From 3eef54196a53e36d3dc58f856f2d4c3cb0093fcd Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Tue, 29 Aug 2023 22:13:39 +0800 Subject: [PATCH 14/16] More unused structs and macros --- src/coreclr/pal/inc/rt/palrt.h | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/coreclr/pal/inc/rt/palrt.h b/src/coreclr/pal/inc/rt/palrt.h index 1ffebead9c27f5..1e52727ccdba95 100644 --- a/src/coreclr/pal/inc/rt/palrt.h +++ b/src/coreclr/pal/inc/rt/palrt.h @@ -732,22 +732,13 @@ typename std::remove_reference::type&& move( T&& t ); typedef DWORD OLE_COLOR; -#define PF_COMPARE_EXCHANGE_DOUBLE 2 - -typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN ); - typedef HANDLE HWND; -#define IS_TEXT_UNICODE_SIGNATURE 0x0008 -#define IS_TEXT_UNICODE_UNICODE_MASK 0x000F - typedef struct _LIST_ENTRY { struct _LIST_ENTRY *Flink; struct _LIST_ENTRY *Blink; } LIST_ENTRY, *PLIST_ENTRY; -typedef VOID (NTAPI *WAITORTIMERCALLBACK)(PVOID, BOOLEAN); - // PORTABILITY_ASSERT and PORTABILITY_WARNING macros are meant to be used to // mark places in the code that needs attention for portability. The usual // usage pattern is: @@ -862,11 +853,6 @@ interface ITypeInfo; interface ITypeLib; interface IMoniker; -typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)( - DWORD dwErrorCode, - DWORD dwNumberOfBytesTransferred, - LPOVERLAPPED lpOverlapped); - // // Debug APIs // @@ -1104,26 +1090,6 @@ typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)( ); typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; -/******************* ntdef ************************************/ - -#ifndef ANYSIZE_ARRAY -#define ANYSIZE_ARRAY 1 // winnt -#endif - -/******************* winnt ************************************/ - -typedef struct LIST_ENTRY32 { - ULONG Flink; - ULONG Blink; -} LIST_ENTRY32; -typedef LIST_ENTRY32 *PLIST_ENTRY32; - -typedef struct LIST_ENTRY64 { - ULONGLONG Flink; - ULONGLONG Blink; -} LIST_ENTRY64; -typedef LIST_ENTRY64 *PLIST_ENTRY64; - /******************** PAL RT APIs *******************************/ typedef struct _HSATELLITE *HSATELLITE; From d1c71f5f495aa1a8e79206e2827213e5f39b0423 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Wed, 30 Aug 2023 13:21:57 +0800 Subject: [PATCH 15/16] Update fxver.h --- src/coreclr/pal/prebuilt/inc/fxver.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index 38580f49059483..bf19b1fad59d21 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,6 +1,8 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// Our custom .rc parser on Unix follows the #ifdef and #include rules, but doesn't inspect actual values of the macros. +// Use #ifndef here to avoid dummy verrsrc.h #ifndef HOST_UNIX #include #endif From 59b7ade03dfeaac2fde50604de9b8f47b0d4ba79 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Thu, 31 Aug 2023 13:02:22 +0800 Subject: [PATCH 16/16] Update fxver.h --- src/coreclr/pal/prebuilt/inc/fxver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/pal/prebuilt/inc/fxver.h b/src/coreclr/pal/prebuilt/inc/fxver.h index bf19b1fad59d21..b88f7e9c9514a1 100644 --- a/src/coreclr/pal/prebuilt/inc/fxver.h +++ b/src/coreclr/pal/prebuilt/inc/fxver.h @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// Our custom .rc parser on Unix follows the #ifdef and #include rules, but doesn't inspect actual values of the macros. +// Our custom .rc parser on Unix follows the #ifdef and #include rules // Use #ifndef here to avoid dummy verrsrc.h #ifndef HOST_UNIX #include