Also removes __MINGW_MBWC_CONVERT_DEFINED. Signed-off-by: Zhongteng Gui <[email protected]> --- mingw-w64-headers/crt/corecrt_wstdio.h | 34 +++++++++++++++++++++ mingw-w64-headers/crt/stdio.h | 41 -------------------------- mingw-w64-headers/crt/wchar.h | 41 -------------------------- 3 files changed, 34 insertions(+), 82 deletions(-)
diff --git a/mingw-w64-headers/crt/corecrt_wstdio.h b/mingw-w64-headers/crt/corecrt_wstdio.h index 9e3b37a31..5bfd1e4e0 100644 --- a/mingw-w64-headers/crt/corecrt_wstdio.h +++ b/mingw-w64-headers/crt/corecrt_wstdio.h @@ -679,6 +679,40 @@ int vsnwprintf (wchar_t *__stream, size_t __n, const wchar_t *__format, __builti #define _getwc_nolock(_c) _fgetwc_nolock(_c) #endif +/** + * __mingw_str_wide_utf8 + * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. + * Caller is supposed to free allocated buffer with __mingw_str_free(). + * @param[in] wptr Pointer to wide string. + * @param[out] mbptr Pointer to multibyte string. + * @param[out] buflen Optional parameter for length of allocated buffer. + * @return bytes written by WideCharToMultiByte conversion, 0 for failure. + * + * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx + */ +int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); + +/** + * __mingw_str_utf8_wide + * Converts a null terminated UTF-8 string to a UCS-2 equivalent. + * Caller is supposed to free allocated buffer with __mingw_str_free(). + * @param[out] mbptr Pointer to multibyte string. + * @param[in] wptr Pointer to wide string. + * @param[out] buflen Optional parameter for length of allocated buffer. + * @return bytes written by WideCharToMultiByte conversion, 0 for failure. + * + * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx + */ +int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); + +/** + * __mingw_str_free + * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide. + * @param[in] ptr memory block to free. + * + */ +void __cdecl __mingw_str_free(void *ptr); + _CRT_END_C_HEADER #endif /* _INC_CORECRT_WSTDIO */ diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index fa30db3f7..58ccc14ab 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -897,47 +897,6 @@ int vsprintf (char * __restrict__ __stream, const char * __restrict__ __format, int __cdecl rmtmp(void) __MINGW_ATTRIB_DEPRECATED_MSVC2005; #endif -#ifndef __MINGW_MBWC_CONVERT_DEFINED -#define __MINGW_MBWC_CONVERT_DEFINED - -/** - * __mingw_str_wide_utf8 - * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. - * Caller is supposed to free allocated buffer with __mingw_str_free(). - * @param[in] wptr Pointer to wide string. - * @param[out] mbptr Pointer to multibyte string. - * @param[out] buflen Optional parameter for length of allocated buffer. - * @return Number of characters converted, 0 for failure. - * - * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx - */ -int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); - -/** - * __mingw_str_utf8_wide - * Converts a null terminated UTF-8 string to a UCS-2 equivalent. - * Caller is supposed to free allocated buffer with __mingw_str_free(). - * @param[out] mbptr Pointer to multibyte string. - * @param[in] wptr Pointer to wide string. - * @param[out] buflen Optional parameter for length of allocated buffer. - * @return Number of characters converted, 0 for failure. - * - * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx - */ - -int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); - -/** - * __mingw_str_free - * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide. - * @param[in] ptr memory block to free. - * - */ - -void __cdecl __mingw_str_free(void *ptr); - -#endif /* __MINGW_MBWC_CONVERT_DEFINED */ - #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP #ifndef _WSPAWN_DEFINED #define _WSPAWN_DEFINED diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h index ccd14fe6a..fb46183b5 100644 --- a/mingw-w64-headers/crt/wchar.h +++ b/mingw-w64-headers/crt/wchar.h @@ -264,47 +264,6 @@ _CRT_BEGIN_C_HEADER } #endif /* !__CRT__NO_INLINE */ -#ifndef __MINGW_MBWC_CONVERT_DEFINED -#define __MINGW_MBWC_CONVERT_DEFINED - -/** - * __mingw_str_wide_utf8 - * Converts a null terminated UCS-2 string to a multibyte (UTF-8) equivalent. - * Caller is supposed to free allocated buffer with __mingw_str_free(). - * @param[in] wptr Pointer to wide string. - * @param[out] mbptr Pointer to multibyte string. - * @param[out] buflen Optional parameter for length of allocated buffer. - * @return bytes written by WideCharToMultiByte conversion, 0 for failure. - * - * WideCharToMultiByte - http://msdn.microsoft.com/en-us/library/dd374130(VS.85).aspx - */ -int __cdecl __mingw_str_wide_utf8 (const wchar_t * const wptr, char **mbptr, size_t * buflen); - -/** - * __mingw_str_utf8_wide - * Converts a null terminated UTF-8 string to a UCS-2 equivalent. - * Caller is supposed to free allocated buffer with __mingw_str_free(). - * @param[out] mbptr Pointer to multibyte string. - * @param[in] wptr Pointer to wide string. - * @param[out] buflen Optional parameter for length of allocated buffer. - * @return bytes written by WideCharToMultiByte conversion, 0 for failure. - * - * MultiByteToWideChar - http://msdn.microsoft.com/en-us/library/dd319072(VS.85).aspx - */ - -int __cdecl __mingw_str_utf8_wide (const char *const mbptr, wchar_t ** wptr, size_t * buflen); - -/** - * __mingw_str_free - * Frees buffer create by __mingw_str_wide_utf8 and __mingw_str_utf8_wide. - * @param[in] ptr memory block to free. - * - */ - -void __cdecl __mingw_str_free(void *ptr); - -#endif /* __MINGW_MBWC_CONVERT_DEFINED */ - _CRT_END_C_HEADER #include <sec_api/wchar_s.h> -- 2.55.0.windows.4 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
