Jean-Marc Lasgouttes wrote:
> But are we sure that int is a wide enough type?
there is no abs function for 64 bit ints,
so we must define it:
Index: changes.C
===================================================================
--- changes.C (revision 15576)
+++ changes.C (working copy)
@@ -18,6 +18,15 @@
#include <boost/assert.hpp>
+#ifdef _MSC_VER
+namespace std
+{
+ inline __int64 abs(__int64 i)
+ {
+ return _abs64(i);
+ }
+}
+#endif
namespace lyx {
@@ -50,7 +59,7 @@
return l.author == r.author
// both changes made within 5 minutes?
- && abs(static_cast<int>(l.changetime - r.changetime)) < 300;
+ && abs(l.changetime - r.changetime) < 300;
}
We only need the correct file for __int64 abs(__int64 i).
Any suggestion? Should we move it into config.h?
Peter