]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix build failure on FreeBSD 8.x.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 14 Aug 2014 01:35:43 +0000 (10:35 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 14 Aug 2014 01:35:43 +0000 (10:35 +0900)
libarchive/test/test_read_format_gtar_sparse_skip_entry.c

index 813315b71fd7a80a9f2cd23a2a159ff6feaf0ccd..1caed21bcacaf60d696aa08e36f82cb5eee2afef 100644 (file)
 #include "test.h"
 __FBSDID("$FreeBSD");
 
+#if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
+# define       LITERAL_LL(x)   x##i64
+#else
+# define       LITERAL_LL(x)   x##ll
+#endif
 /*
  * To test skip a sparse file entry, this test does not read file data.
  */
@@ -47,7 +52,7 @@ DEFINE_TEST(test_read_format_gtar_sparse_skip_entry)
        /* Verify regular first file. */
        assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
        assertEqualString("a", archive_entry_pathname(ae));
-       assertEqualInt(10737418244, archive_entry_size(ae));
+       assertEqualInt(LITERAL_LL(10737418244), archive_entry_size(ae));
        assertEqualInt(archive_entry_is_encrypted(ae), 0);
        assertEqualIntA(a, archive_read_has_encrypted_entries(a),
            ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED);
@@ -86,7 +91,7 @@ DEFINE_TEST(test_read_format_gtar_sparse_skip_entry)
        /* Verify regular first file. */
        assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
        assertEqualString("a", archive_entry_pathname(ae));
-       assertEqualInt(10737418244, archive_entry_size(ae));
+       assertEqualInt(LITERAL_LL(10737418244), archive_entry_size(ae));
        assertEqualInt(archive_entry_is_encrypted(ae), 0);
        assertEqualIntA(a, archive_read_has_encrypted_entries(a),
            ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED);