--disable-verify-compression by default
authorEric Biggers <ebiggers3@gmail.com>
Mon, 8 Apr 2013 16:44:32 +0000 (11:44 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 8 Apr 2013 16:44:32 +0000 (11:44 -0500)
archlinux/PKGBUILD
configure.ac
rpm/wimlib-minimal.spec
rpm/wimlib-without-ntfs-3g.spec
rpm/wimlib.spec
src/lzx-compress.c
src/xpress-compress.c

index 358a163..8fe0cfc 100644 (file)
@@ -18,8 +18,8 @@ source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
 
 build() {
        cd "$pkgname-$pkgver"
-       ./configure --disable-verify-compression --with-libcrypto --with-fuse \
-                   --with-ntfs-3g --enable-xattr --prefix=/usr
+       ./configure --with-libcrypto --with-fuse --with-ntfs-3g \
+                       --enable-xattr --prefix=/usr
        make
 }
 
index 865ded2..4f755c6 100644 (file)
@@ -150,7 +150,7 @@ AC_ARG_ENABLE([verify_compression],
                                checking if blocks we compress can be correctly
                                decompressed]),
        [ENABLE_VERIFY_COMPRESSION=$enableval],
-       [ENABLE_VERIFY_COMPRESSION=yes]
+       [ENABLE_VERIFY_COMPRESSION=no]
        )
 AC_MSG_RESULT([$ENABLE_VERIFY_COMPRESSION])
 if test "x$ENABLE_VERIFY_COMPRESSION" = "xyes"; then
index b1d4407..5d083c0 100644 (file)
@@ -35,7 +35,6 @@ Development files for wimlib
           --without-ntfs-3g             \
           --without-fuse                \
           --disable-xattr               \
-           --disable-verify-compression  \
           --disable-multithreaded-compression \
           --disable-custom-memory-allocator \
           --disable-assertions
index 337d7d1..45ad062 100644 (file)
@@ -33,8 +33,7 @@ Development files for wimlib
            --disable-rpath               \
           --with-libcrypto              \
           --without-ntfs-3g             \
-          --enable-xattr                \
-           --disable-verify-compression
+          --enable-xattr
 %__make %{?_smp_mflags}
 
 %check
index db2b7b4..f1891fc 100644 (file)
@@ -35,8 +35,7 @@ Development files for wimlib
            --disable-rpath               \
           --with-libcrypto              \
           --with-ntfs-3g                \
-          --enable-xattr                \
-           --disable-verify-compression
+          --enable-xattr
 %__make %{?_smp_mflags}
 
 %check
index 07fc947..b23c2df 100644 (file)
@@ -747,21 +747,23 @@ wimlib_lzx_compress(const void *__uncompressed_data, unsigned uncompressed_len,
 
 #ifdef ENABLE_VERIFY_COMPRESSION
        /* Verify that we really get the same thing back when decompressing. */
-       u8 buf[uncompressed_len];
-       ret = wimlib_lzx_decompress(compressed_data, compressed_len,
-                                   buf, uncompressed_len);
-       if (ret != 0) {
-               ERROR("lzx_compress(): Failed to decompress data we compressed");
-               abort();
-       }
-
-       for (i = 0; i < uncompressed_len; i++) {
-               if (buf[i] != *((u8*)__uncompressed_data + i)) {
-                       ERROR("lzx_compress(): Data we compressed didn't "
-                             "decompress to the original data (difference at "
-                             "byte %u of %u)", i + 1, uncompressed_len);
+       {
+               u8 buf[uncompressed_len];
+               ret = wimlib_lzx_decompress(compressed_data, compressed_len,
+                                           buf, uncompressed_len);
+               if (ret != 0) {
+                       ERROR("lzx_compress(): Failed to decompress data we compressed");
                        abort();
                }
+
+               for (i = 0; i < uncompressed_len; i++) {
+                       if (buf[i] != *((u8*)__uncompressed_data + i)) {
+                               ERROR("lzx_compress(): Data we compressed didn't "
+                                     "decompress to the original data (difference at "
+                                     "byte %u of %u)", i + 1, uncompressed_len);
+                               abort();
+                       }
+               }
        }
 #endif
        return compressed_len;
index 21118e7..ec63eb1 100644 (file)
@@ -239,23 +239,25 @@ wimlib_xpress_compress(const void *__uncompressed_data,
 
        wimlib_assert(compressed_len <= uncompressed_len - 1);
 
-#ifdef ENABLE_VERIFY_COMPRESSION
+#if defined(ENABLE_VERIFY_COMPRESSION)
        /* Verify that we really get the same thing back when decompressing. */
-       u8 buf[uncompressed_len];
-       ret = wimlib_xpress_decompress(__compressed_data, compressed_len,
-                                      buf, uncompressed_len);
-       if (ret) {
-               ERROR("xpress_compress(): Failed to decompress data we "
-                     "compressed");
-               abort();
-       }
-       for (i = 0; i < uncompressed_len; i++) {
-               if (buf[i] != uncompressed_data[i]) {
-                       ERROR("xpress_compress(): Data we compressed didn't "
-                             "decompress to the original data (difference at "
-                             "byte %u of %u)", i + 1, uncompressed_len);
+       {
+               u8 buf[uncompressed_len];
+               ret = wimlib_xpress_decompress(__compressed_data, compressed_len,
+                                              buf, uncompressed_len);
+               if (ret) {
+                       ERROR("xpress_compress(): Failed to decompress data we "
+                             "compressed");
                        abort();
                }
+               for (i = 0; i < uncompressed_len; i++) {
+                       if (buf[i] != uncompressed_data[i]) {
+                               ERROR("xpress_compress(): Data we compressed didn't "
+                                     "decompress to the original data (difference at "
+                                     "byte %u of %u)", i + 1, uncompressed_len);
+                               abort();
+                       }
+               }
        }
 #endif
        return compressed_len;