aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-05-30 10:00:57 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-05-30 10:00:57 +0300
commit7dabf0ef8731bb9cb001f37a7bfb9146bf2a362c (patch)
treeb31b845f94dec0decff03707fc2579fed95cb0bc /linux
parent0d67d4ea416d6a5832f26c99024f8c29f0ca20dd (diff)
downloadxz-embedded-7dabf0ef8731bb9cb001f37a7bfb9146bf2a362c.tar.gz
Make it simpler to build without BCJ filters.
Now xz_dec_bcj.c can be compiled even when no BCJ filters are enabled (but only if the compiler supports files that don't export any symbols). It also allows #including it unconditionally in decompress_unxz.c.
Diffstat (limited to 'linux')
-rw-r--r--linux/lib/decompress_unxz.c4
-rw-r--r--linux/lib/xz/xz_dec_bcj.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/linux/lib/decompress_unxz.c b/linux/lib/decompress_unxz.c
index ae60f7e..4e9c860 100644
--- a/linux/lib/decompress_unxz.c
+++ b/linux/lib/decompress_unxz.c
@@ -241,9 +241,7 @@ static void * XZ_FUNC memmove(void *dest, const void *src, size_t size)
#include "xz/xz_crc32.c"
#include "xz/xz_dec_stream.c"
#include "xz/xz_dec_lzma2.c"
-#ifdef XZ_DEC_BCJ
-# include "xz/xz_dec_bcj.c"
-#endif
+#include "xz/xz_dec_bcj.c"
/*
* Maximum LZMA2 dictionary size. This matters only in multi-call mode.
diff --git a/linux/lib/xz/xz_dec_bcj.c b/linux/lib/xz/xz_dec_bcj.c
index f5b25f1..09162b5 100644
--- a/linux/lib/xz/xz_dec_bcj.c
+++ b/linux/lib/xz/xz_dec_bcj.c
@@ -10,6 +10,12 @@
#include "xz_private.h"
+/*
+ * The rest of the file is inside this ifdef. It makes things a little more
+ * convenient when building without support for any BCJ filters.
+ */
+#ifdef XZ_DEC_BCJ
+
struct xz_dec_bcj {
/* Type of the BCJ filter being used */
enum {
@@ -554,3 +560,5 @@ XZ_EXTERN enum xz_ret XZ_FUNC xz_dec_bcj_reset(
return XZ_OK;
}
+
+#endif