From 5c60dcc94c8dc9fc8b19c4b7d81fe28dcfa67fe6 Mon Sep 17 00:00:00 2001 From: vng Date: Sun, 6 Mar 2011 17:32:09 +0200 Subject: [PATCH] Fix MSVC compilation. There is no inner int32_t, int16_t, int8_t types. --- 3party/zlib/zconf.h | 4 ++-- coding/bzip2_compressor.cpp | 5 ++++- coding/timsort/timsort.h | 9 ++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/3party/zlib/zconf.h b/3party/zlib/zconf.h index b234387442..818ede1eb4 100644 --- a/3party/zlib/zconf.h +++ b/3party/zlib/zconf.h @@ -356,8 +356,8 @@ typedef uLong FAR uLongf; typedef Byte *voidp; #endif -#if 1 /* was set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H +#ifndef _MSC_VER +#define Z_HAVE_UNISTD_H #endif #ifdef STDC diff --git a/coding/bzip2_compressor.cpp b/coding/bzip2_compressor.cpp index 1720adc8e1..84916a39e0 100644 --- a/coding/bzip2_compressor.cpp +++ b/coding/bzip2_compressor.cpp @@ -1,8 +1,11 @@ #include "bzip2_compressor.hpp" #include "coder_util.hpp" + #include "../base/assert.hpp" + #include "../std/vector.hpp" -#include + +#include "../3party/bzip2/bzlib.h" size_t DecompressBZip2IntoFixedSize(char const * pSrc, size_t srcSize, char * pDst, size_t dstSize) { diff --git a/coding/timsort/timsort.h b/coding/timsort/timsort.h index 86a1e48c39..bd5c91b5c3 100644 --- a/coding/timsort/timsort.h +++ b/coding/timsort/timsort.h @@ -1,7 +1,14 @@ #ifndef __TIM_SORT_H__ #define __TIM_SORT_H__ -#include +#ifndef _MSC_VER + #include +#else + typedef unsigned char uint8_t; + typedef __int32 int32_t; + typedef unsigned __int32 uint32_t; +#endif + #include #include #include