From 5b62ce50acb472e2ccc1e42e73b6ff0ba60dbf11 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Thu, 23 Nov 2006 18:33:21 +0000 Subject: [PATCH] PATCH: [ 1596285 ] Unresolved external symbol __abs64 with VC7.1 - Submitted by Gal, minor edit by Kimmo --- Src/Changes.txt | 3 +++ Src/StdAfx.cpp | 2 +- Src/StdAfx.h | 13 ++++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/Src/Changes.txt b/Src/Changes.txt index 89e742544..8a202ea4a 100644 --- a/Src/Changes.txt +++ b/Src/Changes.txt @@ -7,6 +7,9 @@ Add new items to top. Src: Merge.cpp Merge.h PATCH: [ 1512881 ] Fix memleak from charsets.c Src: charsets.cp charsets.h Merge.cpp + PATCH: [ 1596285 ] Unresolved external symbol __abs64 with VC7.1 + Submitted by Gal, minor edit by Kimmo + Src: StdAfx.cpp StdAfx.h 2006-11-21 Kimmo PATCH: [ 1600000 ] Fix project file Has*() functions diff --git a/Src/StdAfx.cpp b/Src/StdAfx.cpp index ee9b5b569..06827728f 100644 --- a/Src/StdAfx.cpp +++ b/Src/StdAfx.cpp @@ -183,7 +183,7 @@ bool IsUnicodeBuild() #endif } -#if _MSC_VER == 1310 +#if _MSC_VER <= 1310 /** * @brief Calculates a number absolute value. */ diff --git a/Src/StdAfx.h b/Src/StdAfx.h index c62e7d48d..9f92e4ad2 100644 --- a/Src/StdAfx.h +++ b/Src/StdAfx.h @@ -16,9 +16,20 @@ #define WINVER 0x400 #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers +// Disable VC6's "identifier was truncated..." warning. It is meaningless. +#if _MSC_VER == 1200 + #pragma warning(disable: 4786) +#endif + +// Declare this function for VC6 and VS2002 +// We dont' know if the function exists in VS2002 so we'd better be safe here! +#if _MSC_VER <= 1300 + __int64 _abs64_patch(__int64 n); +#endif + // A patch to solve a VC 7.1 bug. It seems that it doesn't export _abs64 // function. -#if _MSC_VER == 1310 +#if _MSC_VER <= 1310 #define _abs64 _abs64_patch #endif -- 2.11.0