msvcrt: Don't include MSVC 7.0+ miscellaneous functions in SOs for older DLLs.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2018-01-06 22:05:31 -07:00 committed by Alexandre Julliard
parent 031f2ab64f
commit 6413d96b6b
6 changed files with 44 additions and 8 deletions

View file

@ -321,6 +321,7 @@ void CDECL __security_error_handler(int code, void *data)
MSVCRT__exit(3);
}
#if _MSVCR_VER>=110
/*********************************************************************
* __crtSetUnhandledExceptionFilter (MSVCR110.@)
*/
@ -328,6 +329,7 @@ LPTOP_LEVEL_EXCEPTION_FILTER CDECL MSVCR110__crtSetUnhandledExceptionFilter(LPTO
{
return SetUnhandledExceptionFilter(filter);
}
#endif
/*********************************************************************
* _CreateFrameInfo (MSVCR80.@)

View file

@ -185,6 +185,7 @@ int CDECL MSVCRT____mb_cur_max_func(void)
return get_locinfo()->mb_cur_max;
}
#if _MSVCR_VER>=80
/*********************************************************************
* ___mb_cur_max_l_func (MSVCR80.@)
*/
@ -199,6 +200,7 @@ int* CDECL ___mb_cur_max_l_func(MSVCRT__locale_t locale)
return &locinfo->mb_cur_max;
}
#endif
/*********************************************************************
* INTERNAL: _setmbcp_l

View file

@ -426,8 +426,10 @@ int CDECL MSVCRT__resetstkoflw(void)
return VirtualProtect(&stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, &oldprot);
}
#if _MSVCR_VER>=80
/*********************************************************************
* _decode_pointer (MSVCR90.@)
* _decode_pointer (MSVCR80.@)
*/
void * CDECL MSVCRT_decode_pointer(void * ptr)
{
@ -435,7 +437,7 @@ void * CDECL MSVCRT_decode_pointer(void * ptr)
}
/*********************************************************************
* _encode_pointer (MSVCR90.@)
* _encode_pointer (MSVCR80.@)
*/
void * CDECL MSVCRT_encode_pointer(void * ptr)
{
@ -443,7 +445,7 @@ void * CDECL MSVCRT_encode_pointer(void * ptr)
}
/*********************************************************************
* _encoded_null (MSVCR100.@)
* _encoded_null (MSVCR80.@)
*/
void * CDECL _encoded_null(void)
{
@ -452,8 +454,12 @@ void * CDECL _encoded_null(void)
return EncodePointer(NULL);
}
#endif /* _MSVCR_VER>=80 */
#if _MSVCR_VER>=70
/*********************************************************************
* _CRT_RTC_INIT (MSVCR100.@)
* _CRT_RTC_INIT (MSVCR70.@)
*/
void* CDECL _CRT_RTC_INIT(void *unk1, void *unk2, int unk3, int unk4, int unk5)
{
@ -462,7 +468,7 @@ void* CDECL _CRT_RTC_INIT(void *unk1, void *unk2, int unk3, int unk4, int unk5)
}
/*********************************************************************
* _CRT_RTC_INITW (MSVCR100.@)
* _CRT_RTC_INITW (MSVCR70.@)
*/
void* CDECL _CRT_RTC_INITW(void *unk1, void *unk2, int unk3, int unk4, int unk5)
{
@ -470,8 +476,12 @@ void* CDECL _CRT_RTC_INITW(void *unk1, void *unk2, int unk3, int unk4, int unk5)
return NULL;
}
#endif /* _MSVCR_VER>=70 */
#if _MSVCR_VER>=80
/*********************************************************************
* _byteswap_ushort (MSVCR100.@)
* _byteswap_ushort (MSVCR80.@)
*/
unsigned short CDECL _byteswap_ushort(unsigned short s)
{
@ -479,7 +489,7 @@ unsigned short CDECL _byteswap_ushort(unsigned short s)
}
/*********************************************************************
* _byteswap_ulong (MSVCR100.@)
* _byteswap_ulong (MSVCR80.@)
*/
ULONG CDECL MSVCRT__byteswap_ulong(ULONG l)
{
@ -487,7 +497,7 @@ ULONG CDECL MSVCRT__byteswap_ulong(ULONG l)
}
/*********************************************************************
* _byteswap_uint64 (MSVCR100.@)
* _byteswap_uint64 (MSVCR80.@)
*/
unsigned __int64 CDECL _byteswap_uint64(unsigned __int64 i)
{
@ -495,6 +505,10 @@ unsigned __int64 CDECL _byteswap_uint64(unsigned __int64 i)
((i>>8)&0xFF000000) + ((i>>24)&0xFF0000) + ((i>>40)&0xFF00) + (i>>56);
}
#endif /* _MSVCR_VER>=80 */
#if _MSVCR_VER>=110
/*********************************************************************
* __crtGetShowWindowMode (MSVCR110.@)
*/
@ -517,6 +531,9 @@ BOOL CDECL MSVCR110__crtInitializeCriticalSectionEx(
return InitializeCriticalSectionEx(cs, spin_count, flags);
}
#endif /* _MSVCR_VER>=110 */
#if _MSVCR_VER>=120
/*********************************************************************
* _vacopy (MSVCR120.@)
*/
@ -524,7 +541,9 @@ void CDECL MSVCR120__vacopy(__ms_va_list *dest, __ms_va_list src)
{
__ms_va_copy(*dest, src);
}
#endif
#if _MSVCR_VER>=80
/*********************************************************************
* _crt_debugger_hook (MSVCR80.@)
*/
@ -532,7 +551,9 @@ void CDECL MSVCRT__crt_debugger_hook(int reserved)
{
WARN("(%x)\n", reserved);
}
#endif
#if _MSVCR_VER>=110
/*********************************************************************
* __crtUnhandledException (MSVCR110.@)
*/
@ -542,7 +563,9 @@ LONG CDECL MSVCRT__crtUnhandledException(EXCEPTION_POINTERS *ep)
SetUnhandledExceptionFilter(NULL);
return UnhandledExceptionFilter(ep);
}
#endif
#if _MSVCR_VER>=120
/*********************************************************************
* __crtSleep (MSVCR120.@)
*/
@ -551,3 +574,4 @@ void CDECL MSVCRT__crtSleep(DWORD timeout)
TRACE("(%u)\n", timeout);
Sleep(timeout);
}
#endif

View file

@ -1325,6 +1325,7 @@ int CDECL _getpid(void)
return GetCurrentProcessId();
}
#if _MSVCR_VER>=110
/*********************************************************************
* __crtTerminateProcess (MSVCR110.@)
*/
@ -1332,3 +1333,4 @@ int CDECL MSVCR110__crtTerminateProcess(UINT exit_code)
{
return TerminateProcess(GetCurrentProcess(), exit_code);
}
#endif

View file

@ -164,6 +164,7 @@ MSVCRT_uintptr_t CDECL _beginthreadex(
initflag, thrdaddr);
}
#if _MSVCR_VER>=80
/*********************************************************************
* _getptd (MSVCR80.@)
*/
@ -172,3 +173,4 @@ thread_data_t* CDECL _getptd(void)
FIXME("returns undocumented/not fully filled data\n");
return msvcrt_get_thread_data();
}
#endif

View file

@ -40,6 +40,8 @@ static BOOL n_format_enabled = TRUE;
#include "printf.h"
#undef PRINTF_WIDE
#if _MSVCR_VER>=80
/*********************************************************************
* _get_printf_count_output (MSVCR80.@)
*/
@ -58,6 +60,8 @@ int CDECL MSVCRT__set_printf_count_output( int enable )
return old ? 1 : 0;
}
#endif /* _MSVCR_VER>=80 */
/*********************************************************************
* _wcsdup (MSVCRT.@)
*/