aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz/lz_encoder.c
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2009-10-02 11:03:26 +0300
committerLasse Collin <lasse.collin@tukaani.org>2009-10-02 11:03:26 +0300
commitc5f68b5cc79085a87f950fea53843e27f328068e (patch)
tree3de2840a1ac485bdb6b440a4f6236659f7962d8b /src/liblzma/lz/lz_encoder.c
parentadd lzmainfo to gitignore (diff)
downloadxz-c5f68b5cc79085a87f950fea53843e27f328068e.tar.xz
Make liblzma produce the same output on both endiannesses.
Seems that it is a problem in some cases if the same version of XZ Utils produces different output on different endiannesses, so this commit fixes that problem. The output will still vary between different XZ Utils versions, but I cannot avoid that for now. This commit bloatens the code on big endian systems by 1 KiB, which should be OK since liblzma is bloated already. ;-)
Diffstat (limited to 'src/liblzma/lz/lz_encoder.c')
-rw-r--r--src/liblzma/lz/lz_encoder.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/liblzma/lz/lz_encoder.c b/src/liblzma/lz/lz_encoder.c
index 5fd03e84..0e7b7d1d 100644
--- a/src/liblzma/lz/lz_encoder.c
+++ b/src/liblzma/lz/lz_encoder.c
@@ -13,7 +13,12 @@
#include "lz_encoder.h"
#include "lz_encoder_hash.h"
-#include "check.h"
+
+// See lz_encoder_hash.h. This is a bit hackish but avoids making
+// endianness a conditional in makefiles.
+#if defined(WORDS_BIGENDIAN) && !defined(HAVE_SMALL)
+# include "lz_encoder_hash_table.h"
+#endif
struct lzma_coder_s {