]> wimlib.net Git - wimlib/commitdiff
Make --disable-multithreaded-compression work again
authorEric Biggers <ebiggers3@gmail.com>
Wed, 25 Dec 2013 07:12:14 +0000 (01:12 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Wed, 25 Dec 2013 07:12:14 +0000 (01:12 -0600)
include/wimlib/chunk_compressor.h
src/compress_parallel.c
src/write.c

index 176dc531710d8e82a5b10db7f6ae6af6e4c4689b..4684a61c14e81edda01293ad00a2ef4c94654200 100644 (file)
@@ -59,10 +59,12 @@ struct chunk_compressor {
 
 /* Functions that return implementations of the chunk_compressor interface.  */
 
+#ifdef ENABLE_MULTITHREADED_COMPRESSION
 int
 new_parallel_chunk_compressor(int out_ctype, u32 out_chunk_size,
                              unsigned num_threads, u64 max_memory,
                              struct chunk_compressor **compressor_ret);
+#endif
 
 int
 new_serial_chunk_compressor(int out_ctype, u32 out_chunk_size,
index d0ce5266464cb4021797cbd2a81c4ed5c5c652c3..fa7f5dde113750adea8a1b43f12227748cd5109d 100644 (file)
@@ -26,6 +26,8 @@
 #  include "config.h"
 #endif
 
+#ifdef ENABLE_MULTITHREADED_COMPRESSION
+
 #include "wimlib/assert.h"
 #include "wimlib/chunk_compressor.h"
 #include "wimlib/error.h"
@@ -534,3 +536,5 @@ err:
        parallel_chunk_compressor_destroy(&ctx->base);
        return ret;
 }
+
+#endif /* ENABLE_MULTITHREADED_COMPRESSION */
index e495cb5b29721c21aa7a1526b0d8d604453348f5..4af3a7a31bc0da852c1e9e738b7c8daefbab3515 100644 (file)
@@ -1349,6 +1349,7 @@ write_stream_list(struct list_head *stream_list,
                                "actually be written uncompressed.");
                }
 
+       #ifdef ENABLE_MULTITHREADED_COMPRESSION
                if (ctx.num_bytes_to_compress >= 2000000) {
                        ret = new_parallel_chunk_compressor(out_ctype,
                                                            out_chunk_size,
@@ -1359,6 +1360,7 @@ write_stream_list(struct list_head *stream_list,
                                      "(status %d)", ret);
                        }
                }
+       #endif
 
                if (ctx.compressor == NULL) {
                        ret = new_serial_chunk_compressor(out_ctype, out_chunk_size,