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

Alexandre Julliard julliard at winehq.org
Mon Jan 8 16:08:06 CST 2018


Module: wine
Branch: master
Commit: 6413d96b6b91db062b32e5fa62a25e6e5ef348a3
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6413d96b6b91db062b32e5fa62a25e6e5ef348a3

Author: Alex Henrie <alexhenrie24 at gmail.com>
Date:   Sat Jan  6 22:05:31 2018 -0700

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

Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/except.c  |  2 ++
 dlls/msvcrt/mbcs.c    |  2 ++
 dlls/msvcrt/misc.c    | 40 ++++++++++++++++++++++++++++++++--------
 dlls/msvcrt/process.c |  2 ++
 dlls/msvcrt/thread.c  |  2 ++
 dlls/msvcrt/wcs.c     |  4 ++++
 6 files changed, 44 insertions(+), 8 deletions(-)

diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index 18c2f15..8d13e7f 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -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.@)
diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c
index 6e46b84..7ca1906 100644
--- a/dlls/msvcrt/mbcs.c
+++ b/dlls/msvcrt/mbcs.c
@@ -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
diff --git a/dlls/msvcrt/misc.c b/dlls/msvcrt/misc.c
index b9dadac..d784dec 100644
--- a/dlls/msvcrt/misc.c
+++ b/dlls/msvcrt/misc.c
@@ -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
diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c
index 1a183bc..fac3bd4 100644
--- a/dlls/msvcrt/process.c
+++ b/dlls/msvcrt/process.c
@@ -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
diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c
index da1f8bf..af31534 100644
--- a/dlls/msvcrt/thread.c
+++ b/dlls/msvcrt/thread.c
@@ -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
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 1aa8d98..098e0d5 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -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.@)
  */




More information about the wine-cvs mailing list