From 21375a0747d7421b9aefdc17ac8f43df1a6e83ba Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Tue, 1 Apr 2003 20:48:07 +0000 Subject: [PATCH] new file --- src/libCom/misc/epicsExport.h | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/libCom/misc/epicsExport.h diff --git a/src/libCom/misc/epicsExport.h b/src/libCom/misc/epicsExport.h new file mode 100644 index 000000000..5a46beddb --- /dev/null +++ b/src/libCom/misc/epicsExport.h @@ -0,0 +1,37 @@ +/*epicsExport.h */ + +/*************************************************************************\ +* Copyright (c) 2002 The University of Chicago, as Operator of Argonne +* National Laboratory. +* Copyright (c) 2002 The Regents of the University of California, as +* Operator of Los Alamos National Laboratory. +* EPICS BASE Versions 3.13.7 +* and higher are distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. +\*************************************************************************/ +#ifndef INCepicsExporth +#define INCepicsExporth + +#ifdef __cplusplus +extern "C" { +#endif + +#define epicsExportSharedSymbols +#include + +typedef void (*REGISTRAR)(void); + +#define EPICS_EXPORT_POBJ(obj) p ## obj + +#define epicsExportAddress(typ,obj) \ +epicsShareExtern typ *EPICS_EXPORT_POBJ(obj); \ +epicsShareDef typ *EPICS_EXPORT_POBJ(obj) = (typ *)&obj + +#define epicsExportRegistrar(func) \ +epicsShareFunc REGISTRAR EPICS_EXPORT_POBJ(func) = (REGISTRAR)&func + +#ifdef __cplusplus +} +#endif + +#endif /* epicsExporth */