Skip to content

Commit ade698f

Browse files
authored
Delete ClrDirectoryEnumerator (#69400)
* Delete unused PAL functions * Delete ClrDirectoryEnumerator
1 parent 451d8f6 commit ade698f

File tree

14 files changed

+1
-598
lines changed

14 files changed

+1
-598
lines changed

src/coreclr/inc/longfilepathwrappers.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ DeleteFileWrapper(
3939
_In_ LPCWSTR lpFileName
4040
);
4141

42-
HANDLE
43-
FindFirstFileExWrapper(
44-
_In_ LPCWSTR lpFileName,
45-
_In_ FINDEX_INFO_LEVELS fInfoLevelId,
46-
_Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData,
47-
_In_ FINDEX_SEARCH_OPS fSearchOp,
48-
_Reserved_ LPVOID lpSearchFilter,
49-
_In_ DWORD dwAdditionalFlags
50-
);
51-
5242
#ifndef HOST_UNIX
5343
BOOL
5444
CopyFileExWrapper(
@@ -62,13 +52,6 @@ CopyFileExWrapper(
6252
);
6353
#endif //HOST_UNIX
6454

65-
BOOL
66-
MoveFileExWrapper(
67-
_In_ LPCWSTR lpExistingFileName,
68-
_In_opt_ LPCWSTR lpNewFileName,
69-
_In_ DWORD dwFlags
70-
);
71-
7255
DWORD
7356
SearchPathWrapper(
7457
_In_opt_ LPCWSTR lpPath,
@@ -79,14 +62,6 @@ SearchPathWrapper(
7962
_Out_opt_ LPWSTR * lpFilePart
8063
);
8164

82-
83-
UINT WINAPI GetTempFileNameWrapper(
84-
_In_ LPCTSTR lpPathName,
85-
_In_ LPCTSTR lpPrefixString,
86-
_In_ UINT uUnique,
87-
SString& lpTempFileName
88-
);
89-
9065
DWORD WINAPI GetTempPathWrapper(
9166
SString& lpBuffer
9267
);

src/coreclr/inc/safewrap.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,36 +56,6 @@ consistency's sake.
5656

5757
#include "holder.h"
5858

59-
/* --------------------------------------------------------------------------- *
60-
* Simple wrapper around WszFindFirstFile/WszFindNextFile
61-
* --------------------------------------------------------------------------- */
62-
class ClrDirectoryEnumerator
63-
{
64-
WIN32_FIND_DATAW data;
65-
FindHandleHolder dirHandle;
66-
BOOL fFindNext; // Skip FindNextFile first time around
67-
68-
public:
69-
ClrDirectoryEnumerator(LPCWSTR pBaseDirectory, LPCWSTR pMask = W("*"));
70-
bool Next();
71-
72-
LPCWSTR GetFileName()
73-
{
74-
return data.cFileName;
75-
}
76-
77-
DWORD GetFileAttributes()
78-
{
79-
return data.dwFileAttributes;
80-
}
81-
82-
void Close()
83-
{
84-
dirHandle.Clear();
85-
}
86-
};
87-
88-
8959
/* --------------------------------------------------------------------------- *
9060
* Simple wrapper around RegisterEventSource/ReportEvent/DeregisterEventSource
9161
* --------------------------------------------------------------------------- */

src/coreclr/inc/winwrap.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
3+
34
//*****************************************************************************
45
// WinWrap.h
56
//
@@ -201,33 +202,19 @@
201202
#define WszGetFileAttributes GetFileAttributesWrapper
202203
#define WszGetFileAttributesEx GetFileAttributesExWrapper
203204
#define WszDeleteFile DeleteFileWrapper
204-
#define WszFindFirstFileEx FindFirstFileExWrapper
205-
#define WszFindNextFile FindNextFileW
206-
#define WszMoveFileEx MoveFileExWrapper
207205

208206
//Can not use extended syntax
209207
#define WszGetFullPathName GetFullPathNameW
210208

211209
//Long Files will not work on these till redstone
212210
#define WszGetCurrentDirectory GetCurrentDirectoryWrapper
213-
#define WszGetTempFileName GetTempFileNameWrapper
214211
#define WszGetTempPath GetTempPathWrapper
215212

216213
//APIS which have a buffer as an out parameter
217214
#define WszGetEnvironmentVariable GetEnvironmentVariableWrapper
218215
#define WszSearchPath SearchPathWrapper
219216
#define WszGetModuleFileName GetModuleFileNameWrapper
220217

221-
//NOTE: IF the following API's are enabled ensure that they can work with LongFile Names
222-
//See the usage and implementation of above API's
223-
//
224-
//#define WszGetBinaryType GetBinaryTypeWrapper //Coresys does not seem to have this API
225-
226-
#if HOST_UNIX
227-
#define WszFindFirstFile FindFirstFileW
228-
#else
229-
#define WszFindFirstFile(_lpFileName_, _lpFindData_) FindFirstFileExWrapper(_lpFileName_, FindExInfoStandard, _lpFindData_, FindExSearchNameMatch, NULL, 0)
230-
#endif // HOST_UNIX
231218
//*****************************************************************************
232219
// Prototypes for API's.
233220
//*****************************************************************************

src/coreclr/pal/inc/pal.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4090,8 +4090,6 @@ PALIMPORT char * __cdecl strrchr(const char *, int);
40904090
PALIMPORT char * __cdecl strpbrk(const char *, const char *);
40914091
PALIMPORT char * __cdecl strstr(const char *, const char *);
40924092
PALIMPORT char * __cdecl strtok(char *, const char *);
4093-
PALIMPORT size_t __cdecl strspn(const char *, const char *);
4094-
PALIMPORT size_t __cdecl strcspn(const char *, const char *);
40954093
PALIMPORT int __cdecl atoi(const char *);
40964094
PALIMPORT ULONG __cdecl strtoul(const char *, char **, int);
40974095
PALIMPORT ULONGLONG __cdecl strtoull(const char *, char **, int);
@@ -4103,8 +4101,6 @@ PALIMPORT int __cdecl isalpha(int);
41034101
PALIMPORT int __cdecl isalnum(int);
41044102
PALIMPORT int __cdecl isdigit(int);
41054103
PALIMPORT int __cdecl isxdigit(int);
4106-
PALIMPORT int __cdecl isupper(int);
4107-
PALIMPORT int __cdecl islower(int);
41084104
PALIMPORT int __cdecl tolower(int);
41094105
PALIMPORT int __cdecl toupper(int);
41104106
PALIMPORT int __cdecl iswalpha(wint_t);

src/coreclr/pal/src/include/pal/palinternal.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -178,18 +178,14 @@ function_name() to call the system's implementation
178178
#define strcat DUMMY_strcat
179179
#define strncat DUMMY_strncat
180180
#define strcpy DUMMY_strcpy
181-
#define strcspn DUMMY_strcspn
182181
#define strncmp DUMMY_strncmp
183182
#define strncpy DUMMY_strncpy
184183
#define strchr DUMMY_strchr
185184
#define strrchr DUMMY_strrchr
186185
#define strpbrk DUMMY_strpbrk
187186
#define strtod DUMMY_strtod
188-
#define strspn DUMMY_strspn
189187
#define tolower DUMMY_tolower
190188
#define toupper DUMMY_toupper
191-
#define islower DUMMY_islower
192-
#define isupper DUMMY_isupper
193189
#define isprint DUMMY_isprint
194190
#define isdigit DUMMY_isdigit
195191
#define iswalpha DUMMY_iswalpha
@@ -368,7 +364,6 @@ function_name() to call the system's implementation
368364
#undef strstr
369365
#undef strcmp
370366
#undef strcat
371-
#undef strcspn
372367
#undef strncat
373368
#undef strcpy
374369
#undef strncmp
@@ -379,13 +374,10 @@ function_name() to call the system's implementation
379374
#undef strtoul
380375
#undef strtoull
381376
#undef strtod
382-
#undef strspn
383377
#undef strtok
384378
#undef strdup
385379
#undef tolower
386380
#undef toupper
387-
#undef islower
388-
#undef isupper
389381
#undef isprint
390382
#undef isdigit
391383
#undef isspace

src/coreclr/pal/tests/palsuite/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,9 @@ add_executable_clr(paltests
174174
c_runtime/isalnum/test1/test1.cpp
175175
c_runtime/isalpha/test1/test1.cpp
176176
c_runtime/isdigit/test1/test1.cpp
177-
c_runtime/islower/test1/test1.cpp
178177
c_runtime/isprint/test1/isprint.cpp
179178
c_runtime/isprint/test2/test2.cpp
180179
c_runtime/isspace/test1/test1.cpp
181-
c_runtime/isupper/test1/test1.cpp
182180
c_runtime/iswdigit/test1/test1.cpp
183181
#c_runtime/iswprint/test1/test1.cpp
184182
c_runtime/iswspace/test1/test1.cpp
@@ -272,14 +270,12 @@ add_executable_clr(paltests
272270
c_runtime/strchr/test1/test1.cpp
273271
c_runtime/strcmp/test1/test1.cpp
274272
c_runtime/strcpy/test1/test1.cpp
275-
c_runtime/strcspn/test1/test1.cpp
276273
c_runtime/strlen/test1/test1.cpp
277274
c_runtime/strncat/test1/test1.cpp
278275
c_runtime/strncmp/test1/test1.cpp
279276
c_runtime/strncpy/test1/test1.cpp
280277
c_runtime/strpbrk/test1/test1.cpp
281278
c_runtime/strrchr/test1/test1.cpp
282-
c_runtime/strspn/test1/test1.cpp
283279
c_runtime/strstr/test1/test1.cpp
284280
c_runtime/strtod/test1/test1.cpp
285281
c_runtime/strtod/test2/test2.cpp

src/coreclr/pal/tests/palsuite/c_runtime/islower/test1/test1.cpp

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

src/coreclr/pal/tests/palsuite/c_runtime/isupper/test1/test1.cpp

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

0 commit comments

Comments
 (0)