Init: Migrate SimpleRemoter (Since v1.3.1) to Gitea
This commit is contained in:
47
server/2015Remote/msvc_compat.c
Normal file
47
server/2015Remote/msvc_compat.c
Normal file
@@ -0,0 +1,47 @@
|
||||
// MSVC CRT compatibility shims for 32-bit builds
|
||||
// Only provides _legacy versions that are missing from newer CRT
|
||||
|
||||
#if defined(_M_IX86) && !defined(_M_X64)
|
||||
|
||||
#pragma message(">>> Compiling msvc_compat.c for x86 <<<")
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// For x86 cdecl, MSVC adds one underscore prefix
|
||||
// So _ftoul2_legacy becomes __ftoul2_legacy in object file
|
||||
|
||||
unsigned __int64 __cdecl _ftoul2_legacy(float x) {
|
||||
if (x < 0.0f) return 0;
|
||||
return (unsigned __int64)x;
|
||||
}
|
||||
|
||||
unsigned __int64 __cdecl _dtoul2_legacy(double x) {
|
||||
if (x < 0.0) return 0;
|
||||
return (unsigned __int64)x;
|
||||
}
|
||||
|
||||
unsigned __int64 __cdecl _ftoul3_legacy(float x) {
|
||||
if (x < 0.0f) return 0;
|
||||
return (unsigned __int64)x;
|
||||
}
|
||||
|
||||
unsigned __int64 __cdecl _dtoul3_legacy(double x) {
|
||||
if (x < 0.0) return 0;
|
||||
return (unsigned __int64)x;
|
||||
}
|
||||
|
||||
__int64 __cdecl _ftol3_legacy(float x) {
|
||||
return (__int64)x;
|
||||
}
|
||||
|
||||
__int64 __cdecl _dtol3_legacy(double x) {
|
||||
return (__int64)x;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _M_IX86
|
||||
Reference in New Issue
Block a user