@@ -42,6 +42,7 @@ Module Name:
4242#include < stdarg.h>
4343#include < stdint.h>
4444#include < string.h>
45+ #include < strings.h>
4546#include < errno.h>
4647#include < ctype.h>
4748#include < sys/stat.h>
@@ -3982,8 +3983,6 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
39823983#define exit PAL_exit
39833984#define realloc PAL_realloc
39843985#define fopen PAL_fopen
3985- #define strtoul PAL_strtoul
3986- #define strtoull PAL_strtoull
39873986#define fprintf PAL_fprintf
39883987#define vfprintf PAL_vfprintf
39893988#define rand PAL_rand
@@ -4023,12 +4022,10 @@ PAL_GetCurrentThreadAffinitySet(SIZE_T size, UINT_PTR* data);
40234022#define sincosf PAL_sincosf
40244023#define malloc PAL_malloc
40254024#define free PAL_free
4026- #define _strdup PAL__strdup
40274025#define _open PAL__open
40284026#define _pread PAL__pread
40294027#define _close PAL__close
40304028#define _flushall PAL__flushall
4031- #define strnlen PAL_strnlen
40324029
40334030#ifdef HOST_AMD64
40344031#define _mm_getcsr PAL__mm_getcsr
@@ -4073,7 +4070,7 @@ PALIMPORT long long int __cdecl atoll(const char *) MATH_THROW_DECL;
40734070PALIMPORT size_t __cdecl strlen (const char *);
40744071PALIMPORT int __cdecl strcmp (const char *, const char *);
40754072PALIMPORT int __cdecl strncmp (const char *, const char *, size_t );
4076- PALIMPORT int __cdecl _strnicmp (const char *, const char *, size_t );
4073+ PALIMPORT int __cdecl strncasecmp (const char *, const char *, size_t );
40774074PALIMPORT char * __cdecl strcat (char *, const char *);
40784075PALIMPORT char * __cdecl strncat (char *, const char *, size_t );
40794076PALIMPORT char * __cdecl strcpy (char *, const char *);
@@ -4083,11 +4080,13 @@ PALIMPORT char * __cdecl strrchr(const char *, int);
40834080PALIMPORT char * __cdecl strpbrk (const char *, const char *);
40844081PALIMPORT char * __cdecl strstr (const char *, const char *);
40854082PALIMPORT char * __cdecl strtok_r (char *, const char *, char **);
4083+ PALIMPORT char * __cdecl strdup (const char *);
40864084PALIMPORT int __cdecl atoi (const char *);
4087- PALIMPORT ULONG __cdecl strtoul (const char *, char **, int );
4085+ PALIMPORT unsigned long __cdecl strtoul (const char *, char **, int );
40884086PALIMPORT ULONGLONG __cdecl strtoull (const char *, char **, int );
40894087PALIMPORT double __cdecl atof (const char *);
40904088PALIMPORT double __cdecl strtod (const char *, char **);
4089+ PALIMPORT size_t strnlen (const char *, size_t );
40914090PALIMPORT int __cdecl isprint (int );
40924091PALIMPORT int __cdecl isspace (int );
40934092PALIMPORT int __cdecl isalpha (int );
@@ -4114,7 +4113,7 @@ PALIMPORT int remove(const char*);
41144113
41154114PALIMPORT DLLEXPORT errno_t __cdecl memcpy_s (void *, size_t , const void *, size_t ) THROW_DECL;
41164115PALIMPORT errno_t __cdecl memmove_s (void *, size_t , const void *, size_t );
4117- PALIMPORT DLLEXPORT int __cdecl _stricmp (const char *, const char *);
4116+ PALIMPORT DLLEXPORT int __cdecl strcasecmp (const char *, const char *);
41184117PALIMPORT char * __cdecl _gcvt_s (char *, int , double , int );
41194118PALIMPORT int __cdecl __iscsym (int );
41204119PALIMPORT DLLEXPORT int __cdecl _wcsicmp (const WCHAR *, const WCHAR*);
@@ -4144,6 +4143,21 @@ PALIMPORT errno_t __cdecl _wcslwr_s(WCHAR *, size_t sz);
41444143PALIMPORT DLLEXPORT errno_t __cdecl _i64tow_s (long long , WCHAR *, size_t , int );
41454144PALIMPORT int __cdecl _wtoi (const WCHAR *);
41464145
4146+ inline int _stricmp (const char * a, const char * b)
4147+ {
4148+ return strcasecmp (a, b);
4149+ }
4150+
4151+ inline int _strnicmp (const char * a, const char * b, size_t c)
4152+ {
4153+ return strncasecmp (a, b, c);
4154+ }
4155+
4156+ inline char * _strdup (const char * a)
4157+ {
4158+ return strdup (a);
4159+ }
4160+
41474161#ifdef __cplusplus
41484162extern " C++" {
41494163inline WCHAR *PAL_wcschr (WCHAR* S, WCHAR C)
@@ -4297,7 +4311,6 @@ inline __int64 abs(SSIZE_T _X) {
42974311PALIMPORT DLLEXPORT void * __cdecl malloc (size_t );
42984312PALIMPORT DLLEXPORT void __cdecl free (void *);
42994313PALIMPORT DLLEXPORT void * __cdecl realloc (void *, size_t );
4300- PALIMPORT char * __cdecl _strdup (const char *);
43014314
43024315#if defined(_MSC_VER)
43034316#define alloca _alloca
0 commit comments