From 411a60c32d269d6bf6dfcf2f4af23e4565a86aeb Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 16 Jun 2017 12:44:10 -0500 Subject: [PATCH 1/3] Add missing link libraries --- src/ioc/as/Makefile | 2 +- src/ioc/dbtemplate/test/Makefile | 2 +- src/std/filters/test/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ioc/as/Makefile b/src/ioc/as/Makefile index 971e6a594..303ede094 100644 --- a/src/ioc/as/Makefile +++ b/src/ioc/as/Makefile @@ -23,5 +23,5 @@ dbCore_SRCS += asIocRegister.c PROD_HOST += ascheck ascheck_SRCS = ascheck.c -ascheck_LIBS = dbCore +ascheck_LIBS = dbCore ca Com diff --git a/src/ioc/dbtemplate/test/Makefile b/src/ioc/dbtemplate/test/Makefile index 30e748983..fb03b54cf 100644 --- a/src/ioc/dbtemplate/test/Makefile +++ b/src/ioc/dbtemplate/test/Makefile @@ -11,7 +11,7 @@ include $(TOP)/configure/CONFIG TESTPROD_HOST_DEFAULT = dbltExpand TESTPROD_HOST_WIN32 = -nil- dbltExpand_SRCS += dbltExpand.c -dbltExpand_LIBS += dbCore Com +dbltExpand_LIBS += dbCore ca Com TESTS += msi diff --git a/src/std/filters/test/Makefile b/src/std/filters/test/Makefile index 5c17d7fe6..6e6ad79c6 100644 --- a/src/std/filters/test/Makefile +++ b/src/std/filters/test/Makefile @@ -14,7 +14,7 @@ TESTLIBRARY = Recs Recs_SRCS += xRecord.c Recs_SRCS += arrRecord.c -Recs_LIBS += dbCore Com +Recs_LIBS += dbCore ca Com PROD_LIBS = Recs dbRecStd dbCore ca Com From 69d530f1dbb5b41fda0c049ef97490f92a2a6fff Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 16 Jun 2017 15:37:55 -0500 Subject: [PATCH 2/3] Cross-build fix for generated .t files The *target* OS should determine whether to use system or exec. --- src/tools/makeTestfile.pl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/tools/makeTestfile.pl b/src/tools/makeTestfile.pl index 4ac5162db..be4648258 100644 --- a/src/tools/makeTestfile.pl +++ b/src/tools/makeTestfile.pl @@ -23,10 +23,6 @@ use strict; my ($target, $exe) = @ARGV; -# Use system on Windows, exec doesn't work the same there and -# GNUmake thinks the test has finished as soon as Perl exits. -my $exec = $^O eq 'MSWin32' ? "system('./$exe') == 0" : "exec './$exe'"; - open(my $OUT, '>', $target) or die "Can't create $target: $!\n"; print $OUT < Date: Tue, 20 Jun 2017 15:49:41 -0500 Subject: [PATCH 3/3] catools: dbr_long_t is only 32 bits wide Don't print it as a native long. Fixes LP: #1699332 --- src/catools/tool_lib.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/catools/tool_lib.c b/src/catools/tool_lib.c index 75225ee10..a29d7efaf 100644 --- a/src/catools/tool_lib.c +++ b/src/catools/tool_lib.c @@ -81,14 +81,14 @@ static void sprint_long (char *ret, dbr_long_t val, IntFormatT outType) } else { const char *fmt[4] = { /* Order must match the enum IntFormatT */ - "%ld" /* dec */, - "0" /* bin, val is 0 */, - "0o%lo" /* oct */, - "0x%lX" /* hex */ + "%d" /* dec */, + "0" /* bin and val is 0 */, + "0o%o" /* oct */, + "0x%X" /* hex */ }; - /* Formats have long modifier, pass value as a long */ - sprintf(ret, fmt[outType], (long) val); + /* dbr_long_t is actually an int on all supported platforms */ + sprintf(ret, fmt[outType], (int) val); } }