From 73e7b324de6d5e2a1959b61d0619b2c4353e640d Mon Sep 17 00:00:00 2001 From: Josh MacDonald Date: Sat, 18 Jul 2015 00:26:11 -0700 Subject: run_release builds 32/64bit binaries for 32/64bit on linux and mingw --- xdelta3/testing/file.h | 5 +++-- xdelta3/testing/regtest.cc | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'xdelta3/testing') diff --git a/xdelta3/testing/file.h b/xdelta3/testing/file.h index 67309ac..05f9dde 100644 --- a/xdelta3/testing/file.h +++ b/xdelta3/testing/file.h @@ -311,8 +311,9 @@ class ExtFile { public: ExtFile() { static int static_counter = 0; - char buf[32]; - snprintf(buf, 32, "/tmp/regtest.%d", static_counter++); + pid_t pid = getpid(); + char buf[64]; + snprintf(buf, 64, "/tmp/regtest.%d.%d", pid, static_counter++); filename_.append(buf); unlink(filename_.c_str()); } diff --git a/xdelta3/testing/regtest.cc b/xdelta3/testing/regtest.cc index a09b444..305dc43 100644 --- a/xdelta3/testing/regtest.cc +++ b/xdelta3/testing/regtest.cc @@ -371,8 +371,10 @@ public: void TestPrintf() { char buf[64]; xoff_t x = XOFF_T_MAX; - snprintf_func (buf, sizeof(buf), "[%"Q"u]", x); - XD3_ASSERT(strcmp (buf, "[18446744073709551615]") == 0); + snprintf_func (buf, sizeof(buf), "%"Q"u", x); + const char *expect = XD3_USE_LARGEFILE64 ? + "18446744073709551615" : "4294967295"; + XD3_ASSERT(strcmp (buf, expect) == 0); } void TestRandomNumbers() { -- cgit v1.2.3