From a612205584558c52ae2fedd616d7eb735d5ba84a Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 21 Sep 2016 12:54:23 -0600 Subject: Tweaks to make building on windows easier. Also, just building without bzip2 or lzma easier. --- src/stable/bzip2.cpp | 3 +++ src/stable/bzip2.h | 5 +++++ src/stable/condition.cpp | 4 ++-- src/stable/lzma.cpp | 4 ++++ src/stable/lzma.h | 5 +++++ 5 files changed, 19 insertions(+), 2 deletions(-) (limited to 'src/stable') diff --git a/src/stable/bzip2.cpp b/src/stable/bzip2.cpp index b48af37..b634a2c 100644 --- a/src/stable/bzip2.cpp +++ b/src/stable/bzip2.cpp @@ -8,6 +8,7 @@ #include "bu/bzip2.h" #include "bu/trace.h" +#ifdef BU_HAS_BZIP2 #include #define pState ((bz_stream *)prState) @@ -234,3 +235,5 @@ Bu::size Bu::BZip2::getCompressedSize() return sTotalOut; } +#endif + diff --git a/src/stable/bzip2.h b/src/stable/bzip2.h index e2c2753..6b5d9a9 100644 --- a/src/stable/bzip2.h +++ b/src/stable/bzip2.h @@ -11,6 +11,9 @@ #include #include "bu/filter.h" +#include "bu/autoconfig.h" + +#ifdef BU_HAS_BZIP2 namespace Bu { @@ -47,3 +50,5 @@ namespace Bu } #endif + +#endif diff --git a/src/stable/condition.cpp b/src/stable/condition.cpp index 7719d7b..b82626d 100644 --- a/src/stable/condition.cpp +++ b/src/stable/condition.cpp @@ -5,10 +5,10 @@ * terms of the license contained in the file LICENSE. */ -#include - #include "bu/condition.h" +#include + Bu::Condition::Condition() { pthread_cond_init( &cond, NULL ); diff --git a/src/stable/lzma.cpp b/src/stable/lzma.cpp index d05c79f..c8e8960 100644 --- a/src/stable/lzma.cpp +++ b/src/stable/lzma.cpp @@ -8,6 +8,8 @@ #include "bu/lzma.h" #include "bu/trace.h" +#ifdef BU_HAS_LZMA + #include #define pState ((lzma_stream *)prState) @@ -246,3 +248,5 @@ Bu::size Bu::Lzma::getCompressedSize() return sTotalOut; } +#endif + diff --git a/src/stable/lzma.h b/src/stable/lzma.h index f4a6e28..3685546 100644 --- a/src/stable/lzma.h +++ b/src/stable/lzma.h @@ -11,6 +11,9 @@ #include #include "bu/filter.h" +#include "bu/autoconfig.h" + +#ifdef BU_HAS_LZMA namespace Bu { @@ -57,3 +60,5 @@ namespace Bu } #endif + +#endif -- cgit v1.2.3