Skip to content

Commit 2f366a8

Browse files
authored
Delete a few unused PAL APIs (#63916)
* Delete _fullpath PAL API * Delete PAL_wcscspn * Delete PAL_wcstok
1 parent 207590a commit 2f366a8

14 files changed

Lines changed: 49 additions & 468 deletions

File tree

src/coreclr/dlls/mscordac/mscordac_unixexports.src

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ nativeStringResourceTable_mscorrc
6565
#PAL_wcsrchr
6666
#PAL_wcscmp
6767
#PAL_wcschr
68-
#PAL_wcscspn
6968
#PAL_wcscat
7069
#PAL_wcsstr
7170
#PAL__open

src/coreclr/pal/inc/pal.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,8 +3934,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
39343934
#define wcspbrk PAL_wcspbrk
39353935
#define wcscmp PAL_wcscmp
39363936
#define wcsncpy PAL_wcsncpy
3937-
#define wcstok PAL_wcstok
3938-
#define wcscspn PAL_wcscspn
39393937
#define realloc PAL_realloc
39403938
#define fopen PAL_fopen
39413939
#define strtok PAL_strtok
@@ -4125,8 +4123,6 @@ PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcschr(const WCHAR *, WCHAR);
41254123
PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR);
41264124
PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcspbrk(const WCHAR *, const WCHAR *);
41274125
PALIMPORT DLLEXPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *);
4128-
PALIMPORT WCHAR * __cdecl PAL_wcstok(WCHAR *, const WCHAR *);
4129-
PALIMPORT DLLEXPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *);
41304126
PALIMPORT int __cdecl PAL_swprintf(WCHAR *, const WCHAR *, ...);
41314127
PALIMPORT int __cdecl PAL_vswprintf(WCHAR *, const WCHAR *, va_list);
41324128
PALIMPORT int __cdecl PAL_swscanf(const WCHAR *, const WCHAR *, ...);

src/coreclr/pal/inc/palprivate.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ CompareFileTime(
203203
IN CONST FILETIME *lpFileTime1,
204204
IN CONST FILETIME *lpFileTime2);
205205

206-
PALIMPORT char * __cdecl _fullpath(char *, const char *, size_t);
207-
208206
/* These are from the <FCNTL.H> file in windows.
209207
They are needed for _open_osfhandle.*/
210208
#define _O_RDONLY 0x0000

src/coreclr/pal/src/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,13 @@ set(SOURCES
123123
cruntime/malloc.cpp
124124
cruntime/math.cpp
125125
cruntime/misc.cpp
126-
cruntime/path.cpp
127126
cruntime/printf.cpp
128127
cruntime/printfcpp.cpp
129128
cruntime/silent_printf.cpp
130129
cruntime/string.cpp
131130
cruntime/stringtls.cpp
132131
cruntime/thread.cpp
133132
cruntime/wchar.cpp
134-
cruntime/wchartls.cpp
135133
debug/debug.cpp
136134
exception/seh.cpp
137135
exception/signal.cpp

src/coreclr/pal/src/cruntime/path.cpp

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

src/coreclr/pal/src/cruntime/wchar.cpp

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
/*++
55
6-
7-
86
Module Name:
97
108
wchar.c
@@ -13,19 +11,15 @@ Module Name:
1311
1412
Implementation of wide char string functions.
1513
16-
17-
1814
--*/
1915

20-
2116
#include "pal/palinternal.h"
2217
#include "pal/cruntime.h"
2318
#include "pal/dbgmsg.h"
2419

2520
#include "pal/thread.hpp"
2621
#include "pal/threadsusp.hpp"
2722

28-
2923
#if HAVE_CONFIG_H
3024
#include "config.h"
3125
#endif
@@ -950,46 +944,3 @@ PAL_wcstod( const wchar_16 * nptr, wchar_16 **endptr )
950944
PERF_EXIT(wcstod);
951945
return RetVal;
952946
}
953-
954-
/*++
955-
Function:
956-
PAL_wcscspn
957-
958-
Finds the number of consecutive characters from the start of the string
959-
that are not in the set.
960-
961-
Return value:
962-
963-
The number of characters from the start of the string that are not in
964-
the set.
965-
966-
Parameters:
967-
string String
968-
strCharSet Set of delimiter characters
969-
970-
--*/
971-
size_t
972-
__cdecl
973-
PAL_wcscspn(const wchar_16 *string, const wchar_16 *strCharSet)
974-
{
975-
const wchar_16 *temp;
976-
size_t count = 0;
977-
978-
PERF_ENTRY(wcscspn);
979-
980-
while(*string != 0)
981-
{
982-
for(temp = strCharSet; *temp != 0; temp++)
983-
{
984-
if (*string == *temp)
985-
{
986-
PERF_EXIT(wcscspn);
987-
return count;
988-
}
989-
}
990-
count++;
991-
string++;
992-
}
993-
PERF_EXIT(wcscspn);
994-
return count;
995-
}

src/coreclr/pal/src/cruntime/wchartls.cpp

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,6 @@ function_name() to call the system's implementation
526526
#undef wcsstr
527527
#undef wcscmp
528528
#undef wcsncpy
529-
#undef wcstok
530-
#undef wcscspn
531529
#undef iswupper
532530
#undef iswspace
533531
#undef towlower

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ add_executable_clr(paltests
415415
c_runtime/wcsstr/test1/test1.cpp
416416
c_runtime/wcstod/test1/test1.cpp
417417
c_runtime/wcstod/test2/test2.cpp
418-
c_runtime/wcstok/test1/test1.cpp
419418
c_runtime/wcstoul/test1/test1.cpp
420419
c_runtime/wcstoul/test2/test2.cpp
421420
c_runtime/wcstoul/test3/test3.cpp

0 commit comments

Comments
 (0)