--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 358a163ca236a7d55b4298a8b3167b3d4bf41457..8fe0cfcd4420af39e43764ec41d8d851d1b6177f 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 865ded2463bcfe732ac9c15610b5ff1b7ed3af1d..4f755c60312eb7e8fd65173290c196b3a4141560 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 b1d4407824f0e963644828d18eff7fed18b15e07..5d083c08cab950000bb8687f2304bd2e5723ab07 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 337d7d1cc4b4af58fcb0424ed6127d5cab2cd231..45ad0620eaebbae57b3d823271f486444919c56e 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 db2b7b4e438a1d92b9f8752ef86850d9a3c52313..f1891fc24a712741c158f391388479c28d0711dc 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 07fc94724bd0fd73489b3973d6c6a54f0db7b960..b23c2df088642ce2d9001ebeba130d8fbba504d8 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 21118e7652b2e17d2287c085cc7e571c4bf88c3c..ec63eb18a8206b06d39dbdf032a1080809f962bb 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;