Index: Include/crt.sbp
===================================================================
--- Include/crt.sbp	(revision 86)
+++ Include/crt.sbp	(revision 119)
@@ -4,6 +4,10 @@
 #define _INC_CRT
 
-Declare Function _beginthread cdecl Lib "msvcrt" (start_address As VoidPtr, stack_size As DWord, arglist As VoidPtr) As HANDLE
-Declare Function _beginthreadex cdecl Lib "msvcrt" (
+#ifndef _DEFINE_CRTDLL_NAME
+Const _CrtDllName = "msvcrt"
+#endif
+
+Declare Function _beginthread cdecl Lib _CrtDllName (start_address As VoidPtr, stack_size As DWord, arglist As VoidPtr) As HANDLE
+Declare Function _beginthreadex cdecl Lib _CrtDllName (
 	security As *SECURITY_ATTRIBUTES,
 	stack_size As DWord,
@@ -12,22 +16,44 @@
 	initflag As DWord,
 	ByRef thrdaddr As DWord) As HANDLE
-Declare Sub _endthread cdecl Lib "msvcrt" ()
-Declare Sub _endthreadex cdecl Lib "msvcrt" (retval As DWord)
+Declare Sub _endthread cdecl Lib _CrtDllName ()
+Declare Sub _endthreadex cdecl Lib _CrtDllName (retval As DWord)
 
-Declare Function strstr cdecl Lib "msvcrt" (s1 As LPSTR, s2 As LPSTR) As LPSTR
-Declare Function memmove cdecl Lib "msvcrt" (dest As VoidPtr, src As VoidPtr, count As SIZE_T) As VoidPtr
-Declare Function _mbsstr cdecl Lib "msvcrt" (s1 As LPSTR, s2 As LPSTR) As LPSTR
+Declare Function strstr cdecl Lib _CrtDllName (s1 As LPSTR, s2 As LPSTR) As LPSTR
+Declare Function memmove cdecl Lib _CrtDllName (dest As VoidPtr, src As VoidPtr, count As SIZE_T) As VoidPtr
+Declare Function _mbsstr cdecl Lib _CrtDllName (s1 As LPSTR, s2 As LPSTR) As LPSTR
 
-Declare Function memcmp CDecl Lib "msvcrt" (buf1 As VoidPtr, buf2 As VoidPtr, c As SIZE_T) As Long
-Declare Function memicmp CDecl Lib "msvcrt" Alias "_memicmp" (buf1 As VoidPtr, buf2 As VoidPtr, c As SIZE_T) As Long
+Declare Function memcmp CDecl Lib _CrtDllName (buf1 As VoidPtr, buf2 As VoidPtr, c As SIZE_T) As Long
+Declare Function memicmp CDecl Lib _CrtDllName Alias "_memicmp" (buf1 As VoidPtr, buf2 As VoidPtr, c As SIZE_T) As Long
 
 TypeDef va_list = VoidPtr
 
-Declare Function sprintf CDecl Lib "msvcrt" (buffer As PSTR, format As PCSTR, ...) As Long
-Declare Function _snprintf CDecl Lib "msvcrt" (buffer As PSTR, count As SIZE_T, format As PCSTR, ...) As Long
-Declare Function _scprintf CDecl Lib "msvcrt" (format As PCSTR, ...) As Long
-Declare Function vsprintf CDecl Lib "msvcrt" (buffer As PSTR, format As PCSTR, argptr As va_list) As Long
-Declare Function _vsnprintf CDecl Lib "msvcrt" (buffer As PSTR, count As SIZE_T, format As PCSTR, argptr As va_list) As Long
-Declare Function _vscprintf CDecl Lib "msvcrt" (format As PCSTR, argptr As va_list) As Long
+Declare Function sprintf CDecl Lib _CrtDllName (buffer As PSTR, format As PCSTR, ...) As Long
+Declare Function _snprintf CDecl Lib _CrtDllName (buffer As PSTR, count As SIZE_T, format As PCSTR, ...) As Long
+Declare Function _scprintf CDecl Lib _CrtDllName (format As PCSTR, ...) As Long
+Declare Function vsprintf CDecl Lib _CrtDllName (buffer As PSTR, format As PCSTR, argptr As va_list) As Long
+Declare Function _vsnprintf CDecl Lib _CrtDllName (buffer As PSTR, count As SIZE_T, format As PCSTR, argptr As va_list) As Long
+Declare Function _vscprintf CDecl Lib _CrtDllName (format As PCSTR, argptr As va_list) As Long
+
+Declare Function swprintf CDecl Lib _CrtDllName (buffer As PWSTR, format As PCWSTR, ...) As Long
+Declare Function _snwprintf CDecl Lib _CrtDllName (buffer As PWSTR, count As SIZE_T, format As PCWSTR, ...) As Long
+Declare Function _scwprintf CDecl Lib _CrtDllName (format As PCWSTR, ...) As Long
+Declare Function vswprintf CDecl Lib _CrtDllName (buffer As PWSTR, format As PCWSTR, argptr As va_list) As Long
+Declare Function _vsnwprintf CDecl Lib _CrtDllName (buffer As PWSTR, count As SIZE_T, format As PCWSTR, argptr As va_list) As Long
+Declare Function _vscwprintf CDecl Lib _CrtDllName (format As PCWSTR, argptr As va_list) As Long
+#ifdef UNICODE
+Declare Function _stprintf CDecl Lib _CrtDllName Alias "swprintf" (buffer As PWSTR, format As PCWSTR, ...) As Long
+Declare Function _sntprintf CDecl Lib _CrtDllName Alias "_snwprintf" (buffer As PWSTR, count As SIZE_T, format As PCWSTR, ...) As Long
+Declare Function _sctprintf CDecl Lib _CrtDllName Alias "_scwprintf" (format As PCWSTR, ...) As Long
+Declare Function _vstprintf CDecl Lib _CrtDllName Alias "vswprintf" (buffer As PWSTR, format As PCWSTR, argptr As va_list) As Long
+Declare Function _vsntprintf CDecl Lib _CrtDllName Alias "_vsnwprintf" (buffer As PWSTR, count As SIZE_T, format As PCWSTR, argptr As va_list) As Long
+Declare Function _vsctprintf CDecl Lib _CrtDllName Alias "_vscwprintf" (format As PCWSTR, argptr As va_list) As Long
+#else
+Declare Function _stprintf CDecl Lib _CrtDllName Alias "sprintf" (buffer As PSTR, format As PCSTR, ...) As Long
+Declare Function _sntprintf CDecl Lib _CrtDllName Alias "_snprintf" (buffer As PSTR, count As SIZE_T, format As PCSTR, ...) As Long
+Declare Function _sctprintf CDecl Lib _CrtDllName Alias "_scprintf" (format As PCSTR, ...) As Long
+Declare Function _vstprintf CDecl Lib _CrtDllName Alias "vsprintf" (buffer As PSTR, format As PCSTR, argptr As va_list) As Long
+Declare Function _vsntprintf CDecl Lib _CrtDllName Alias "_vsnprintf" (buffer As PSTR, count As SIZE_T, format As PCSTR, argptr As va_list) As Long
+Declare Function _vsctprintf CDecl Lib _CrtDllName Alias "_vscprintf" (format As PCSTR, argptr As va_list) As Long
+#endif
 
 #endif '_INC_CRT
