summaryrefslogtreecommitdiff
path: root/src/pal/src/safecrt
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/src/safecrt')
-rw-r--r--src/pal/src/safecrt/input.inl4
-rw-r--r--src/pal/src/safecrt/makepath_s.cpp (renamed from src/pal/src/safecrt/makepath_s.c)0
-rw-r--r--src/pal/src/safecrt/mbusafecrt.cpp (renamed from src/pal/src/safecrt/mbusafecrt.c)11
-rw-r--r--src/pal/src/safecrt/memcpy_s.cpp (renamed from src/pal/src/safecrt/memcpy_s.c)0
-rw-r--r--src/pal/src/safecrt/memmove_s.cpp (renamed from src/pal/src/safecrt/memmove_s.c)0
-rw-r--r--src/pal/src/safecrt/output.inl39
-rw-r--r--src/pal/src/safecrt/safecrt_input_s.cpp (renamed from src/pal/src/safecrt/safecrt_input_s.c)0
-rw-r--r--src/pal/src/safecrt/safecrt_output_l.cpp (renamed from src/pal/src/safecrt/safecrt_output_l.c)0
-rw-r--r--src/pal/src/safecrt/safecrt_output_s.cpp (renamed from src/pal/src/safecrt/safecrt_output_s.c)0
-rw-r--r--src/pal/src/safecrt/safecrt_winput_s.cpp (renamed from src/pal/src/safecrt/safecrt_winput_s.c)0
-rw-r--r--src/pal/src/safecrt/safecrt_woutput_s.cpp (renamed from src/pal/src/safecrt/safecrt_woutput_s.c)0
-rw-r--r--src/pal/src/safecrt/snprintf.cpp (renamed from src/pal/src/safecrt/snprintf.c)2
-rw-r--r--src/pal/src/safecrt/splitpath_s.cpp (renamed from src/pal/src/safecrt/splitpath_s.c)0
-rw-r--r--src/pal/src/safecrt/sprintf_s.cpp (renamed from src/pal/src/safecrt/sprintf.c)12
-rw-r--r--src/pal/src/safecrt/sscanf_s.cpp (renamed from src/pal/src/safecrt/sscanf.c)4
-rw-r--r--src/pal/src/safecrt/strcat_s.cpp (renamed from src/pal/src/safecrt/strcat_s.c)0
-rw-r--r--src/pal/src/safecrt/strcpy_s.cpp (renamed from src/pal/src/safecrt/strcpy_s.c)0
-rw-r--r--src/pal/src/safecrt/strlen_s.cpp (renamed from src/pal/src/safecrt/strlen_s.c)2
-rw-r--r--src/pal/src/safecrt/strncat_s.cpp (renamed from src/pal/src/safecrt/strncat_s.c)0
-rw-r--r--src/pal/src/safecrt/strncpy_s.cpp (renamed from src/pal/src/safecrt/strncpy_s.c)0
-rw-r--r--src/pal/src/safecrt/strtok_s.cpp (renamed from src/pal/src/safecrt/strtok_s.c)0
-rw-r--r--src/pal/src/safecrt/swprintf.cpp (renamed from src/pal/src/safecrt/swprintf.c)2
-rw-r--r--src/pal/src/safecrt/vsprintf.cpp (renamed from src/pal/src/safecrt/vsprintf.c)2
-rw-r--r--src/pal/src/safecrt/vswprint.cpp (renamed from src/pal/src/safecrt/vswprint.c)83
-rw-r--r--src/pal/src/safecrt/wcscat_s.cpp (renamed from src/pal/src/safecrt/wcscat_s.c)0
-rw-r--r--src/pal/src/safecrt/wcscpy_s.cpp (renamed from src/pal/src/safecrt/wcscpy_s.c)0
-rw-r--r--src/pal/src/safecrt/wcslen_s.cpp (renamed from src/pal/src/safecrt/wcslen_s.c)0
-rw-r--r--src/pal/src/safecrt/wcsncat_s.cpp (renamed from src/pal/src/safecrt/wcsncat_s.c)0
-rw-r--r--src/pal/src/safecrt/wcsncpy_s.cpp (renamed from src/pal/src/safecrt/wcsncpy_s.c)0
-rw-r--r--src/pal/src/safecrt/wcstok_s.cpp (renamed from src/pal/src/safecrt/wcstok_s.c)0
-rw-r--r--src/pal/src/safecrt/wmakepath_s.cpp (renamed from src/pal/src/safecrt/wmakepath_s.c)0
-rw-r--r--src/pal/src/safecrt/wsplitpath_s.cpp (renamed from src/pal/src/safecrt/wsplitpath_s.c)0
-rw-r--r--src/pal/src/safecrt/xtoa_s.cpp (renamed from src/pal/src/safecrt/xtoa_s.c)0
-rw-r--r--src/pal/src/safecrt/xtow_s.cpp (renamed from src/pal/src/safecrt/xtow_s.c)0
-rw-r--r--src/pal/src/safecrt/xtox_s.inl29
35 files changed, 59 insertions, 131 deletions
diff --git a/src/pal/src/safecrt/input.inl b/src/pal/src/safecrt/input.inl
index eaad174ff5..25c4541029 100644
--- a/src/pal/src/safecrt/input.inl
+++ b/src/pal/src/safecrt/input.inl
@@ -671,7 +671,7 @@ scanit:
#endif /* _SECURE_SCANF */
#ifndef _UNICODE
if (fl_wchar_arg) {
- wctemp = L'?';
+ wctemp = W('?');
char temp[2];
temp[0] = (char) ch;
#if 0 // we are not supporting multibyte input strings
@@ -682,7 +682,7 @@ scanit:
#endif /* 0 */
_MBTOWC(&wctemp, temp, MB_CUR_MAX);
*(wchar_t UNALIGNED *)pointer = wctemp;
- /* just copy L'?' if mbtowc fails, errno is set by mbtowc */
+ /* just copy W('?') if mbtowc fails, errno is set by mbtowc */
pointer = (wchar_t *)pointer + 1;
#ifdef _SECURE_SCANF
--array_width;
diff --git a/src/pal/src/safecrt/makepath_s.c b/src/pal/src/safecrt/makepath_s.cpp
index 4342685b9c..4342685b9c 100644
--- a/src/pal/src/safecrt/makepath_s.c
+++ b/src/pal/src/safecrt/makepath_s.cpp
diff --git a/src/pal/src/safecrt/mbusafecrt.c b/src/pal/src/safecrt/mbusafecrt.cpp
index ca853d9269..4446f77fd1 100644
--- a/src/pal/src/safecrt/mbusafecrt.c
+++ b/src/pal/src/safecrt/mbusafecrt.cpp
@@ -147,14 +147,11 @@ int _ungetwc_nolock( wchar_t inChar, miniFILE* inStream )
/***
* _safecrt_cfltcvt - convert a float to an ascii string.
-* Uses sprintf - this usage is OK.
****/
/* routine used for floating-point output */
#define FORMATSIZE 30
-#define _snprintf snprintf
-
// taken from output.inl
#define FL_ALTERNATE 0x00080 /* alternate form requested */
@@ -181,7 +178,7 @@ errno_t _safecrt_cfltcvt(double *arg, char *buffer, size_t sizeInBytes, int type
format[formatlen] = 0;
buffer[sizeInBytes - 1] = 0;
- retvalue = _snprintf(buffer, sizeInBytes, format, *arg);
+ retvalue = snprintf(buffer, sizeInBytes, format, *arg);
if (buffer[sizeInBytes - 1] != 0 || retvalue <= 0)
{
buffer[0] = 0;
@@ -199,14 +196,12 @@ void _safecrt_fassign(int flag, void* argument, char* number )
{
if ( flag != 0 ) // double
{
- double dblValue = 0.0;
- (void)sscanf( number, "%lf", &dblValue );
+ double dblValue = strtod(number, NULL);
*( ( double* )argument ) = dblValue;
}
else // float
{
- float fltValue = 0.0;
- (void)sscanf( number, "%f", &fltValue );
+ float fltValue = strtof(number, NULL);
*( ( float* )argument ) = fltValue;
}
}
diff --git a/src/pal/src/safecrt/memcpy_s.c b/src/pal/src/safecrt/memcpy_s.cpp
index 27aeb79665..27aeb79665 100644
--- a/src/pal/src/safecrt/memcpy_s.c
+++ b/src/pal/src/safecrt/memcpy_s.cpp
diff --git a/src/pal/src/safecrt/memmove_s.c b/src/pal/src/safecrt/memmove_s.cpp
index a0ae5f7ea6..a0ae5f7ea6 100644
--- a/src/pal/src/safecrt/memmove_s.c
+++ b/src/pal/src/safecrt/memmove_s.cpp
diff --git a/src/pal/src/safecrt/output.inl b/src/pal/src/safecrt/output.inl
index ae0692efc5..5b86cf2c96 100644
--- a/src/pal/src/safecrt/output.inl
+++ b/src/pal/src/safecrt/output.inl
@@ -857,6 +857,12 @@ int __cdecl _output (
flags |= FL_LONG; /* 'l' => long int or wchar_t */
}
break;
+ case _T('L'):
+ if (*format == _T('p'))
+ {
+ flags |= FL_LONG;
+ }
+ break;
case _T('I'):
/*
@@ -956,7 +962,11 @@ int __cdecl _output (
#else /* _UNICODE */
if (flags & (FL_LONG|FL_WIDECHAR)) {
wchar = (wchar_t) get_int_arg(&argptr);
- no_output = 1;
+ textlen = snprintf(buffer.sz, BUFFERSIZE, "%lc", wchar);
+ if (textlen == 0)
+ {
+ no_output = 1;
+ }
} else {
/* format multibyte character */
/* this is an extension of ANSI */
@@ -1172,7 +1182,15 @@ int __cdecl _output (
precision = 2 * sizeof(void *); /* number of hex digits needed */
#if PTR_IS_INT64
- flags |= FL_I64; /* assume we're converting an int64 */
+ if (flags & (FL_LONG | FL_SHORT))
+ {
+ /* %lp, %Lp or %hp - these print 8 hex digits*/
+ precision = 2 * sizeof(int32_t);
+ }
+ else
+ {
+ flags |= FL_I64; /* assume we're converting an int64 */
+ }
#elif !PTR_IS_INT
flags |= FL_LONG; /* assume we're converting a long */
#endif /* !PTR_IS_INT */
@@ -1371,7 +1389,22 @@ int __cdecl _output (
/* write text */
#ifndef _UNICODE
if (bufferiswide && (textlen > 0)) {
- charsout = -1;
+ const WCHAR *p;
+ int mbCharCount;
+ int count;
+ char mbStr[5];
+
+ p = text.wz;
+ count = textlen;
+ while (count-- > 0) {
+ mbCharCount = snprintf(mbStr, sizeof(mbStr), "%lc", *p);
+ if (mbCharCount == 0) {
+ charsout = -1;
+ break;
+ }
+ WRITE_STRING(mbStr, mbCharCount, &charsout);
+ p++;
+ }
} else {
WRITE_STRING(text.sz, textlen, &charsout);
}
diff --git a/src/pal/src/safecrt/safecrt_input_s.c b/src/pal/src/safecrt/safecrt_input_s.cpp
index 6ba607c669..6ba607c669 100644
--- a/src/pal/src/safecrt/safecrt_input_s.c
+++ b/src/pal/src/safecrt/safecrt_input_s.cpp
diff --git a/src/pal/src/safecrt/safecrt_output_l.c b/src/pal/src/safecrt/safecrt_output_l.cpp
index d6844f4f8b..d6844f4f8b 100644
--- a/src/pal/src/safecrt/safecrt_output_l.c
+++ b/src/pal/src/safecrt/safecrt_output_l.cpp
diff --git a/src/pal/src/safecrt/safecrt_output_s.c b/src/pal/src/safecrt/safecrt_output_s.cpp
index c3e7f91404..c3e7f91404 100644
--- a/src/pal/src/safecrt/safecrt_output_s.c
+++ b/src/pal/src/safecrt/safecrt_output_s.cpp
diff --git a/src/pal/src/safecrt/safecrt_winput_s.c b/src/pal/src/safecrt/safecrt_winput_s.cpp
index 17a621781b..17a621781b 100644
--- a/src/pal/src/safecrt/safecrt_winput_s.c
+++ b/src/pal/src/safecrt/safecrt_winput_s.cpp
diff --git a/src/pal/src/safecrt/safecrt_woutput_s.c b/src/pal/src/safecrt/safecrt_woutput_s.cpp
index 52fe9400d5..52fe9400d5 100644
--- a/src/pal/src/safecrt/safecrt_woutput_s.c
+++ b/src/pal/src/safecrt/safecrt_woutput_s.cpp
diff --git a/src/pal/src/safecrt/snprintf.c b/src/pal/src/safecrt/snprintf.cpp
index c892d1a9b6..dea87167b9 100644
--- a/src/pal/src/safecrt/snprintf.c
+++ b/src/pal/src/safecrt/snprintf.cpp
@@ -8,7 +8,7 @@
*
*Purpose:
-* The _snprintf() flavor takes a count argument that is
+* The sprintf_s() flavor takes a count argument that is
* the max number of bytes that should be written to the
* user's buffer.
*
diff --git a/src/pal/src/safecrt/splitpath_s.c b/src/pal/src/safecrt/splitpath_s.cpp
index cb8a364550..cb8a364550 100644
--- a/src/pal/src/safecrt/splitpath_s.c
+++ b/src/pal/src/safecrt/splitpath_s.cpp
diff --git a/src/pal/src/safecrt/sprintf.c b/src/pal/src/safecrt/sprintf_s.cpp
index 5454179f8d..edfb768670 100644
--- a/src/pal/src/safecrt/sprintf.c
+++ b/src/pal/src/safecrt/sprintf_s.cpp
@@ -3,12 +3,12 @@
// See the LICENSE file in the project root for more information.
/***
-*sprintf.c - print formatted to string
+*sprintf_s.c - print formatted to string
*
*
*Purpose:
-* defines sprintf() and _snprintf() - print formatted data to string
+* defines sprintf_s() and _snprintf_s() - print formatted data to string
*
*******************************************************************************/
@@ -22,9 +22,9 @@
/***
*ifndef _COUNT_
-*int sprintf(string, format, ...) - print formatted data to string
+*int sprintf_s(string, format, ...) - print formatted data to string
*else
-*int _snprintf(string, cnt, format, ...) - print formatted data to string
+*int _snprintf_s(string, cnt, format, ...) - print formatted data to string
*endif
*
*Purpose:
@@ -40,7 +40,7 @@
* entries are in are in DGROUP and, thus, are near.
*
*ifdef _COUNT_
-* The _snprintf() flavor takes a count argument that is
+* The _snprintf_s() flavor takes a count argument that is
* the max number of bytes that should be written to the
* user's buffer.
*endif
@@ -76,7 +76,7 @@ int sprintf_s (
int ret;
va_list arglist;
va_start(arglist, format);
- ret = _vsprintf_s(string, sizeInBytes, format, arglist);
+ ret = vsprintf_s(string, sizeInBytes, format, arglist);
va_end(arglist);
return ret;
}
diff --git a/src/pal/src/safecrt/sscanf.c b/src/pal/src/safecrt/sscanf_s.cpp
index 94b5148875..4f548bccc6 100644
--- a/src/pal/src/safecrt/sscanf.c
+++ b/src/pal/src/safecrt/sscanf_s.cpp
@@ -3,7 +3,7 @@
// See the LICENSE file in the project root for more information.
/***
-*sscanf.c - read formatted data from string
+*sscanf_s.c - read formatted data from string
*
*
@@ -20,7 +20,7 @@
#include "mbusafecrt_internal.h"
typedef int (*INPUTFN)(miniFILE *, const unsigned char*, va_list);
-typedef int (*WINPUTFN)(miniFILE *, const unsigned short*, va_list);
+typedef int (*WINPUTFN)(miniFILE *, const wchar_t*, va_list);
/***
diff --git a/src/pal/src/safecrt/strcat_s.c b/src/pal/src/safecrt/strcat_s.cpp
index 4dc2332006..4dc2332006 100644
--- a/src/pal/src/safecrt/strcat_s.c
+++ b/src/pal/src/safecrt/strcat_s.cpp
diff --git a/src/pal/src/safecrt/strcpy_s.c b/src/pal/src/safecrt/strcpy_s.cpp
index 821dbe85f6..821dbe85f6 100644
--- a/src/pal/src/safecrt/strcpy_s.c
+++ b/src/pal/src/safecrt/strcpy_s.cpp
diff --git a/src/pal/src/safecrt/strlen_s.c b/src/pal/src/safecrt/strlen_s.cpp
index 34c1308d5c..3f1e1cf1ae 100644
--- a/src/pal/src/safecrt/strlen_s.c
+++ b/src/pal/src/safecrt/strlen_s.cpp
@@ -42,7 +42,7 @@
*
*******************************************************************************/
-size_t __cdecl strnlen(const char *str, size_t maxsize)
+size_t __cdecl PAL_strnlen(const char *str, size_t maxsize)
{
size_t n;
diff --git a/src/pal/src/safecrt/strncat_s.c b/src/pal/src/safecrt/strncat_s.cpp
index ef8c6cfc7f..ef8c6cfc7f 100644
--- a/src/pal/src/safecrt/strncat_s.c
+++ b/src/pal/src/safecrt/strncat_s.cpp
diff --git a/src/pal/src/safecrt/strncpy_s.c b/src/pal/src/safecrt/strncpy_s.cpp
index f819ebb6bb..f819ebb6bb 100644
--- a/src/pal/src/safecrt/strncpy_s.c
+++ b/src/pal/src/safecrt/strncpy_s.cpp
diff --git a/src/pal/src/safecrt/strtok_s.c b/src/pal/src/safecrt/strtok_s.cpp
index 6f1c80633f..6f1c80633f 100644
--- a/src/pal/src/safecrt/strtok_s.c
+++ b/src/pal/src/safecrt/strtok_s.cpp
diff --git a/src/pal/src/safecrt/swprintf.c b/src/pal/src/safecrt/swprintf.cpp
index 75004eafe2..2fbfcfaf58 100644
--- a/src/pal/src/safecrt/swprintf.c
+++ b/src/pal/src/safecrt/swprintf.cpp
@@ -92,7 +92,7 @@ int __cdecl swprintf_s (
va_start(arglist, format);
- ret = _vswprintf_s(string, sizeInWords, format, arglist);
+ ret = vswprintf_s(string, sizeInWords, format, arglist);
va_end(arglist);
diff --git a/src/pal/src/safecrt/vsprintf.c b/src/pal/src/safecrt/vsprintf.cpp
index 4f2bd9fdeb..e1a94d086d 100644
--- a/src/pal/src/safecrt/vsprintf.c
+++ b/src/pal/src/safecrt/vsprintf.cpp
@@ -119,7 +119,7 @@ int __cdecl _vsnprintf_helper (
return -1;
}
-int __cdecl _vsprintf_s (
+int __cdecl vsprintf_s (
char *string,
size_t sizeInBytes,
const char *format,
diff --git a/src/pal/src/safecrt/vswprint.c b/src/pal/src/safecrt/vswprint.cpp
index 77c79b8752..b9940a693a 100644
--- a/src/pal/src/safecrt/vswprint.c
+++ b/src/pal/src/safecrt/vswprint.cpp
@@ -6,7 +6,7 @@
*vswprint.c - print formatted data into a string from var arg list
*
*Purpose:
-* defines vswprintf(), _vswprintf_c and _vsnwprintf() - print formatted output to
+* defines vswprintf_s() and _vsnwprintf_s() - print formatted output to
* a string, get the data from an argument ptr instead of explicit
* arguments.
*
@@ -23,19 +23,10 @@
typedef int (*WOUTPUTFN)(miniFILE *, const wchar_t *, va_list);
static int _vswprintf_helper( WOUTPUTFN outfn, wchar_t *string, size_t count, const wchar_t *format, va_list ap );
-static int _vscwprintf_helper (WOUTPUTFN outfn, const wchar_t *format, va_list ap );
/***
-*ifndef _COUNT_
-*int _vswprintf(string, format, ap) - print formatted data to string from arg ptr
-*else
-*ifndef _SWPRINTFS_ERROR_RETURN_FIX
-*int _vsnwprintf(string, cnt, format, ap) - print formatted data to string from arg ptr
-*else
-*int _vswprintf_c(string, cnt, format, ...) - print formatted data to string
-*endif
-*endif
-*
+*int vswprintf_s(string, sizeInWords, format, ap) - print formatted data to string from arg ptr
+*int _vsnwprintf_s(string, sizeInWords, cnt, format, ap) - print formatted data to string from arg ptr
*Purpose:
* Prints formatted data, but to a string and gets data from an argument
* pointer.
@@ -47,21 +38,10 @@ static int _vscwprintf_helper (WOUTPUTFN outfn, const wchar_t *format, va_list a
* the stack so that other routines can assume that _iob[] entries are in
* are in DGROUP and, thus, are near.
*
-*ifdef _COUNT_
-*ifndef _SWPRINTFS_ERROR_RETURN_FIX
-* The _vsnwprintf() flavor takes a count argument that is
+* The _vsnwprintf_s() flavor takes a count argument that is
* the max number of bytes that should be written to the
* user's buffer.
* We don't expose this function directly in the headers.
-*else
-* The _vswprintf_c() flavor does the same thing as the _snwprintf
-* above, but, it also fixes an issue in the return value in the case
-* when there isn't enough space to write the null terminator
-* We don't fix this issue in _vsnwprintf because of backward
-* compatibility. In new code, however, _vsnwprintf is #defined to
-* _vswprintf_c so users get the fix.
-*
-*endif
*
* Multi-thread: (1) Since there is no stream, this routine must never try
* to get the stream lock (i.e., there is no stream lock either). (2)
@@ -70,9 +50,8 @@ static int _vscwprintf_helper (WOUTPUTFN outfn, const wchar_t *format, va_list a
*
*Entry:
* wchar_t *string - place to put destination string
-*ifdef _COUNT_
+* size_t sizeInWords - size of the string buffer in wchar_t units
* size_t count - max number of bytes to put in buffer
-*endif
* wchar_t *format - format string, describes format of data
* va_list ap - varargs argument pointer
*
@@ -133,7 +112,7 @@ int __cdecl _vswprintf_helper (
return -1;
}
-int __cdecl _vswprintf_s (
+int __cdecl vswprintf_s (
wchar_t *string,
size_t sizeInWords,
const wchar_t *format,
@@ -230,53 +209,3 @@ int __cdecl _vsnwprintf_s (
return (retvalue < 0 ? -1 : retvalue);
}
-
-/***
-* _vscwprintf() - counts the number of character needed to print the formatted
-* data
-*
-*Purpose:
-* Counts the number of characters in the fotmatted data.
-*
-*Entry:
-* wchar_t *format - format string, describes format of data
-* va_list ap - varargs argument pointer
-*
-*Exit:
-* returns number of characters needed to print formatted data.
-*
-*Exceptions:
-*
-*******************************************************************************/
-
-#ifndef _COUNT_
-
-int __cdecl _vscwprintf_helper (
- WOUTPUTFN woutfn,
- const wchar_t *format,
- va_list ap
- )
-{
- miniFILE str;
- miniFILE *outfile = &str;
- int retval;
-
- _VALIDATE_RETURN( (format != NULL), EINVAL, -1);
-
- outfile->_cnt = INT_MAX; //MAXSTR;
- outfile->_flag = _IOWRT|_IOSTRG;
- outfile->_ptr = outfile->_base = NULL;
-
- retval = woutfn(outfile, format, ap);
- return(retval);
-}
-
-int __cdecl _vscwprintf (
- const wchar_t *format,
- va_list ap
- )
-{
- return _vscwprintf_helper(_woutput_s, format, ap);
-}
-
-#endif /* _COUNT_ */
diff --git a/src/pal/src/safecrt/wcscat_s.c b/src/pal/src/safecrt/wcscat_s.cpp
index 06179888ff..06179888ff 100644
--- a/src/pal/src/safecrt/wcscat_s.c
+++ b/src/pal/src/safecrt/wcscat_s.cpp
diff --git a/src/pal/src/safecrt/wcscpy_s.c b/src/pal/src/safecrt/wcscpy_s.cpp
index 4c60a81489..4c60a81489 100644
--- a/src/pal/src/safecrt/wcscpy_s.c
+++ b/src/pal/src/safecrt/wcscpy_s.cpp
diff --git a/src/pal/src/safecrt/wcslen_s.c b/src/pal/src/safecrt/wcslen_s.cpp
index 4fd5371035..4fd5371035 100644
--- a/src/pal/src/safecrt/wcslen_s.c
+++ b/src/pal/src/safecrt/wcslen_s.cpp
diff --git a/src/pal/src/safecrt/wcsncat_s.c b/src/pal/src/safecrt/wcsncat_s.cpp
index 1ff39d55f3..1ff39d55f3 100644
--- a/src/pal/src/safecrt/wcsncat_s.c
+++ b/src/pal/src/safecrt/wcsncat_s.cpp
diff --git a/src/pal/src/safecrt/wcsncpy_s.c b/src/pal/src/safecrt/wcsncpy_s.cpp
index 7902ded43a..7902ded43a 100644
--- a/src/pal/src/safecrt/wcsncpy_s.c
+++ b/src/pal/src/safecrt/wcsncpy_s.cpp
diff --git a/src/pal/src/safecrt/wcstok_s.c b/src/pal/src/safecrt/wcstok_s.cpp
index c99b30c773..c99b30c773 100644
--- a/src/pal/src/safecrt/wcstok_s.c
+++ b/src/pal/src/safecrt/wcstok_s.cpp
diff --git a/src/pal/src/safecrt/wmakepath_s.c b/src/pal/src/safecrt/wmakepath_s.cpp
index 35ab7d386e..35ab7d386e 100644
--- a/src/pal/src/safecrt/wmakepath_s.c
+++ b/src/pal/src/safecrt/wmakepath_s.cpp
diff --git a/src/pal/src/safecrt/wsplitpath_s.c b/src/pal/src/safecrt/wsplitpath_s.cpp
index c7fb107803..c7fb107803 100644
--- a/src/pal/src/safecrt/wsplitpath_s.c
+++ b/src/pal/src/safecrt/wsplitpath_s.cpp
diff --git a/src/pal/src/safecrt/xtoa_s.c b/src/pal/src/safecrt/xtoa_s.cpp
index 42cc5786d1..42cc5786d1 100644
--- a/src/pal/src/safecrt/xtoa_s.c
+++ b/src/pal/src/safecrt/xtoa_s.cpp
diff --git a/src/pal/src/safecrt/xtow_s.c b/src/pal/src/safecrt/xtow_s.cpp
index 7a02424c85..7a02424c85 100644
--- a/src/pal/src/safecrt/xtow_s.c
+++ b/src/pal/src/safecrt/xtow_s.cpp
diff --git a/src/pal/src/safecrt/xtox_s.inl b/src/pal/src/safecrt/xtox_s.inl
index e07d87adf5..7c8b2f2fd6 100644
--- a/src/pal/src/safecrt/xtox_s.inl
+++ b/src/pal/src/safecrt/xtox_s.inl
@@ -21,12 +21,9 @@
#define _i64tox_s _i64tow_s
#define _ui64tox_s _ui64tow_s
#define xtox xtow
-#define _itox _itow
#define _ltox _ltow
#define _ultox _ultow
#define x64tox x64tow
-#define _i64tox _i64tow
-#define _ui64tox _ui64tow
#else /* _UNICODE */
#define xtox_s xtoa_s
#define _itox_s _itoa_s
@@ -36,12 +33,9 @@
#define _i64tox_s _i64toa_s
#define _ui64tox_s _ui64toa_s
#define xtox xtoa
-#define _itox _itoa
#define _ltox _ltoa
#define _ultox _ultoa
#define x64tox x64toa
-#define _i64tox _i64toa
-#define _ui64tox _ui64toa
#endif /* _UNICODE */
/***
@@ -224,19 +218,6 @@ errno_t __cdecl _ultox_s (
/* Actual functions just call conversion helper with neg flag set correctly,
and return pointer to buffer. */
-TCHAR * __cdecl _itox (
- int val,
- TCHAR *buf,
- int radix
- )
-{
- if (radix == 10 && val < 0)
- xtox((unsigned long)val, buf, radix, 1);
- else
- xtox((unsigned long)(unsigned int)val, buf, radix, 0);
- return buf;
-}
-
TCHAR * __cdecl _ltox (
long val,
TCHAR *buf,
@@ -425,16 +406,6 @@ errno_t __cdecl _ui64tox_s (
/* Actual functions just call conversion helper with neg flag set correctly,
and return pointer to buffer. */
-TCHAR * __cdecl _i64tox (
- __int64 val,
- TCHAR *buf,
- int radix
- )
-{
- x64tox((unsigned __int64)val, buf, radix, (radix == 10 && val < 0));
- return buf;
-}
-
TCHAR * __cdecl _ui64tox (
unsigned __int64 val,
TCHAR *buf,