|
|
@@ -1,6 +1,6 @@
|
|
|
/*============================================================================
|
|
|
Kitware Information Macro Library
|
|
|
- Copyright 2010-2016 Kitware, Inc.
|
|
|
+ Copyright 2010-2018 Kitware, Inc.
|
|
|
All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
@@ -468,7 +468,7 @@ suppression macro KWIML_ABI_NO_VERIFY was defined.
|
|
|
# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
|
|
|
|
|
|
/* RISC-V */
|
|
|
-#elif defined(__riscv__)
|
|
|
+#elif defined(__riscv) || defined(__riscv__)
|
|
|
# define KWIML_ABI_ENDIAN_ID KWIML_ABI_ENDIAN_ID_LITTLE
|
|
|
|
|
|
/* Unknown CPU */
|
|
|
@@ -484,9 +484,16 @@ suppression macro KWIML_ABI_NO_VERIFY was defined.
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
# pragma warning (push)
|
|
|
+# pragma warning (disable:4309) /* static_cast trunction of constant value */
|
|
|
# pragma warning (disable:4310) /* cast truncates constant value */
|
|
|
#endif
|
|
|
|
|
|
+#if defined(__cplusplus) && !defined(__BORLANDC__)
|
|
|
+#define KWIML_ABI_private_STATIC_CAST(t,v) static_cast<t>(v)
|
|
|
+#else
|
|
|
+#define KWIML_ABI_private_STATIC_CAST(t,v) (t)(v)
|
|
|
+#endif
|
|
|
+
|
|
|
#define KWIML_ABI_private_VERIFY(n, x, y) KWIML_ABI_private_VERIFY_0(KWIML_ABI_private_VERSION, n, x, y)
|
|
|
#define KWIML_ABI_private_VERIFY_0(V, n, x, y) KWIML_ABI_private_VERIFY_1(V, n, x, y)
|
|
|
#define KWIML_ABI_private_VERIFY_1(V, n, x, y) extern int (*n##_v##V)[x]; extern int (*n##_v##V)[y]
|
|
|
@@ -535,9 +542,11 @@ KWIML_ABI_private_VERIFY_DIFF(KWIML_ABI___INT64_NOT_LONG_LONG, __int64, long lon
|
|
|
#endif
|
|
|
|
|
|
#if defined(KWIML_ABI_CHAR_IS_UNSIGNED)
|
|
|
-KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_UNSIGNED, (char)0x80 > 0);
|
|
|
+KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_UNSIGNED,
|
|
|
+ KWIML_ABI_private_STATIC_CAST(char, 0x80) > 0);
|
|
|
#elif defined(KWIML_ABI_CHAR_IS_SIGNED)
|
|
|
-KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_SIGNED, (char)0x80 < 0);
|
|
|
+KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_SIGNED,
|
|
|
+ KWIML_ABI_private_STATIC_CAST(char, 0x80) < 0);
|
|
|
#endif
|
|
|
|
|
|
#undef KWIML_ABI_private_VERIFY_DIFF
|
|
|
@@ -557,6 +566,8 @@ KWIML_ABI_private_VERIFY_BOOL(KWIML_ABI_CHAR_IS_SIGNED, (char)0x80 < 0);
|
|
|
#undef KWIML_ABI_private_VERIFY_0
|
|
|
#undef KWIML_ABI_private_VERIFY
|
|
|
|
|
|
+#undef KWIML_ABI_private_STATIC_CAST
|
|
|
+
|
|
|
#if defined(_MSC_VER)
|
|
|
# pragma warning (pop)
|
|
|
#endif
|