From d2a216b28e405332136f80e23ee8a246a89c6f2c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 17 Feb 2015 16:21:13 -0600 Subject: [PATCH 1/3] More MS Windows-x64 test fixes --- src/libCom/test/epicsCalcTest.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libCom/test/epicsCalcTest.cpp b/src/libCom/test/epicsCalcTest.cpp index d7836a338..3fee4923b 100644 --- a/src/libCom/test/epicsCalcTest.cpp +++ b/src/libCom/test/epicsCalcTest.cpp @@ -553,10 +553,18 @@ MAIN(epicsCalcTest) testExpr(0.0 + NaN); testExpr(Inf + 0.0); testExpr(Inf + Inf); +#if defined(_WIN64) && defined(_MSC_VER) + testCalc("Inf + -Inf", NaN); +#else testExpr(Inf + -Inf); +#endif testExpr(Inf + NaN); testExpr(-Inf + 0.0); +#if defined(_WIN64) && defined(_MSC_VER) + testCalc("-Inf + Inf", NaN); +#else testExpr(-Inf + Inf); +#endif testExpr(-Inf + -Inf); testExpr(-Inf + NaN); testExpr(NaN + 0.0); From dda4eb3a58a3f213ac2478b3905be55134443cdc Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 18 Feb 2015 16:36:42 -0600 Subject: [PATCH 2/3] Fix more MS idiocy Windows has signed characters, but if you pass a negative value (i.e. a character with value >= 0x80) into the debug version of its isprint() runtime library function it asserts. --- src/libCom/misc/epicsString.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libCom/misc/epicsString.c b/src/libCom/misc/epicsString.c index 4ee9fed35..2ce13be6d 100644 --- a/src/libCom/misc/epicsString.c +++ b/src/libCom/misc/epicsString.c @@ -88,7 +88,7 @@ int epicsStrnRawFromEscaped(char *to, size_t outsize, const char *from, pfrom++; /*skip the x*/ for (i=0; i<2; i++) { - if (!isxdigit((int)*pfrom)) break; + if (!isxdigit(0xff & (int)*pfrom)) break; strval[i] = *pfrom++; nfrom++; } sscanf(strval,"%x",&ival); @@ -131,7 +131,7 @@ int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize, const char *inbuf, case '\'': len = epicsSnprintf(outpos, maxout, "\\'"); break; case '\"': len = epicsSnprintf(outpos, maxout, "\\\""); break; default: - if (isprint((int)c)) + if (isprint(0xff & (int)c)) len = epicsSnprintf(outpos, maxout, "%c", c); else len = epicsSnprintf(outpos, maxout, "\\%03o", @@ -166,7 +166,7 @@ size_t epicsStrnEscapedFromRawSize(const char *inbuf, size_t inlen) nout++; break; default: - if (!isprint((int)c)) + if (!isprint(0xff & (int)c)) nout += 3; } } @@ -230,7 +230,7 @@ int epicsStrPrintEscaped(FILE *fp, const char *s, size_t len) case '\'': nout += fprintf(fp, "\\'"); break; case '\"': nout += fprintf(fp, "\\\""); break; default: - if (isprint((int)c)) + if (isprint(0xff & (int)c)) nout += fprintf(fp, "%c", c); else nout += fprintf(fp, "\\%03o", (unsigned char)c); From 804aeafaa71938d7db0c0c4c4cb071b48b547b81 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 18 Feb 2015 16:44:07 -0600 Subject: [PATCH 3/3] Fix dbVerify()'s postfix buffer size --- src/dbStatic/dbStaticLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbStatic/dbStaticLib.c b/src/dbStatic/dbStaticLib.c index fa6a1303d..08ec137e1 100644 --- a/src/dbStatic/dbStaticLib.c +++ b/src/dbStatic/dbStaticLib.c @@ -45,7 +45,7 @@ int dbStaticDebug = 0; static char *pNullString = ""; #define messagesize 100 -#define RPCL_LEN 184 +#define RPCL_LEN INFIX_TO_POSTFIX_SIZE(80) static char *ppstring[5]={"NPP","PP","CA","CP","CPP"}; static char *msstring[4]={"NMS","MS","MSI","MSS"};