From d961067403579dbbc6dd47d22262b78c35686f94 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Fri, 11 Jun 2021 13:28:02 -0500 Subject: [PATCH 1/3] Simplify on Windows now that separate windows-x64 and windows-x64-static ARCHs exist --- Makefile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Makefile b/Makefile index 2ef405a..af6f15b 100644 --- a/Makefile +++ b/Makefile @@ -12,17 +12,6 @@ TOP = ../.. include $(TOP)/configure/CONFIG -ifdef WIN32 -# Use the following line if building ezca to be called from -# Visual Basic or other languages -#SHARED_LIBRARIES=YES -# Use the following line to build EzcaScan and ezcaIDL as -# standlone DLLs, i.e. without the need for ezca.dll in the path. -SHARED_LIBRARIES=NO -else -SHARED_LIBRARIES=YES -endif - INC += ezca.h LIBRARY_HOST = ezca ezca_SRCS = ezca.c From b90cb4f4075f28149cffd8e25cbe352a2cc5b749 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Fri, 11 Jun 2021 13:28:26 -0500 Subject: [PATCH 2/3] Not needed --- ezca.def | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 ezca.def diff --git a/ezca.def b/ezca.def deleted file mode 100644 index c816261..0000000 --- a/ezca.def +++ /dev/null @@ -1,39 +0,0 @@ -LIBRARY ezca - -EXPORTS - -ezcaGet -ezcaGetWithStatus -ezcaPut -ezcaPutOldCa -ezcaGetControlLimits -ezcaGetGraphicLimits -ezcaGetNelem -ezcaGetPrecision -ezcaGetStatus -ezcaGetUnits -ezcaAutoErrorMessageOn -ezcaAutoErrorMessageOff -ezcaPerror -ezcaGetErrorString -ezcaFree -ezcaStartGroup -ezcaEndGroup -ezcaEndGroupWithReport -ezcaSetMonitor -ezcaClearMonitor -ezcaNewMonitorValue -ezcaDelay -ezcaGetTimeout -ezcaSetTimeout -ezcaGetRetryCount -ezcaSetRetryCount -ezcaPvToChid -ezcaDebugOn -ezcaDebugOff -ezcaTraceOn -ezcaTraceOff -ezcaAbort -ezcaPollCbInstall -ezcaClearChannel -ezcaPurge From 394cd8a78892d9c3b26f658ee2820005f0d7f3d2 Mon Sep 17 00:00:00 2001 From: Mark Rivers Date: Fri, 11 Jun 2021 13:28:50 -0500 Subject: [PATCH 3/3] Minor changes to avoid compiler warnings --- ezca.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ezca.c b/ezca.c index 6e8ad2d..4fc831d 100644 --- a/ezca.c +++ b/ezca.c @@ -73,17 +73,17 @@ static epicsEventId ezcaDone = 0; #define EZCA_LOCK() \ do { \ if (DEBUG_LOCK) \ - printf("Thread %s (0x%lx) tries to lock\n", \ + printf("Thread %s (0x%p) tries to lock\n", \ epicsThreadGetNameSelf(), \ - (unsigned long)epicsThreadGetIdSelf()); \ + epicsThreadGetIdSelf()); \ epicsMutexLock(ezcaMutex); \ } while (0) #define EZCA_UNLOCK() \ do { \ if (DEBUG_LOCK) \ - printf("Thread %s (0x%lx) unlocks\n", \ + printf("Thread %s (0x%p) unlocks\n", \ epicsThreadGetNameSelf(), \ - (unsigned long)epicsThreadGetIdSelf()); \ + epicsThreadGetIdSelf()); \ epicsMutexUnlock(ezcaMutex); \ } while (0) #define DO_INIT_ONCE() \ @@ -1130,7 +1130,7 @@ int epicsShareAPI ezcaGetErrorString(char *prefix, char **buff) struct work *wp; char *wtm; char *cp; -unsigned nbytes; +size_t nbytes; int rc; prologue(); @@ -1277,7 +1277,7 @@ int rc; if ((*buff = ezcacalloc(nbytes, 1))) { if (Debug) - printf("ezcaGetErrorString() just allocated %d bytes\n", + printf("ezcaGetErrorString() just allocated %zu bytes\n", nbytes); /* filling the buffer */ @@ -2080,7 +2080,7 @@ int epicsShareAPI ezcaDelay(float sec) struct work *wp; int status; int rc; -int attempt; +unsigned int attempt; prologue(); @@ -2093,7 +2093,7 @@ int attempt; if (sec > 0) { - RetryCount = sec/TimeoutSeconds; + RetryCount = (unsigned int)(sec/TimeoutSeconds); if ( RetryCount * TimeoutSeconds < sec ) RetryCount++; for ( attempt=0, status = ECA_TIMEOUT; @@ -7726,7 +7726,7 @@ int i; ezcamalloc((unsigned) (sizeof(struct channel)*NODESPERMAL))) != NULL) { if (Debug) - printf("pop_channel() allocated sizeof(struct channel) %d * NODESPERMAL %d bytes = %d bytes %p\n", + printf("pop_channel() allocated sizeof(struct channel) %zu * NODESPERMAL %d bytes = %zu bytes %p\n", sizeof(struct channel), NODESPERMAL, sizeof(struct channel)*NODESPERMAL, Channel_avail_hdr); @@ -7807,7 +7807,7 @@ int i; ezcamalloc((unsigned) (sizeof(struct monitor)*NODESPERMAL))) != NULL) { if (Debug) - printf("pop_monitor() allocated sizeof(struct monitor) %d * NODESPERMAL %d bytes = %d bytes %p\n", + printf("pop_monitor() allocated sizeof(struct monitor) %zu * NODESPERMAL %d bytes = %zu bytes %p\n", sizeof(struct monitor), NODESPERMAL, sizeof(struct monitor)*NODESPERMAL, Monitor_avail_hdr); @@ -7888,7 +7888,7 @@ int i; { if (Debug) - printf("pop_work() allocated sizeof(struct work) %d * NODESPERMAL %d bytes = %d bytes %p\n", + printf("pop_work() allocated sizeof(struct work) %zu * NODESPERMAL %d bytes = %zu bytes %p\n", sizeof(struct work), NODESPERMAL, sizeof(struct work)*NODESPERMAL, Work_avail_hdr);