aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/api/lzma.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2015-07-12 20:48:19 +0300
committerLasse Collin <lasse.collin@tukaani.org>2015-07-12 20:48:19 +0300
commitfbbb295a91caf39faf8838c8c39526e4cb4dc121 (patch)
treea4bef8385b19daef46a1101bd0ff0b1b7fb6b19d /src/liblzma/api/lzma.h
parentUpdate THANKS. (diff)
downloadxz-fbbb295a91caf39faf8838c8c39526e4cb4dc121.tar.xz
liblzma: A MSVC-specific hack isn't needed with MSVC 2013 and newer.
Diffstat (limited to '')
-rw-r--r--src/liblzma/api/lzma.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/liblzma/api/lzma.h b/src/liblzma/api/lzma.h
index 72c51b24..ce675a78 100644
--- a/src/liblzma/api/lzma.h
+++ b/src/liblzma/api/lzma.h
@@ -82,12 +82,20 @@
# if !defined(UINT32_C) || !defined(UINT64_C) \
|| !defined(UINT32_MAX) || !defined(UINT64_MAX)
/*
- * MSVC has no C99 support, and thus it cannot be used to
- * compile liblzma. The liblzma API has to still be usable
- * from MSVC, so we need to define the required standard
- * integer types here.
+ * MSVC versions older than 2013 have no C99 support, and
+ * thus they cannot be used to compile liblzma. Using an
+ * existing liblzma.dll with old MSVC can work though(*),
+ * but we need to define the required standard integer
+ * types here in a MSVC-specific way.
+ *
+ * (*) If you do this, the existing liblzma.dll probably uses
+ * a different runtime library than your MSVC-built
+ * application. Mixing runtimes is generally bad, but
+ * in this case it should work as long as you avoid
+ * the few rarely-needed liblzma functions that allocate
+ * memory and expect the caller to free it using free().
*/
-# if defined(_WIN32) && defined(_MSC_VER)
+# if defined(_WIN32) && defined(_MSC_VER) && _MSC_VER < 1800
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;