mirror of https://github.com/microsoft/vcpkg.git
24 lines
815 B
Diff
24 lines
815 B
Diff
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
|