Skip to content

Commit 913e745

Browse files
MichalStrehovskyjkotas
authored andcommitted
Delete unicode API emulator (dotnet#24581)
1 parent 7761871 commit 913e745

File tree

14 files changed

+39
-15451
lines changed

14 files changed

+39
-15451
lines changed

src/ToolBox/SOS/Strike/strike.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#endif
2424

2525
#ifdef PAL_STDCPP_COMPAT
26-
#define _iswprint PAL_iswprint
2726
#define _wcslen PAL_wcslen
2827
#define _wcsncmp PAL_wcsncmp
2928
#define _wcsrchr PAL_wcsrchr
@@ -33,7 +32,6 @@
3332
#define _wcscat PAL_wcscat
3433
#define _wcsstr PAL_wcsstr
3534
#else // PAL_STDCPP_COMPAT
36-
#define _iswprint iswprint
3735
#define _wcslen wcslen
3836
#define _wcsncmp wcsncmp
3937
#define _wcsrchr wcsrchr

src/ToolBox/SOS/Strike/util.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ PIMAGEHLP_SYMBOL sym = (PIMAGEHLP_SYMBOL) symBuffer;
4646
#include <sys/stat.h>
4747
#include <coreruncommon.h>
4848
#include <dlfcn.h>
49+
#include <wctype.h>
4950
#endif // !FEATURE_PAL
5051

5152
#include <coreclrhost.h>
@@ -3827,7 +3828,7 @@ void StringObjectContent(size_t obj, BOOL fLiteral, const int length)
38273828
ULONG j,k=0;
38283829
for (j = 0; j < wcharsRead; j ++)
38293830
{
3830-
if (_iswprint (buffer[j])) {
3831+
if (iswprint (buffer[j])) {
38313832
out[k] = buffer[j];
38323833
k ++;
38333834
}

src/dlls/mscordac/mscordac_unixexports.src

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ nativeStringResourceTable_mscorrc_debug
4646
#PAL_IsDebuggerPresent
4747
#PAL_ProbeMemory
4848
#PAL_Random
49-
#PAL_iswspace
5049
#PAL_memcpy
5150
#PAL_malloc
5251
#PAL_realloc
@@ -56,7 +55,6 @@ nativeStringResourceTable_mscorrc_debug
5655
#PAL_fprintf
5756
#PAL__wcstoui64
5857
#PAL_wcstoul
59-
#PAL_iswprint
6058
#PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange
6159
#PAL_VirtualUnwindOutOfProc
6260
#PAL_wcslen

src/pal/inc/pal.h

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -332,16 +332,6 @@ typedef long time_t;
332332
#define _TIME_T_DEFINED
333333
#endif // !PAL_STDCPP_COMPAT
334334

335-
#define C1_UPPER 0x0001 /* upper case */
336-
#define C1_LOWER 0x0002 /* lower case */
337-
#define C1_DIGIT 0x0004 /* decimal digits */
338-
#define C1_SPACE 0x0008 /* spacing characters */
339-
#define C1_PUNCT 0x0010 /* punctuation characters */
340-
#define C1_CNTRL 0x0020 /* control characters */
341-
#define C1_BLANK 0x0040 /* blank characters */
342-
#define C1_XDIGIT 0x0080 /* other digits */
343-
#define C1_ALPHA 0x0100 /* any linguistic character */
344-
345335
#define DLL_PROCESS_ATTACH 1
346336
#define DLL_THREAD_ATTACH 2
347337
#define DLL_THREAD_DETACH 3
@@ -4085,14 +4075,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
40854075
#define wcsncpy PAL_wcsncpy
40864076
#define wcstok PAL_wcstok
40874077
#define wcscspn PAL_wcscspn
4088-
#define iswprint PAL_iswprint
4089-
#define iswalpha PAL_iswalpha
4090-
#define iswdigit PAL_iswdigit
4091-
#define iswspace PAL_iswspace
4092-
#define iswupper PAL_iswupper
4093-
#define iswxdigit PAL_iswxdigit
4094-
#define towlower PAL_towlower
4095-
#define towupper PAL_towupper
40964078
#define realloc PAL_realloc
40974079
#define fopen PAL_fopen
40984080
#define strtok PAL_strtok
@@ -4193,6 +4175,12 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
41934175

41944176
typedef int errno_t;
41954177

4178+
#if defined(__WINT_TYPE__)
4179+
typedef __WINT_TYPE__ wint_t;
4180+
#else
4181+
typedef unsigned int wint_t;
4182+
#endif
4183+
41964184
#ifndef PAL_STDCPP_COMPAT
41974185

41984186
typedef struct {
@@ -4260,7 +4248,14 @@ PALIMPORT int __cdecl isupper(int);
42604248
PALIMPORT int __cdecl islower(int);
42614249
PALIMPORT int __cdecl tolower(int);
42624250
PALIMPORT int __cdecl toupper(int);
4263-
4251+
PALIMPORT int __cdecl iswalpha(wint_t);
4252+
PALIMPORT int __cdecl iswdigit(wint_t);
4253+
PALIMPORT int __cdecl iswupper(wint_t);
4254+
PALIMPORT int __cdecl iswprint(wint_t);
4255+
PALIMPORT int __cdecl iswspace(wint_t);
4256+
PALIMPORT int __cdecl iswxdigit(wint_t);
4257+
PALIMPORT wint_t __cdecl towupper(wint_t);
4258+
PALIMPORT wint_t __cdecl towlower(wint_t);
42644259
#endif // PAL_STDCPP_COMPAT
42654260

42664261
/* _TRUNCATE */
@@ -4312,14 +4307,6 @@ PALIMPORT LONG __cdecl PAL_wcstol(const WCHAR *, WCHAR **, int);
43124307
PALIMPORT DLLEXPORT ULONG __cdecl PAL_wcstoul(const WCHAR *, WCHAR **, int);
43134308
PALIMPORT size_t __cdecl PAL_wcsspn (const WCHAR *, const WCHAR *);
43144309
PALIMPORT double __cdecl PAL_wcstod(const WCHAR *, WCHAR **);
4315-
PALIMPORT int __cdecl PAL_iswalpha(WCHAR);
4316-
PALIMPORT DLLEXPORT int __cdecl PAL_iswprint(WCHAR);
4317-
PALIMPORT int __cdecl PAL_iswupper(WCHAR);
4318-
PALIMPORT DLLEXPORT int __cdecl PAL_iswspace(WCHAR);
4319-
PALIMPORT int __cdecl PAL_iswdigit(WCHAR);
4320-
PALIMPORT int __cdecl PAL_iswxdigit(WCHAR);
4321-
PALIMPORT WCHAR __cdecl PAL_towlower(WCHAR);
4322-
PALIMPORT WCHAR __cdecl PAL_towupper(WCHAR);
43234310

43244311
PALIMPORT WCHAR * __cdecl _wcslwr(WCHAR *);
43254312
PALIMPORT DLLEXPORT ULONGLONG _wcstoui64(const WCHAR *, WCHAR **, int);

src/pal/src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ set(SOURCES
212212
loader/module.cpp
213213
loader/modulename.cpp
214214
locale/unicode.cpp
215-
locale/unicode_data.cpp
216215
locale/utf8.cpp
217216
map/common.cpp
218217
map/map.cpp

0 commit comments

Comments
 (0)