summaryrefslogtreecommitdiffstats
path: root/Utilities/cmliblzma/common/sysdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmliblzma/common/sysdefs.h')
-rw-r--r--Utilities/cmliblzma/common/sysdefs.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/Utilities/cmliblzma/common/sysdefs.h b/Utilities/cmliblzma/common/sysdefs.h
index a6edea8..22f487b 100644
--- a/Utilities/cmliblzma/common/sysdefs.h
+++ b/Utilities/cmliblzma/common/sysdefs.h
@@ -18,6 +18,7 @@
#if defined(_MSC_VER)
# pragma warning(push,1)
+# pragma warning(disable: 4028) /* formal parameter different from decl */
# pragma warning(disable: 4142) /* benign redefinition of type */
# pragma warning(disable: 4761) /* integral size mismatch in argument */
#endif
@@ -124,9 +125,9 @@
// The code currently assumes that size_t is either 32-bit or 64-bit.
#ifndef SIZE_MAX
-# if SIZE_OF_SIZE_T == 4
+# if SIZEOF_SIZE_T == 4
# define SIZE_MAX UINT32_MAX
-# elif SIZE_OF_SIZE_T == 8
+# elif SIZEOF_SIZE_T == 8
# define SIZE_MAX UINT64_MAX
# else
# error size_t is not 32-bit or 64-bit
@@ -175,6 +176,16 @@ typedef unsigned char _Bool;
# include <memory.h>
#endif
+// As of MSVC 2013, inline and restrict are supported with
+// non-standard keywords.
+#if defined(_WIN32) && defined(_MSC_VER)
+# ifndef inline
+# define inline __inline
+# endif
+# ifndef restrict
+# define restrict __restrict
+# endif
+#endif
////////////
// Macros //