Skip to content

Commit

Permalink
Delete unicode API emulator (dotnet#24581)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored and franksinankaya committed May 30, 2019
1 parent 20fced0 commit a40e5a3
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 15,451 deletions.
2 changes: 0 additions & 2 deletions src/ToolBox/SOS/Strike/strike.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#endif

#ifdef PAL_STDCPP_COMPAT
#define _iswprint PAL_iswprint
#define _wcslen PAL_wcslen
#define _wcsncmp PAL_wcsncmp
#define _wcsrchr PAL_wcsrchr
Expand All @@ -33,7 +32,6 @@
#define _wcscat PAL_wcscat
#define _wcsstr PAL_wcsstr
#else // PAL_STDCPP_COMPAT
#define _iswprint iswprint
#define _wcslen wcslen
#define _wcsncmp wcsncmp
#define _wcsrchr wcsrchr
Expand Down
3 changes: 2 additions & 1 deletion src/ToolBox/SOS/Strike/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ PIMAGEHLP_SYMBOL sym = (PIMAGEHLP_SYMBOL) symBuffer;
#include <sys/stat.h>
#include <coreruncommon.h>
#include <dlfcn.h>
#include <wctype.h>
#endif // !FEATURE_PAL

#include <coreclrhost.h>
Expand Down Expand Up @@ -3827,7 +3828,7 @@ void StringObjectContent(size_t obj, BOOL fLiteral, const int length)
ULONG j,k=0;
for (j = 0; j < wcharsRead; j ++)
{
if (_iswprint (buffer[j])) {
if (iswprint (buffer[j])) {
out[k] = buffer[j];
k ++;
}
Expand Down
2 changes: 0 additions & 2 deletions src/dlls/mscordac/mscordac_unixexports.src
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ nativeStringResourceTable_mscorrc_debug
#PAL_IsDebuggerPresent
#PAL_ProbeMemory
#PAL_Random
#PAL_iswspace
#PAL_memcpy
#PAL_malloc
#PAL_realloc
Expand All @@ -56,7 +55,6 @@ nativeStringResourceTable_mscorrc_debug
#PAL_fprintf
#PAL__wcstoui64
#PAL_wcstoul
#PAL_iswprint
#PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange
#PAL_VirtualUnwindOutOfProc
#PAL_wcslen
Expand Down
41 changes: 14 additions & 27 deletions src/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,6 @@ typedef long time_t;
#define _TIME_T_DEFINED
#endif // !PAL_STDCPP_COMPAT

#define C1_UPPER 0x0001 /* upper case */
#define C1_LOWER 0x0002 /* lower case */
#define C1_DIGIT 0x0004 /* decimal digits */
#define C1_SPACE 0x0008 /* spacing characters */
#define C1_PUNCT 0x0010 /* punctuation characters */
#define C1_CNTRL 0x0020 /* control characters */
#define C1_BLANK 0x0040 /* blank characters */
#define C1_XDIGIT 0x0080 /* other digits */
#define C1_ALPHA 0x0100 /* any linguistic character */

#define DLL_PROCESS_ATTACH 1
#define DLL_THREAD_ATTACH 2
#define DLL_THREAD_DETACH 3
Expand Down Expand Up @@ -4085,14 +4075,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
#define wcsncpy PAL_wcsncpy
#define wcstok PAL_wcstok
#define wcscspn PAL_wcscspn
#define iswprint PAL_iswprint
#define iswalpha PAL_iswalpha
#define iswdigit PAL_iswdigit
#define iswspace PAL_iswspace
#define iswupper PAL_iswupper
#define iswxdigit PAL_iswxdigit
#define towlower PAL_towlower
#define towupper PAL_towupper
#define realloc PAL_realloc
#define fopen PAL_fopen
#define strtok PAL_strtok
Expand Down Expand Up @@ -4193,6 +4175,12 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);

typedef int errno_t;

#if defined(__WINT_TYPE__)
typedef __WINT_TYPE__ wint_t;
#else
typedef unsigned int wint_t;
#endif

#ifndef PAL_STDCPP_COMPAT

typedef struct {
Expand Down Expand Up @@ -4260,7 +4248,14 @@ PALIMPORT int __cdecl isupper(int);
PALIMPORT int __cdecl islower(int);
PALIMPORT int __cdecl tolower(int);
PALIMPORT int __cdecl toupper(int);

PALIMPORT int __cdecl iswalpha(wint_t);
PALIMPORT int __cdecl iswdigit(wint_t);
PALIMPORT int __cdecl iswupper(wint_t);
PALIMPORT int __cdecl iswprint(wint_t);
PALIMPORT int __cdecl iswspace(wint_t);
PALIMPORT int __cdecl iswxdigit(wint_t);
PALIMPORT wint_t __cdecl towupper(wint_t);
PALIMPORT wint_t __cdecl towlower(wint_t);
#endif // PAL_STDCPP_COMPAT

/* _TRUNCATE */
Expand Down Expand Up @@ -4312,14 +4307,6 @@ PALIMPORT LONG __cdecl PAL_wcstol(const WCHAR *, WCHAR **, int);
PALIMPORT DLLEXPORT ULONG __cdecl PAL_wcstoul(const WCHAR *, WCHAR **, int);
PALIMPORT size_t __cdecl PAL_wcsspn (const WCHAR *, const WCHAR *);
PALIMPORT double __cdecl PAL_wcstod(const WCHAR *, WCHAR **);
PALIMPORT int __cdecl PAL_iswalpha(WCHAR);
PALIMPORT DLLEXPORT int __cdecl PAL_iswprint(WCHAR);
PALIMPORT int __cdecl PAL_iswupper(WCHAR);
PALIMPORT DLLEXPORT int __cdecl PAL_iswspace(WCHAR);
PALIMPORT int __cdecl PAL_iswdigit(WCHAR);
PALIMPORT int __cdecl PAL_iswxdigit(WCHAR);
PALIMPORT WCHAR __cdecl PAL_towlower(WCHAR);
PALIMPORT WCHAR __cdecl PAL_towupper(WCHAR);

PALIMPORT WCHAR * __cdecl _wcslwr(WCHAR *);
PALIMPORT DLLEXPORT ULONGLONG _wcstoui64(const WCHAR *, WCHAR **, int);
Expand Down
1 change: 0 additions & 1 deletion src/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ set(SOURCES
loader/module.cpp
loader/modulename.cpp
locale/unicode.cpp
locale/unicode_data.cpp
locale/utf8.cpp
map/common.cpp
map/map.cpp
Expand Down
Loading

0 comments on commit a40e5a3

Please sign in to comment.