aboutsummaryrefslogtreecommitdiff
path: root/PxShared/include/foundation/PxPreprocessor.h
diff options
context:
space:
mode:
Diffstat (limited to 'PxShared/include/foundation/PxPreprocessor.h')
-rw-r--r--PxShared/include/foundation/PxPreprocessor.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/PxShared/include/foundation/PxPreprocessor.h b/PxShared/include/foundation/PxPreprocessor.h
index 7921217d..ddbf2584 100644
--- a/PxShared/include/foundation/PxPreprocessor.h
+++ b/PxShared/include/foundation/PxPreprocessor.h
@@ -47,7 +47,9 @@ All definitions have a value of 1 or 0, use '#if' instead of '#ifdef'.
Compiler defines, see http://sourceforge.net/p/predef/wiki/Compilers/
*/
#if defined(_MSC_VER)
-#if _MSC_VER >= 1900
+#if _MSC_VER >= 1910
+#define PX_VC 15
+#elif _MSC_VER >= 1900
#define PX_VC 14
#elif _MSC_VER >= 1800
#define PX_VC 12
@@ -88,7 +90,7 @@ Operating system defines, see http://sourceforge.net/p/predef/wiki/OperatingSyst
#elif defined(__ORBIS__)
#define PX_PS4 1
#elif defined(__NX__)
-#define PX_NX 1
+#define PX_SWITCH 1
#else
#error "Unknown operating system"
#endif
@@ -161,8 +163,8 @@ define anything not defined on this platform to 0
#ifndef PX_PS4
#define PX_PS4 0
#endif
-#ifndef PX_NX
-#define PX_NX 0
+#ifndef PX_SWITCH
+#define PX_SWITCH 0
#endif
#ifndef PX_X64
#define PX_X64 0
@@ -425,7 +427,7 @@ General defines
*/
// static assert
-#if(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) || (PX_NX) || (PX_CLANG && PX_ARM)
+#if(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) || (PX_SWITCH) || (PX_CLANG && PX_ARM)
#define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] __attribute__((unused))
#else
#define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1]
@@ -488,7 +490,8 @@ struct PxPackValidation
long long a;
};
#endif
-#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN
+// clang (as of version 3.9) cannot align doubles on 8 byte boundary when compiling for Intel 32 bit target
+#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN && !(PX_CLANG && PX_X86)
PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8);
#endif