blob: 2ff14ce7c92b6857c02a37bbb3a4ada81780c168 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
diff --git a/control/magma_internal.h b/control/magma_internal.h
index 7af16a5..0133e44 100644
--- a/control/magma_internal.h
+++ b/control/magma_internal.h
@@ -33,7 +33,7 @@
// functions where Microsoft fails to provide C99 standard
// (only with Microsoft, not with nvcc on Windows)
// in both magma_internal.h and testings.h
- #ifndef __NVCC__
+ #if !defined(__NVCC__) && !defined(__clang__)
#include <float.h>
#define copysign(x,y) _copysign(x,y)
@@ -43,6 +43,9 @@
// note _snprintf has slightly different semantics than snprintf
#define snprintf _snprintf
+ #elif !defined(__NVCC__)
+ // make sure this actually uses the C version and not the C++ overloads
+ #define copysign(x,y) copysign((double)x,(double)y)
#endif
#else
|