Skip to content

Commit

Permalink
Delete a few unused PAL APIs (#63916)
Browse files Browse the repository at this point in the history
* Delete _fullpath PAL API

* Delete PAL_wcscspn

* Delete PAL_wcstok
  • Loading branch information
am11 authored Jan 18, 2022
1 parent 207590a commit 2f366a8
Show file tree
Hide file tree
Showing 14 changed files with 49 additions and 468 deletions.
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscordac/mscordac_unixexports.src
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ nativeStringResourceTable_mscorrc
#PAL_wcsrchr
#PAL_wcscmp
#PAL_wcschr
#PAL_wcscspn
#PAL_wcscat
#PAL_wcsstr
#PAL__open
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -3934,8 +3934,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
#define wcspbrk PAL_wcspbrk
#define wcscmp PAL_wcscmp
#define wcsncpy PAL_wcsncpy
#define wcstok PAL_wcstok
#define wcscspn PAL_wcscspn
#define realloc PAL_realloc
#define fopen PAL_fopen
#define strtok PAL_strtok
Expand Down Expand Up @@ -4125,8 +4123,6 @@ PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcschr(const WCHAR *, WCHAR);
PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR);
PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcspbrk(const WCHAR *, const WCHAR *);
PALIMPORT DLLEXPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *);
PALIMPORT WCHAR * __cdecl PAL_wcstok(WCHAR *, const WCHAR *);
PALIMPORT DLLEXPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *);
PALIMPORT int __cdecl PAL_swprintf(WCHAR *, const WCHAR *, ...);
PALIMPORT int __cdecl PAL_vswprintf(WCHAR *, const WCHAR *, va_list);
PALIMPORT int __cdecl PAL_swscanf(const WCHAR *, const WCHAR *, ...);
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/pal/inc/palprivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ CompareFileTime(
IN CONST FILETIME *lpFileTime1,
IN CONST FILETIME *lpFileTime2);

PALIMPORT char * __cdecl _fullpath(char *, const char *, size_t);

/* These are from the <FCNTL.H> file in windows.
They are needed for _open_osfhandle.*/
#define _O_RDONLY 0x0000
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,13 @@ set(SOURCES
cruntime/malloc.cpp
cruntime/math.cpp
cruntime/misc.cpp
cruntime/path.cpp
cruntime/printf.cpp
cruntime/printfcpp.cpp
cruntime/silent_printf.cpp
cruntime/string.cpp
cruntime/stringtls.cpp
cruntime/thread.cpp
cruntime/wchar.cpp
cruntime/wchartls.cpp
debug/debug.cpp
exception/seh.cpp
exception/signal.cpp
Expand Down
113 changes: 0 additions & 113 deletions src/coreclr/pal/src/cruntime/path.cpp

This file was deleted.

49 changes: 0 additions & 49 deletions src/coreclr/pal/src/cruntime/wchar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

/*++
Module Name:
wchar.c
Expand All @@ -13,19 +11,15 @@ Module Name:
Implementation of wide char string functions.
--*/


#include "pal/palinternal.h"
#include "pal/cruntime.h"
#include "pal/dbgmsg.h"

#include "pal/thread.hpp"
#include "pal/threadsusp.hpp"


#if HAVE_CONFIG_H
#include "config.h"
#endif
Expand Down Expand Up @@ -950,46 +944,3 @@ PAL_wcstod( const wchar_16 * nptr, wchar_16 **endptr )
PERF_EXIT(wcstod);
return RetVal;
}

/*++
Function:
PAL_wcscspn
Finds the number of consecutive characters from the start of the string
that are not in the set.
Return value:
The number of characters from the start of the string that are not in
the set.
Parameters:
string String
strCharSet Set of delimiter characters
--*/
size_t
__cdecl
PAL_wcscspn(const wchar_16 *string, const wchar_16 *strCharSet)
{
const wchar_16 *temp;
size_t count = 0;

PERF_ENTRY(wcscspn);

while(*string != 0)
{
for(temp = strCharSet; *temp != 0; temp++)
{
if (*string == *temp)
{
PERF_EXIT(wcscspn);
return count;
}
}
count++;
string++;
}
PERF_EXIT(wcscspn);
return count;
}
125 changes: 0 additions & 125 deletions src/coreclr/pal/src/cruntime/wchartls.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions src/coreclr/pal/src/include/pal/palinternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,6 @@ function_name() to call the system's implementation
#undef wcsstr
#undef wcscmp
#undef wcsncpy
#undef wcstok
#undef wcscspn
#undef iswupper
#undef iswspace
#undef towlower
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/pal/tests/palsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ add_executable_clr(paltests
c_runtime/wcsstr/test1/test1.cpp
c_runtime/wcstod/test1/test1.cpp
c_runtime/wcstod/test2/test2.cpp
c_runtime/wcstok/test1/test1.cpp
c_runtime/wcstoul/test1/test1.cpp
c_runtime/wcstoul/test2/test2.cpp
c_runtime/wcstoul/test3/test3.cpp
Expand Down
Loading

0 comments on commit 2f366a8

Please sign in to comment.