summaryrefslogtreecommitdiffstats
path: root/src/common/sysdefs.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
commitcf178685aca107aa37c748de11da01562e78c46c (patch)
tree84d60b39c1744edcbdd4dbfc5026583914432dba /src/common/sysdefs.h
parentAdding upstream version 5.6.1+really5.4.5. (diff)
downloadxz-utils-cf178685aca107aa37c748de11da01562e78c46c.tar.xz
xz-utils-cf178685aca107aa37c748de11da01562e78c46c.zip
Adding upstream version 5.6.2.upstream/5.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/common/sysdefs.h')
-rw-r--r--src/common/sysdefs.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index f04e45d..5f3785b 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file sysdefs.h
@@ -8,9 +10,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_SYSDEFS_H
@@ -159,13 +158,16 @@ typedef unsigned char _Bool;
#include <string.h>
-// As of MSVC 2013, inline and restrict are supported with
-// non-standard keywords.
-#if defined(_WIN32) && defined(_MSC_VER)
-# ifndef inline
+// Visual Studio 2013 update 2 supports only __inline, not inline.
+// MSVC v19.0 / VS 2015 and newer support both.
+//
+// MSVC v19.27 (VS 2019 version 16.7) added support for restrict.
+// Older ones support only __restrict.
+#ifdef _MSC_VER
+# if _MSC_VER < 1900 && !defined(inline)
# define inline __inline
# endif
-# ifndef restrict
+# if _MSC_VER < 1927 && !defined(restrict)
# define restrict __restrict
# endif
#endif