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 176dc53..4684a61 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 d0ce526..fa7f5dd 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 e495cb5..4af3a7a 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,