diff --git a/src/ca/access.cpp b/src/ca/access.cpp index 99dcd602a..1c5dfaa93 100644 --- a/src/ca/access.cpp +++ b/src/ca/access.cpp @@ -248,74 +248,76 @@ LOCAL void ca_default_exception_handler (struct exception_handler_args args) /* * default local pv interface entry points that always fail */ -static pvId pvNameToIdNoop (const char *) -{ - return 0; -} -static int pvPutFieldNoop (pvId, int, - const void *, int) -{ - return -1; -} -static int pvGetFieldNoop (pvId, int, - void *, int, void *) -{ - return -1; -} -static long pvPutNotifyInitiateNoop (pvId, - unsigned, unsigned long, const void *, - void (*)(void *), void *, putNotifyId *) -{ - return -1; -} -static void pvPutNotifyDestroyNoop (putNotifyId) -{ -} -static const char * pvNameNoop (pvId) -{ - return ""; -} -static unsigned long pvNoElementsNoop (pvId) -{ - return 0u; -} -static short pvTypeNoop (pvId) -{ - return -1; -} -static dbEventCtx pvEventQueueInitNoop () -{ - return NULL; -} -static int pvEventQueueStartNoop (dbEventCtx, const char *, - void (*)(void *), void *, int) -{ - return -1; -} -static void pvEventQueueCloseNoop (dbEventCtx) -{ -} -static dbEventSubscription pvEventQueueAddEventNoop (dbEventCtx, pvId, - void (*)(void *, pvId, int, struct db_field_log *), - void *, unsigned) -{ - return NULL; -} -static int pvEventQueuePostSingleEventNoop (dbEventSubscription) -{ - return -1; -} -static void pvEventQueueCancelEventNoop (dbEventSubscription) -{ -} -static int pvEventQueueAddExtraLaborEventNoop (dbEventCtx, - void (*)(void *), void *) -{ - return -1; -} -static int pvEventQueuePostExtraLaborNoop (dbEventCtx) -{ - return -1; +extern "C" { + static pvId pvNameToIdNoop (const char *) + { + return 0; + } + static int pvPutFieldNoop (pvId, int, + const void *, int) + { + return -1; + } + static int pvGetFieldNoop (pvId, int, + void *, int, void *) + { + return -1; + } + static long pvPutNotifyInitiateNoop (pvId, + unsigned, unsigned long, const void *, + void (*)(void *), void *, putNotifyId *) + { + return -1; + } + static void pvPutNotifyDestroyNoop (putNotifyId) + { + } + static const char * pvNameNoop (pvId) + { + return ""; + } + static unsigned long pvNoElementsNoop (pvId) + { + return 0u; + } + static short pvTypeNoop (pvId) + { + return -1; + } + static dbEventCtx pvEventQueueInitNoop () + { + return NULL; + } + static int pvEventQueueStartNoop (dbEventCtx, const char *, + void (*)(void *), void *, int) + { + return -1; + } + static void pvEventQueueCloseNoop (dbEventCtx) + { + } + static dbEventSubscription pvEventQueueAddEventNoop (dbEventCtx, pvId, + void (*)(void *, pvId, int, struct db_field_log *), + void *, unsigned) + { + return NULL; + } + static int pvEventQueuePostSingleEventNoop (dbEventSubscription) + { + return -1; + } + static void pvEventQueueCancelEventNoop (dbEventSubscription) + { + } + static int pvEventQueueAddExtraLaborEventNoop (dbEventCtx, + void (*)(void *), void *) + { + return -1; + } + static int pvEventQueuePostExtraLaborNoop (dbEventCtx) + { + return -1; + } } LOCAL const pvAdapter pvAdapterNOOP =