OSDN Git Service

PATCH: [ 1596285 ] Unresolved external symbol __abs64 with VC7.1
authorKimmo Varis <kimmov@gmail.com>
Thu, 23 Nov 2006 18:33:21 +0000 (18:33 +0000)
committerKimmo Varis <kimmov@gmail.com>
Thu, 23 Nov 2006 18:33:21 +0000 (18:33 +0000)
 - Submitted by Gal, minor edit by Kimmo

Src/Changes.txt
Src/StdAfx.cpp
Src/StdAfx.h

index 89e7425..8a202ea 100644 (file)
@@ -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
index ee9b5b5..0682772 100644 (file)
@@ -183,7 +183,7 @@ bool IsUnicodeBuild()
 #endif
 }
 
-#if _MSC_VER == 1310
+#if _MSC_VER <= 1310
 /**
 * @brief Calculates a number absolute value.
 */
index c62e7d4..9f92e4a 100644 (file)
 #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