[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. fbce397f3b8868807899b
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Michael B. <mdb...@us...> - 2021-01-21 15:37:57
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via fbce397f3b8868807899bbd73fb2329fe5c46958 (commit) from 619e130483a1c97a14896e67c9eefbafd0058c1f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fbce397f3b8868807899bbd73fb2329fe5c46958 Author: Michael Black W9MDB <mdb...@ya...> Date: Thu Jan 21 09:36:46 2021 -0600 Fix testrigcaps for ming32, ming64, and all others Structure packing may be different yet on some other compilers diff --git a/tests/testrigcaps.c b/tests/testrigcaps.c index 5ea84b43..e1d2eae1 100644 --- a/tests/testrigcaps.c +++ b/tests/testrigcaps.c @@ -13,12 +13,18 @@ int main() void *p2 = &rig->state.vfo_list; unsigned long offset = p2 - p1; printf("offset vfo_list=%ld\n", offset); - int expected = 13280; - int expected32 = 10144; - if (offset != expected && offset != expected32) +#if defined(__MINGW32__) + int expected = 10144; // mingw32 +#elif defined(__MINGW64__) + int expected = 13264; // mingw64 +#else + int expected = 13280; // should be most 64-bit compilers +#endif + + if (offset != expected) { printf("offset of vfo_list has changed!!!\n"); - printf("64-bit was %d, 32-bit was %d, now %lu\n", expected, expected32, offset ); + printf("was %d, now %lu\n", expected, offset); retcode = 1; } @@ -26,12 +32,18 @@ int main() offset = p2 - p1; printf("offset power_max=%ld\n", offset); +#if defined(__MINGW32__) + expected = 10448; // mingw32 +#elif defined(__MINGW64__) + expected = 13664; // mingw64 +#else expected = 13696; - expected32 = 10448; - if (offset != expected && offset != expected32) +#endif + + if (offset != expected) { printf("offset of power_max has changed!!!\n"); - printf("64-bit was %d, 32-bit was %d, now %lu\n", expected, expected32, offset ); + printf("was %d, now %lu\n", expected, offset); retcode = 1; } ----------------------------------------------------------------------- Summary of changes: tests/testrigcaps.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) hooks/post-receive -- Hamlib -- Ham radio control libraries |