Skip to content

Commit ccb37d5

Browse files
authored
Remove some unused headers and functions (#91177)
* Remove winternl.h * Remove winver.h * Remove verrsrc.h * Remove dbghelp.h * Remove conio.h * Remove io.h * FILECFAbsoluteTimeToFileTime * Delete some unused header files * More unused structs and macros * Update fxver.h
1 parent 9e16f09 commit ccb37d5

File tree

17 files changed

+7
-326
lines changed

17 files changed

+7
-326
lines changed

src/coreclr/debug/createdump/createdump.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ extern void trace_verbose_printf(const char* format, ...);
3333
#endif
3434

3535
#include <windows.h>
36-
#include <winternl.h>
37-
#include <winver.h>
3836
#include <stdlib.h>
3937
#include <stdint.h>
4038
#include <stddef.h>
@@ -84,6 +82,7 @@ typedef int T_CONTEXT;
8482
#define __STDC_FORMAT_MACROS
8583
#include <inttypes.h>
8684
#else
85+
#include <winternl.h>
8786
#include <dbghelp.h>
8887
#endif
8988
#include <map>

src/coreclr/debug/daccess/stdafx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
#include <winwrap.h>
2828

29+
#ifdef HOST_WINDOWS
2930
#include <dbghelp.h>
31+
#endif
3032

3133
#include <wchar.h>
3234
#include <stdio.h>

src/coreclr/ildasm/ildasmpch.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <stdlib.h>
1313
#include <string.h>
1414
#include <limits.h>
15-
#include <conio.h>
1615

1716
#ifndef Debug_ReportError
1817
#define Debug_ReportError(strMessage)

src/coreclr/inc/clr/stack.h

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/coreclr/inc/clr/win32.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/coreclr/pal/inc/rt/conio.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/coreclr/pal/inc/rt/cpp/io.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/coreclr/pal/inc/rt/dbghelp.h

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/coreclr/pal/inc/rt/palrt.h

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,6 @@ typedef unsigned int ALG_ID;
630630
// 1 null termination
631631
#define LOCALE_NAME_MAX_LENGTH 85
632632

633-
#define CSTR_LESS_THAN 1
634-
#define CSTR_EQUAL 2
635-
#define CSTR_GREATER_THAN 3
636-
637633

638634
#ifdef __cplusplus
639635
/*
@@ -736,22 +732,13 @@ typename std::remove_reference<T>::type&& move( T&& t );
736732

737733
typedef DWORD OLE_COLOR;
738734

739-
#define PF_COMPARE_EXCHANGE_DOUBLE 2
740-
741-
typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
742-
743735
typedef HANDLE HWND;
744736

745-
#define IS_TEXT_UNICODE_SIGNATURE 0x0008
746-
#define IS_TEXT_UNICODE_UNICODE_MASK 0x000F
747-
748737
typedef struct _LIST_ENTRY {
749738
struct _LIST_ENTRY *Flink;
750739
struct _LIST_ENTRY *Blink;
751740
} LIST_ENTRY, *PLIST_ENTRY;
752741

753-
typedef VOID (NTAPI *WAITORTIMERCALLBACK)(PVOID, BOOLEAN);
754-
755742
// PORTABILITY_ASSERT and PORTABILITY_WARNING macros are meant to be used to
756743
// mark places in the code that needs attention for portability. The usual
757744
// usage pattern is:
@@ -866,11 +853,6 @@ interface ITypeInfo;
866853
interface ITypeLib;
867854
interface IMoniker;
868855

869-
typedef VOID (WINAPI *LPOVERLAPPED_COMPLETION_ROUTINE)(
870-
DWORD dwErrorCode,
871-
DWORD dwNumberOfBytesTransferred,
872-
LPOVERLAPPED lpOverlapped);
873-
874856
//
875857
// Debug APIs
876858
//
@@ -1108,26 +1090,6 @@ typedef LONG (WINAPI *PTOP_LEVEL_EXCEPTION_FILTER)(
11081090
);
11091091
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
11101092

1111-
/******************* ntdef ************************************/
1112-
1113-
#ifndef ANYSIZE_ARRAY
1114-
#define ANYSIZE_ARRAY 1 // winnt
1115-
#endif
1116-
1117-
/******************* winnt ************************************/
1118-
1119-
typedef struct LIST_ENTRY32 {
1120-
ULONG Flink;
1121-
ULONG Blink;
1122-
} LIST_ENTRY32;
1123-
typedef LIST_ENTRY32 *PLIST_ENTRY32;
1124-
1125-
typedef struct LIST_ENTRY64 {
1126-
ULONGLONG Flink;
1127-
ULONGLONG Blink;
1128-
} LIST_ENTRY64;
1129-
typedef LIST_ENTRY64 *PLIST_ENTRY64;
1130-
11311093
/******************** PAL RT APIs *******************************/
11321094

11331095
typedef struct _HSATELLITE *HSATELLITE;

src/coreclr/pal/inc/rt/verrsrc.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/coreclr/pal/inc/rt/winresrc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@
1010
// winresrc.h for PAL
1111
// Included in .rc files.
1212

13-
#include "winver.h"
1413
#include "palrt.h"

src/coreclr/pal/inc/rt/winternl.h

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/coreclr/pal/inc/rt/winver.h

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/coreclr/pal/prebuilt/inc/fxver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
// Our custom .rc parser on Unix follows the #ifdef and #include rules
5+
// Use #ifndef here to avoid dummy verrsrc.h
6+
#ifndef HOST_UNIX
47
#include <verrsrc.h>
8+
#endif
59

610
#define QUOTE_MACRO_HELPER(x) #x
711
#define QUOTE_MACRO(x) QUOTE_MACRO_HELPER(x)

0 commit comments

Comments
 (0)