From 6a9eccdec12a79785c8a26fc831e4195b5bf9eca Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Thu, 29 Jan 2015 14:36:55 +0100 Subject: [PATCH 1/5] gdd: fix issue when copying from an emtpy array if the source array is empty, the index of the first element to copy (0) being equal to the source array size (0) does not constitute an out-of-bounds condition --- src/gdd/gdd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gdd/gdd.cc b/src/gdd/gdd.cc index 2ff4675fe..a0f38daef 100644 --- a/src/gdd/gdd.cc +++ b/src/gdd/gdd.cc @@ -1353,7 +1353,7 @@ gddStatus gdd::put ( const gdd * dd ) // clip to upper limit of source aitUint32 srcCopySize; const aitUint32 unusedSrcBelow = srcCopyFirst - srcFirst; - if ( srcElemCount <= unusedSrcBelow ) { + if ( srcElemCount && srcElemCount <= unusedSrcBelow ) { return gddErrorOutOfBounds; } From c91725d3a4f497b8bd6c7ae1f214b5008206c0fa Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 30 Jan 2015 16:12:42 -0600 Subject: [PATCH 2/5] Linux flag changes to remove glibc 2.20 warnings Replace _BSD_SOURCE and other flags with _GNU_SOURCE and _DEFAULT_SOURCE --- configure/os/CONFIG.Common.linuxCommon | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index 4f91583d7..faee4a7b2 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -12,13 +12,10 @@ include $(CONFIG)/os/CONFIG.Common.UnixCommon OS_CLASS = Linux -CODE_CPPFLAGS = -D_REENTRANT - -POSIX_CPPFLAGS = -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 +# Define _GNU_SOURCE and _DEFAULT_SOURCE for maximum portability +POSIX_CPPFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE POSIX_LDLIBS = -lpthread -# -D_BSD_SOURCE for gethostname() in unistd.h as needed by cacChannelIO.cpp. -OP_SYS_CPPFLAGS += -D_BSD_SOURCE OP_SYS_CPPFLAGS += -Dlinux OP_SYS_LDLIBS += -lrt -ldl From 4b0a4ffee273d374c21fdd225d9e18ce42c92093 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 4 Feb 2015 10:11:14 -0600 Subject: [PATCH 3/5] Build configuration for iOS --- configure/os/CONFIG.Common.iosCommon | 2 +- configure/os/CONFIG_SITE.Common.iosCommon | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/configure/os/CONFIG.Common.iosCommon b/configure/os/CONFIG.Common.iosCommon index df969bac4..90a5e49dd 100644 --- a/configure/os/CONFIG.Common.iosCommon +++ b/configure/os/CONFIG.Common.iosCommon @@ -25,7 +25,7 @@ OS_CLASS = iOS #-------------------------------------------------- # GNU and SDK directories GNU_DIR = $(PLATFORM_DIR)/Developer/usr -SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM)$(IOS_VERSION).sdk +SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM).sdk #------------------------------------------------------- # Build architecture flags diff --git a/configure/os/CONFIG_SITE.Common.iosCommon b/configure/os/CONFIG_SITE.Common.iosCommon index 17055e1dd..de51f6153 100644 --- a/configure/os/CONFIG_SITE.Common.iosCommon +++ b/configure/os/CONFIG_SITE.Common.iosCommon @@ -5,16 +5,6 @@ # Site-specific settings for Apple iOS builds #------------------------------------------------------- -# iOS SDK Version number (not the XCode version). -# We haven't tested our current build rules on the older -# versions of either XCode or the iOS SDK, be warned! - -#IOS_VERSION = 5.0 -#IOS_VERSION = 5.1 -#IOS_VERSION = 6.0 -#IOS_VERSION = 6.1 -IOS_VERSION = 7.0 - # Minimum version of iOS the executables must run on. # Earlier versions may work, if XCode supports them. @@ -23,6 +13,8 @@ IOS_VERSION = 7.0 #IOS_DEPLOYMENT_TARGET = 6.0 #IOS_DEPLOYMENT_TARGET = 6.1 IOS_DEPLOYMENT_TARGET = 7.0 +#IOS_DEPLOYMENT_TARGET = 8.0 +#IOS_DEPLOYMENT_TARGET = 8.1 # Which compiler to use: From fb960e5fc4661679e4824520f9e4b21c13820fc4 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 4 Feb 2015 11:04:40 -0600 Subject: [PATCH 4/5] Fix "make tapfiles" on Windows --- configure/RULES_BUILD | 2 +- src/tools/makeTestfile.pl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 3f952c516..33db58662 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -325,7 +325,7 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES) # A .tap file is the output from running the associated test script %.tap: %.t - -HARNESS_ACTIVE=1 $(PERL) $< > $@ + -$(PERL) $< -tap > $@ # If there's a perl test script (.plt) available, use it %.t: ../%.plt diff --git a/src/tools/makeTestfile.pl b/src/tools/makeTestfile.pl index 80f6f4d38..a037eb71c 100644 --- a/src/tools/makeTestfile.pl +++ b/src/tools/makeTestfile.pl @@ -12,6 +12,8 @@ # because some versions of the Perl test harness can only run test scripts # that are actually written in Perl. The script we generate execs the # real test program which must be in the same directory as the .t file. +# If the script is given an argument -tap it sets HARNESS_ACTIVE in the +# environment to make the epicsUnitTest code generate strict TAP output. # Usage: makeTestfile.pl target.t executable # target.t is the name of the Perl script to generate @@ -25,6 +27,7 @@ open(my $OUT, '>', $target) or die "Can't create $target: $!\n"; print $OUT < Date: Wed, 4 Feb 2015 11:39:26 -0600 Subject: [PATCH 5/5] Make .t files depend on /makeTestfile.pl --- configure/RULES_BUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index 33db58662..31267faf9 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -299,7 +299,7 @@ $(LOADABLE_SHRLIBNAME): $(LOADABLE_SHRLIB_PREFIX)%$(LOADABLE_SHRLIB_SUFFIX): @$(RM) $@ $(NM) $< > $@ -%_ctdt.c: %.nm +%_ctdt.c: %.nm $(TOOLS)/munch.pl @$(RM) $@ $(PERL) $(TOOLS)/munch.pl -o $@ $< @@ -334,7 +334,7 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES) # Test programs (.t files) must be written in Perl. # Generate a perl program to exec the real test binary. -%.t: %$(EXE) +%.t: %$(EXE) $(TOOLS)/makeTestfile.pl @$(RM) $@ $(PERL) $(TOOLS)/makeTestfile.pl $@ $<