fix blasabs for windows
authorSteven G. Johnson <stevenj@mit.edu>
Sun, 5 Aug 2018 12:18:51 +0000 (08:18 -0400)
committerGitHub <noreply@github.com>
Sun, 5 Aug 2018 12:18:51 +0000 (08:18 -0400)
Bugfix in #1713 for Windows (LLP64), where `blasabs` needs to be `llabs` rather than `labs` for the 64-bit API.

common.h

index 2ab29c3..6c3d5b1 100644 (file)
--- a/common.h
+++ b/common.h
@@ -257,7 +257,11 @@ typedef unsigned long BLASULONG;
 
 #ifdef USE64BITINT
 typedef BLASLONG blasint;
+#if defined(OS_WINDOWS) && defined(__64BIT__)
+#define blasabs(x) llabs(x)
+#else
 #define blasabs(x) labs(x)
+#endif
 #else
 typedef int blasint;
 #define blasabs(x) abs(x)