diff --git a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 index 9b2ccdd3b..4c8a176e3 100644 --- a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 +++ b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 @@ -1,22 +1,22 @@ -# CONFIG_SITE.Common.cygwin-x86_64 -# -# $Revision-Id$ -# -# Site Specific definitions for cygwin-x86_64 target -# Only the local epics system manager should modify this file - -# If readline is installed uncomment the following line -# to add command-line editing and history support -#COMMANDLINE_LIBRARY = READLINE - -# Uncomment the following line if readline has problems -#LDLIBS_READLINE = -lreadline -lcurses - - -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g - +# CONFIG_SITE.Common.cygwin-x86_64 +# +# $Revision-Id$ +# +# Site Specific definitions for cygwin-x86_64 target +# Only the local epics system manager should modify this file + +# If readline is installed uncomment the following line +# to add command-line editing and history support +#COMMANDLINE_LIBRARY = READLINE + +# Uncomment the following line if readline has problems +#LDLIBS_READLINE = -lreadline -lcurses + + +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES += -g +OPT_CXXFLAGS_YES += -g + diff --git a/src/ca/client/tools/caput.c b/src/ca/client/tools/caput.c index fbd4ef79e..f6dcc21cd 100644 --- a/src/ca/client/tools/caput.c +++ b/src/ca/client/tools/caput.c @@ -492,14 +492,13 @@ int main (int argc, char *argv[]) } else { /* Not an ENUM */ if (charArrAsStr) { - count = len; dbrType = DBR_CHAR; - ebuf = calloc(strlen(cbuf)+1, sizeof(char)); + ebuf = calloc(len, sizeof(char)); if(!ebuf) { fprintf(stderr, "Memory allocation failed\n"); return 1; } - epicsStrnRawFromEscaped(ebuf, strlen(cbuf)+1, cbuf, strlen(cbuf)); + count = epicsStrnRawFromEscaped(ebuf, len, cbuf, len-1) + 1; } else { for (i = 0; i < count; ++i) { epicsStrnRawFromEscaped(sbuf[i], sizeof(EpicsStr), *(argv+optind+i), sizeof(EpicsStr)); diff --git a/src/libCom/calc/calcPerform.c b/src/libCom/calc/calcPerform.c index e53d860e2..b9b28dd3a 100644 --- a/src/libCom/calc/calcPerform.c +++ b/src/libCom/calc/calcPerform.c @@ -155,7 +155,7 @@ epicsShareFunc long break; case ABS_VAL: - if (*ptop < 0.0) *ptop = - *ptop; + *ptop = fabs(*ptop); break; case EXP: