Skip to content

Commit

Permalink
Delete some unused files and functions from clr pal (#77112)
Browse files Browse the repository at this point in the history
* Delete unused coreclr\tools\util

* Delete palrt/path.cpp

* Cleanup strsafe.h

* Delete nls.h

* Delete shlwapi.h

* Cleanup shlwapi leftovers

* Delete winnls.h

* Delete wincrypt.h

* Delete weakreference.h

* Delete tchar.h

* Add back wincrypt used in assembly.cpp

* Delete psapi.h

* Remove use of shlwapip.h

* Revert "Delete weakreference.h"

This reverts commit 4990d03.

* Revert changes in wincrypt.h
  • Loading branch information
huoyaoyuan authored Oct 31, 2022
1 parent 5c61ad4 commit 3dbc850
Show file tree
Hide file tree
Showing 26 changed files with 24 additions and 5,090 deletions.
33 changes: 0 additions & 33 deletions src/coreclr/classlibnative/inc/nls.h

This file was deleted.

2 changes: 0 additions & 2 deletions src/coreclr/dlls/mscoree/mscoree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ BOOL STDMETHODCALLTYPE EEDllMain( // TRUE on success, FALSE on error.
// Handle lifetime of loaded library.
//*****************************************************************************

#include <shlwapi.h>

#ifdef TARGET_WINDOWS
extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
#endif // TARGET_WINDOWS
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscorpe/ceefilegenwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include "corerror.h"
#include <posterror.h>
#include <shlwapi.h>

// The following block contains a template for the default entry point stubs of a COM+
// IL only program. One can emit these stubs (with some fix-ups) and make
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/inc/crtwrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <stdint.h>
#include <windows.h>
#include <objbase.h>
#include <tchar.h>
#include "debugmacros.h"
#include <stdlib.h>
#include <malloc.h>
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/inc/utilcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "clrhost.h"
#include "debugmacros.h"
#include "corhlprpriv.h"
#include "winnls.h"
#include "check.h"
#include "safemath.h"
#include "new.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/inc/winwrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@

// winbase.h
#define WszFormatMessage FormatMessageW
#define Wszlstrcmp lstrcmpW
#define Wszlstrcmpi lstrcmpiW
#define WszCreateMutex CreateMutexW
#define WszOpenMutex OpenMutexW
#define WszCreateEvent CreateEventW
Expand Down
28 changes: 0 additions & 28 deletions src/coreclr/pal/inc/rt/palrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,25 +634,6 @@ typedef unsigned int ALG_ID;
#define CSTR_EQUAL 2
#define CSTR_GREATER_THAN 3

/******************* shlwapi ************************************/

// note: diff in NULL handing and calling convetion
#define StrChrW (WCHAR*)PAL_wcschr

STDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart, LPCWSTR lpEnd, WCHAR wMatch);

#define lstrcmpW PAL_wcscmp
#define lstrcmpiW _wcsicmp

#ifdef UNICODE
#define StrChr StrChrW

#define StrRChr StrRChrW

#define lstrcmp lstrcmpW
#define lstrcmpi lstrcmpiW
#endif


#ifdef __cplusplus
/*
Expand Down Expand Up @@ -729,15 +710,6 @@ inline errno_t __cdecl _fopen_unsafe(PAL_FILE * *ff, const char *fileName, const
}
#endif /* __cplusplus */

STDAPI_(BOOL) PathIsUNCW(LPCWSTR pszPath);
STDAPI_(BOOL) PathCanonicalizeW(LPWSTR lpszDst, LPCWSTR lpszSrc);

#ifdef UNICODE
#define PathIsUNC PathIsUNCW
#define PathCanonicalize PathCanonicalizeW

#endif // UNICODE

/******************* misc ***************************************/

#ifdef __cplusplus
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/pal/inc/rt/psapi.h

This file was deleted.

12 changes: 0 additions & 12 deletions src/coreclr/pal/inc/rt/shlwapi.h

This file was deleted.

4 changes: 0 additions & 4 deletions src/coreclr/pal/inc/rt/tchar.h

This file was deleted.

12 changes: 0 additions & 12 deletions src/coreclr/pal/inc/rt/winnls.h

This file was deleted.

Loading

0 comments on commit 3dbc850

Please sign in to comment.