diff --git a/src/ca/os_depen.h b/src/ca/os_depen.h index f8b7fd796..bb582423e 100644 --- a/src/ca/os_depen.h +++ b/src/ca/os_depen.h @@ -13,6 +13,7 @@ * Also droped the TCPDELAY to 50 mS * .03 joh 090391 Updated for V5 vxWorks * .04 joh 092491 changed order of ops on LOCALTICKS + * .05 joh 092691 added NELEMENTS() * */ @@ -56,6 +57,10 @@ #define ERROR (-1) #endif +#ifndef NELEMENTS +#define NELEMENTS(array) (sizeof(array)/sizeof((array)[0])) +#endif + /************************************************************************/ /* Provided to enforce one thread at a time code sections */ /* independent of a particular operating system */ @@ -133,7 +138,7 @@ void *device; }; static char ca_unique_address; - #define MYTIMERID (&ca_unique_address) +# define MYTIMERID (&ca_unique_address) #endif