Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/msvcrt/heap.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index ed41253304..7ea80a3a50 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -373,8 +373,9 @@ MSVCRT_size_t CDECL _msize(void* mem) return size; }
+#if _MSVCR_VER>=80 /********************************************************************* - * _aligned_msize (MSVCR100.@) + * _aligned_msize (MSVCR80.@) */ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offset) { @@ -388,6 +389,7 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs alloc_ptr = SAVED_PTR(p); return _msize(*alloc_ptr)-alignment-sizeof(void*); } +#endif
/********************************************************************* * calloc (MSVCRT.@) @@ -405,6 +407,7 @@ void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size) return msvcrt_heap_alloc(HEAP_ZERO_MEMORY, bytes); }
+#if _MSVCR_VER>=140 /********************************************************************* * _calloc_base (UCRTBASE.@) */ @@ -412,6 +415,7 @@ void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size) { return MSVCRT_calloc(count, size); } +#endif
/********************************************************************* * free (MSVCRT.@) @@ -421,6 +425,7 @@ void CDECL MSVCRT_free(void* ptr) msvcrt_heap_free(ptr); }
+#if _MSVCR_VER>=140 /********************************************************************* * _free_base (UCRTBASE.@) */ @@ -428,6 +433,7 @@ void CDECL _free_base(void* ptr) { msvcrt_heap_free(ptr); } +#endif
/********************************************************************* * malloc (MSVCRT.@) @@ -440,6 +446,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size) return ret; }
+#if _MSVCR_VER>=140 /********************************************************************* * _malloc_base (UCRTBASE.@) */ @@ -447,6 +454,7 @@ void* CDECL _malloc_base(MSVCRT_size_t size) { return MSVCRT_malloc(size); } +#endif
/********************************************************************* * realloc (MSVCRT.@) @@ -459,6 +467,7 @@ void* CDECL MSVCRT_realloc(void* ptr, MSVCRT_size_t size) return NULL; }
+#if _MSVCR_VER>=140 /********************************************************************* * _realloc_base (UCRTBASE.@) */ @@ -466,9 +475,11 @@ void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size) { return MSVCRT_realloc(ptr, size); } +#endif
+#if _MSVCR_VER>=80 /********************************************************************* - * _recalloc (MSVCR100.@) + * _recalloc (MSVCR80.@) */ void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size) { @@ -491,6 +502,7 @@ void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size) memset((BYTE*)ret+old_size, 0, size-old_size); return ret; } +#endif
/********************************************************************* * __p__amblksiz (MSVCRT.@) @@ -739,6 +751,7 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const voi return 0; }
+#if _MSVCR_VER>=100 /********************************************************************* * wmemmove_s (MSVCR100.@) */ @@ -761,6 +774,7 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); return 0; } +#endif
/********************************************************************* * memcpy_s (MSVCRT.@) @@ -788,6 +802,7 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void return 0; }
+#if _MSVCR_VER>=100 /********************************************************************* * wmemcpy_s (MSVCR100.@) */ @@ -813,6 +828,7 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, memcpy(dest, src, sizeof(MSVCRT_wchar_t)*count); return 0; } +#endif
/********************************************************************* * strncpy_s (MSVCRT.@)
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/msvcrt/ctype.c | 2 ++ dlls/msvcrt/scanf.c | 4 ++++ dlls/msvcrt/string.c | 8 ++++++++ dlls/msvcrt/wcs.c | 37 +++++++++++++++++++++++++++++++++---- 4 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c index e076d8976c..2c39a56686 100644 --- a/dlls/msvcrt/ctype.c +++ b/dlls/msvcrt/ctype.c @@ -469,6 +469,7 @@ int CDECL MSVCRT__tolower(int c) return c + 0x20; /* sic */ }
+#if _MSVCR_VER>=120 /********************************************************************* * wctype (MSVCR120.@) */ @@ -498,3 +499,4 @@ unsigned short __cdecl wctype(const char *property)
return 0; } +#endif diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c index 50ef168a45..09ddf2863f 100644 --- a/dlls/msvcrt/scanf.c +++ b/dlls/msvcrt/scanf.c @@ -796,6 +796,8 @@ int WINAPIV MSVCRT__snwscanf_s_l(MSVCRT_wchar_t *input, MSVCRT_size_t length, return res; }
+#if _MSVCR_VER>=120 + /********************************************************************* * vsscanf (MSVCRT120.@) */ @@ -815,3 +817,5 @@ int CDECL MSVCRT_vswscanf(const MSVCRT_wchar_t *buffer, const MSVCRT_wchar_t *fo
return MSVCRT_vswscanf_l(buffer, format, NULL, valist); } + +#endif /* _MSVCR_VER>=120 */ diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 234d72838d..2c05e37149 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -499,6 +499,8 @@ double CDECL MSVCRT_strtod( const char *str, char **end ) return MSVCRT_strtod_l( str, end, NULL ); }
+#if _MSVCR_VER>=120 + /********************************************************************* * strtof_l (MSVCR120.@) */ @@ -515,6 +517,8 @@ float CDECL MSVCRT_strtof( const char *str, char **end ) return MSVCRT__strtof_l(str, end, NULL); }
+#endif /* _MSVCR_VER>=120 */ + /********************************************************************* * atof (MSVCRT.@) */ @@ -1046,6 +1050,8 @@ int CDECL MSVCRT_atoi(const char *str) } #endif
+#if _MSVCR_VER>=120 + /****************************************************************** * _atoll_l (MSVCR120.@) */ @@ -1062,6 +1068,8 @@ MSVCRT_longlong CDECL MSVCRT_atoll(const char* str) return MSVCRT__atoll_l(str, NULL); }
+#endif /* if _MSVCR_VER>=120 */ + /****************************************************************** * _strtol_l (MSVCRT.@) */ diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 0c54800f5d..1aa8d98b12 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -664,6 +664,8 @@ double CDECL MSVCRT__wtof_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale) return MSVCRT__wcstod_l(str, NULL, locale); }
+#if _MSVCR_VER>=120 + /********************************************************************* * _wcstof_l (MSVCR120.@) */ @@ -680,6 +682,8 @@ float CDECL MSVCRT_wcstof( const MSVCRT_wchar_t *str, MSVCRT_wchar_t **end ) return MSVCRT__wcstof_l(str, end, NULL); }
+#endif /* _MSVCR_VER>=120 */ + /********************************************************************* * arg_clbk_valist (INTERNAL) */ @@ -728,6 +732,8 @@ int CDECL MSVCRT_vsnprintf( char *str, MSVCRT_size_t len, return ret; }
+#if _MSVCR_VER>=140 + static int puts_clbk_str_c99_a(void *ctx, int len, const char *str) { struct _str_ctx_a *out = ctx; @@ -775,6 +781,8 @@ int CDECL MSVCRT__stdio_common_vsprintf( unsigned __int64 options, char *str, MS return ret; }
+#endif /* _MSVCR_VER>=140 */ + /********************************************************************* * _vsnprintf_l (MSVCRT.@) */ @@ -919,6 +927,8 @@ int CDECL MSVCRT_vsnprintf_s( char *str, MSVCRT_size_t sizeOfBuffer, return MSVCRT_vsnprintf_s_l(str,sizeOfBuffer, count, format, NULL, valist); }
+#if _MSVCR_VER>=140 + /********************************************************************* * __stdio_common_vsnprintf_s (UCRTBASE.@) */ @@ -965,6 +975,8 @@ int CDECL MSVCRT__stdio_common_vsprintf_s( unsigned __int64 options, return MSVCRT_vsnprintf_s_l_opt(str, INT_MAX, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); }
+#endif /* _MSVCR_VER>=140 */ + /********************************************************************* * vsprintf (MSVCRT.@) */ @@ -1150,16 +1162,18 @@ int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, locale, args); }
+#if _MSVCR_VER>=80 /********************************************************************* - * _vswprintf_p (MSVCR100.@) + * _vswprintf_p (MSVCR80.@) */ int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length, const MSVCRT_wchar_t *format, __ms_va_list args) { return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, NULL, args); } +#endif
- +#if _MSVCR_VER>=140 /********************************************************************* * __stdio_common_vswprintf_p (UCRTBASE.@) */ @@ -1171,6 +1185,7 @@ int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options, FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); return MSVCRT_vswprintf_p_l_opt(str, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist); } +#endif
/********************************************************************* * _vsnwprintf_s_l (MSVCRT.@) @@ -1247,6 +1262,8 @@ int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, unsigned int len, unsign return retval; }
+#if _MSVCR_VER>=140 + static int puts_clbk_str_c99_w(void *ctx, int len, const MSVCRT_wchar_t *str) { struct _str_ctx_w *out = ctx; @@ -1295,6 +1312,8 @@ int CDECL MSVCRT__stdio_common_vswprintf( unsigned __int64 options, return ret; }
+#endif /* _MSVCR_VER>=140 */ + /********************************************************************* * sprintf (MSVCRT.@) */ @@ -1424,13 +1443,15 @@ int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t return MSVCRT_vswprintf_p_l_opt( NULL, INT_MAX, format, 0, locale, args ); }
+#if _MSVCR_VER>=80 /********************************************************************* - * _vscwprintf_p (MSVCR100.@) + * _vscwprintf_p (MSVCR80.@) */ int CDECL MSVCRT__vscwprintf_p(const MSVCRT_wchar_t *format, __ms_va_list args) { return MSVCRT_vswprintf_p_l_opt(NULL, INT_MAX, format, 0, NULL, args); } +#endif
/********************************************************************* * vswprintf_s (MSVCRT.@) @@ -1496,6 +1517,7 @@ int CDECL MSVCRT_vsprintf_p(char *buffer, MSVCRT_size_t length, return MSVCRT_vsprintf_p_l(buffer, length, format, NULL, args); }
+#if _MSVCR_VER>=140 /********************************************************************* * __stdio_common_vsprintf_p (UCRTBASE.@) */ @@ -1506,6 +1528,7 @@ int CDECL MSVCRT__stdio_common_vsprintf_p(unsigned __int64 options, char *buffer FIXME("options %s not handled\n", wine_dbgstr_longlong(options)); return MSVCRT_vsprintf_p_l_opt(buffer, length, format, options & UCRTBASE_PRINTF_MASK, locale, args); } +#endif
/********************************************************************* * _sprintf_p_l (MSVCRT.@) @@ -1537,8 +1560,9 @@ int WINAPIV MSVCRT___swprintf_l( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *form return retval; }
+#if _MSVCR_VER>=80 /********************************************************************* - * _sprintf_p (MSVCR100.@) + * _sprintf_p (MSVCR80.@) */ int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *format, ...) { @@ -1551,6 +1575,7 @@ int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *fo
return r; } +#endif
/********************************************************************* * _swprintf_p_l (MSVCRT.@) @@ -2234,6 +2259,8 @@ MSVCRT_long __cdecl MSVCRT__wtol(const MSVCRT_wchar_t *str) return MSVCRT__wtol_l(str, NULL); }
+#if _MSVCR_VER>=120 + /********************************************************************* * _wtoll_l (MSVCR120.@) */ @@ -2250,6 +2277,8 @@ MSVCRT_longlong __cdecl MSVCRT__wtoll(const MSVCRT_wchar_t *str) return MSVCRT__wtoll_l(str, NULL); }
+#endif /* _MSVCR_VER>=120 */ + /********************************************************************* * _wcstoui64_l (MSVCRT.@) *
Signed-off-by: Piotr Caban piotr@codeweavers.com