Skip to content

Commit a274767

Browse files
authored
Cleanup some unused code in coreclr pal (#122733)
1 parent 7ea8631 commit a274767

28 files changed

+7
-965
lines changed

src/coreclr/pal/inc/mbusafecrt.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,11 @@
33

44
/***
55
* mbusafecrt.h - public declarations for SafeCRT lib
6-
*
7-
86
*
97
* Purpose:
108
* This file contains the public declarations SafeCRT
119
* functions ported to MacOS. These are the safe versions of
1210
* functions standard functions banned by SWI
13-
*
14-
1511
****/
1612

1713
/* shields! */
@@ -34,9 +30,6 @@ typedef int errno_t;
3430
extern "C" {
3531
#endif
3632

37-
typedef void ( *tSafeCRT_AssertFuncPtr )( const char* inExpression, const char* inComment, const char* inFile, const unsigned long inLineNum );
38-
void MBUSafeCRTSetAssertFunc( tSafeCRT_AssertFuncPtr inAssertFuncPtr );
39-
4033
extern errno_t strcat_s( char* ioDest, size_t inDestBufferSize, const char* inSrc );
4134
extern errno_t wcscat_s( WCHAR* ioDest, size_t inDestBufferSize, const WCHAR* inSrc );
4235

@@ -48,15 +41,11 @@ extern errno_t wcscpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* i
4841

4942
extern errno_t strncpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc, size_t inCount );
5043
extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount );
51-
extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount );
5244

5345
extern size_t PAL_wcsnlen( const WCHAR* inString, size_t inMaxSize );
5446

55-
extern errno_t _makepath_s( char* outDest, size_t inDestBufferSize, const char* inDrive, const char* inDirectory, const char* inFilename, const char* inExtension );
5647
extern errno_t _wmakepath_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inDrive, const WCHAR* inDirectory, const WCHAR* inFilename, const WCHAR* inExtension );
5748

58-
extern errno_t _splitpath_s( const char* inPath, char* outDrive, size_t inDriveSize, char* outDirectory, size_t inDirectorySize, char* outFilename, size_t inFilenameSize, char* outExtension, size_t inExtensionSize );
59-
6049
extern int sprintf_s( char *string, size_t sizeInBytes, const char *format, ... );
6150

6251
extern int _snprintf_s( char *string, size_t sizeInBytes, size_t count, const char *format, ... );
@@ -65,7 +54,6 @@ extern int vsprintf_s( char* string, size_t sizeInBytes, const char* format, va_
6554
extern int _vsnprintf_s( char* string, size_t sizeInBytes, size_t count, const char* format, va_list arglist );
6655

6756
extern int sscanf_s( const char *string, const char *format, ... );
68-
extern int swscanf_s( const WCHAR *string, const WCHAR *format, ... );
6957

7058
extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count );
7159
extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count );

src/coreclr/pal/inc/pal.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
/*++
5-
65
Module Name:
7-
86
pal.h
97
108
Abstract:
11-
129
CoreCLR Platform Adaptation Layer (PAL) header file. This file
1310
defines all types and API calls required by the CoreCLR when
1411
compiled for Unix-like systems.
@@ -27,7 +24,6 @@ Module Name:
2724
2825
If you want to add a PAL_ wrapper function to a native function in
2926
here, you also need to edit palinternal.h and win32pal.h.
30-
3127
--*/
3228

3329
#ifndef __PAL_H__
@@ -3446,16 +3442,6 @@ PALAPI
34463442
GetSystemInfo(
34473443
OUT LPSYSTEM_INFO lpSystemInfo);
34483444

3449-
PALIMPORT
3450-
BOOL
3451-
PALAPI
3452-
PAL_SetCurrentThreadAffinity(WORD procNo);
3453-
3454-
PALIMPORT
3455-
BOOL
3456-
PALAPI
3457-
PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
3458-
34593445
//
34603446
// The types of events that can be logged.
34613447
//

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
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-
//
43

54
//
65
/***
@@ -9,7 +8,6 @@
98
*Purpose:
109
* This file contains a subset of the Secure CRT. It is meant to
1110
* be used in the Windows source tree.
12-
*
1311
****/
1412

1513
/* #pragma once */
@@ -355,7 +353,6 @@ void __cdecl _invalid_parameter(const WCHAR *_Message, const WCHAR *_FunctionNam
355353
#define _tmakepath_s _wmakepath_s
356354
#define _stprintf_s swprintf_s
357355
#define _tscanf_s wscanf_s
358-
#define _tsscanf_s swscanf_s
359356

360357
#else
361358

@@ -1266,14 +1263,6 @@ int __cdecl wscanf_s(const WCHAR *_Format, ...);
12661263

12671264
/* no inline version of wscanf_s */
12681265

1269-
/* swscanf_s */
1270-
_SAFECRT__EXTERN_C
1271-
int __cdecl swscanf_s(const WCHAR *_String, const WCHAR *_Format, ...);
1272-
1273-
/* no C++ overload for swscanf_s */
1274-
1275-
/* no inline version of swscanf_s */
1276-
12771266
/* _swnscanf_s */
12781267
_SAFECRT__EXTERN_C
12791268
int __cdecl _swnscanf_s(const WCHAR *_String, size_t _Count, const WCHAR *_Format, ...);

src/coreclr/pal/src/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,13 +176,11 @@ set(SOURCES
176176
objmgr/palobjbase.cpp
177177
objmgr/listedobject.cpp
178178
objmgr/listedobjectmanager.cpp
179-
safecrt/makepath_s.cpp
180179
safecrt/memcpy_s.cpp
181180
safecrt/memmove_s.cpp
182181
safecrt/mbusafecrt.cpp
183182
safecrt/safecrt_input_s.cpp
184183
safecrt/safecrt_winput_s.cpp
185-
safecrt/splitpath_s.cpp
186184
safecrt/sprintf_s.cpp
187185
safecrt/sscanf_s.cpp
188186
safecrt/strcat_s.cpp

src/coreclr/pal/src/safecrt/cruntime.h

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

0 commit comments

Comments
 (0)