From 71e417b4dbd6da543ff8a87649958d7c107069d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Tue, 18 Sep 2018 18:04:05 +0200 Subject: [PATCH] define VERSION_INT when using older EPICS bases Newer EPICS base versions define VERSION_INT, but older don't. Add a conditional #define to compile against those older bases, like 3.14 --- motorApp/MotorSrc/devMotorAsyn.c | 4 ++++ motorApp/MotorSrc/motorRecord.cc | 4 ++++ motorApp/MotorSrc/motorUtilAux.cc | 4 ++++ motorApp/MotorSrc/motordevCom.cc | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/motorApp/MotorSrc/devMotorAsyn.c b/motorApp/MotorSrc/devMotorAsyn.c index 652c9edd..42f0180a 100644 --- a/motorApp/MotorSrc/devMotorAsyn.c +++ b/motorApp/MotorSrc/devMotorAsyn.c @@ -47,6 +47,10 @@ #include "epicsVersion.h" +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + #define VERSION_INT_3_16 VERSION_INT(3,16,0,0) #if EPICS_VERSION_INT < VERSION_INT_3_16 #define RECSUPFUN_CAST (RECSUPFUN) diff --git a/motorApp/MotorSrc/motorRecord.cc b/motorApp/MotorSrc/motorRecord.cc index bf0decda..befd4945 100644 --- a/motorApp/MotorSrc/motorRecord.cc +++ b/motorApp/MotorSrc/motorRecord.cc @@ -196,6 +196,10 @@ USAGE... Motor Record Support. #include "epicsVersion.h" +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + #define VERSION_INT_3_16 VERSION_INT(3,16,0,0) #if EPICS_VERSION_INT < VERSION_INT_3_16 #define RECSUPFUN_CAST (RECSUPFUN) diff --git a/motorApp/MotorSrc/motorUtilAux.cc b/motorApp/MotorSrc/motorUtilAux.cc index 5b5bbb79..018cb816 100644 --- a/motorApp/MotorSrc/motorUtilAux.cc +++ b/motorApp/MotorSrc/motorUtilAux.cc @@ -30,6 +30,10 @@ USAGE... Motor Record Utility Support. #include "epicsVersion.h" +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + #define VERSION_INT_3_16 VERSION_INT(3,16,0,0) #if EPICS_VERSION_INT < VERSION_INT_3_16 #define RECSUPFUN_CAST (RECSUPFUN) diff --git a/motorApp/MotorSrc/motordevCom.cc b/motorApp/MotorSrc/motordevCom.cc index cbe539a7..540da34f 100644 --- a/motorApp/MotorSrc/motordevCom.cc +++ b/motorApp/MotorSrc/motordevCom.cc @@ -61,6 +61,10 @@ USAGE... This file contains device functions that are common to all motor #include "epicsVersion.h" +#ifndef VERSION_INT +# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P)) +#endif + #define VERSION_INT_3_16 VERSION_INT(3,16,0,0) #if EPICS_VERSION_INT < VERSION_INT_3_16 #define RECSUPFUN_CAST (RECSUPFUN)