From 76fdb4905f37735956c1a03d7ad9e7e9a86762d4 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 28 Apr 2014 13:06:05 +0300 Subject: [PATCH] Fixed compilation with updated LZMA library using Visual Studio --- lzma/C/CpuArch.c | 4 ++++ lzma/C/Threads.h | 7 +++++++ lzma/C/Types.h | 10 ---------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lzma/C/CpuArch.c b/lzma/C/CpuArch.c index 36e7680d9..4b319fa88 100644 --- a/lzma/C/CpuArch.c +++ b/lzma/C/CpuArch.c @@ -3,6 +3,10 @@ #include "CpuArch.h" +#ifdef _WIN32 +#include +#endif + #ifdef MY_CPU_X86_OR_AMD64 #if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) diff --git a/lzma/C/Threads.h b/lzma/C/Threads.h index 6a7afa829..b82214355 100644 --- a/lzma/C/Threads.h +++ b/lzma/C/Threads.h @@ -6,6 +6,13 @@ #include "Types.h" +#ifdef _WIN32 +#include +typedef DWORD WRes; +#else +typedef int WRes; +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/lzma/C/Types.h b/lzma/C/Types.h index 834709bb9..284991104 100644 --- a/lzma/C/Types.h +++ b/lzma/C/Types.h @@ -6,10 +6,6 @@ #include -#ifdef _WIN32 -#include -#endif - #ifndef EXTERN_C_BEGIN #ifdef __cplusplus #define EXTERN_C_BEGIN extern "C" { @@ -42,12 +38,6 @@ EXTERN_C_BEGIN typedef int SRes; -#ifdef _WIN32 -typedef DWORD WRes; -#else -typedef int WRes; -#endif - #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif