From 7ec63f6034f9afcec881c32321a311d85d43e58b Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Tue, 1 Apr 2003 21:06:49 +0000 Subject: [PATCH] changes for epicsExport --- src/dev/softDev/devAiSoft.c | 32 ++++++++--------- src/dev/softDev/devAiSoftRaw.c | 8 ++--- src/dev/softDev/devAoSoft.c | 32 ++++++++--------- src/dev/softDev/devAoSoftRaw.c | 11 +++--- src/dev/softDev/devBiSoft.c | 28 +++++++-------- src/dev/softDev/devBiSoftRaw.c | 28 +++++++-------- src/dev/softDev/devBoSoft.c | 32 ++++++++--------- src/dev/softDev/devBoSoftRaw.c | 34 ++++++++----------- src/dev/softDev/devEventSoft.c | 28 +++++++-------- src/dev/softDev/devHistogramSoft.c | 32 ++++++++--------- src/dev/softDev/devLiSoft.c | 28 +++++++-------- src/dev/softDev/devLoSoft.c | 28 +++++++-------- src/dev/softDev/devMbbiDirectSoft.c | 28 +++++++-------- src/dev/softDev/devMbbiDirectSoftRaw.c | 28 +++++++-------- src/dev/softDev/devMbbiSoft.c | 28 +++++++-------- src/dev/softDev/devMbbiSoftRaw.c | 28 +++++++-------- src/dev/softDev/devMbboDirectSoft.c | 28 +++++++-------- src/dev/softDev/devMbboDirectSoftRaw.c | 28 +++++++-------- src/dev/softDev/devMbboSoft.c | 28 +++++++-------- src/dev/softDev/devMbboSoftRaw.c | 28 +++++++-------- src/dev/softDev/devSASoft.c | 30 ++++++++-------- src/dev/softDev/devSiSoft.c | 28 +++++++-------- src/dev/softDev/devSoSoft.c | 28 +++++++-------- src/dev/softDev/devWfSoft.c | 30 ++++++++-------- src/dev/testDev/devAiTestAsyn.c | 8 ++--- src/dev/testDev/devAoTestAsyn.c | 8 ++--- src/dev/testDev/devBiTestAsyn.c | 8 ++--- src/dev/testDev/devBoTestAsyn.c | 8 ++--- src/dev/testDev/devEventTestIoEvent.c | 8 ++--- src/dev/testDev/devHistogramTestAsyn.c | 8 ++--- src/dev/testDev/devMbbiTestAsyn.c | 8 ++--- src/dev/testDev/devMbboTestAsyn.c | 8 ++--- src/dev/testDev/devSiTestAsyn.c | 8 ++--- src/dev/testDev/devSoTestAsyn.c | 8 ++--- src/dev/testDev/devWfTestAsyn.c | 8 ++--- .../top/exampleApp/src/dbSubExample.c | 6 ++-- .../top/exampleApp/src/devXxxSoft.c | 8 ++--- .../top/exampleApp/src/xxxRecord.c | 8 +++-- src/misc/asSubRecordFunctions.c | 6 ++-- src/rec/aaiRecord.c | 8 +++-- src/rec/aaoRecord.c | 8 +++-- src/rec/aiRecord.c | 8 +++-- src/rec/aoRecord.c | 5 +-- src/rec/biRecord.c | 5 +-- src/rec/boRecord.c | 8 +++-- src/rec/calcRecord.c | 8 +++-- src/rec/calcoutRecord.c | 5 +-- src/rec/compressRecord.c | 5 +-- src/rec/dfanoutRecord.c | 8 +++-- src/rec/egRecord.c | 8 +++-- src/rec/egeventRecord.c | 8 +++-- src/rec/erRecord.c | 8 +++-- src/rec/ereventRecord.c | 8 +++-- src/rec/eventRecord.c | 8 +++-- src/rec/fanoutRecord.c | 5 +-- src/rec/histogramRecord.c | 8 +++-- src/rec/longinRecord.c | 8 +++-- src/rec/longoutRecord.c | 8 +++-- src/rec/mbbiDirectRecord.c | 8 +++-- src/rec/mbbiRecord.c | 8 +++-- src/rec/mbboDirectRecord.c | 8 +++-- src/rec/mbboRecord.c | 8 +++-- src/rec/permissiveRecord.c | 8 +++-- src/rec/selRecord.c | 8 +++-- src/rec/seqRecord.c | 5 +-- src/rec/stateRecord.c | 8 +++-- src/rec/stringinRecord.c | 8 +++-- src/rec/stringoutRecord.c | 8 +++-- src/rec/subArrayRecord.c | 8 +++-- src/rec/subRecord.c | 8 +++-- src/rec/waveformRecord.c | 8 +++-- src/registry/registerRecordDeviceDriver.pl | 16 ++++----- 72 files changed, 509 insertions(+), 522 deletions(-) diff --git a/src/dev/softDev/devAiSoft.c b/src/dev/softDev/devAiSoft.c index bbfff6175..0a1590c0f 100644 --- a/src/dev/softDev/devAiSoft.c +++ b/src/dev/softDev/devAiSoft.c @@ -14,26 +14,25 @@ * Current Author: Marty Kraimer * Date: 3/6/91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "cvtTable.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "link.h" -#include "aiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "cvtTable.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "link.h" +#include "aiRecord.h" +#include "epicsExport.h" /* Create the dset for devAiSoft */ static long init_record(); static long read_ai(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -50,8 +49,7 @@ static struct { read_ai, NULL }; -epicsShareExtern dset *pdevAiSoft; -epicsShareDef dset *pdevAiSoft = (dset *)&devAiSoft; +epicsExportAddress(dset,devAiSoft); static long init_record(aiRecord *pai) { diff --git a/src/dev/softDev/devAiSoftRaw.c b/src/dev/softDev/devAiSoftRaw.c index a5df27482..230b8e6d9 100644 --- a/src/dev/softDev/devAiSoftRaw.c +++ b/src/dev/softDev/devAiSoftRaw.c @@ -28,13 +28,12 @@ #include "devSup.h" #include "link.h" #include "aiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devAiSoftRaw */ static long init_record(aiRecord *pai); static long read_ai(aiRecord *pai); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -51,8 +50,7 @@ static struct { read_ai, NULL }; -epicsShareExtern dset *pdevAiSoftRaw; -epicsShareDef dset *pdevAiSoftRaw = (dset *)&devAiSoftRaw; +epicsExportAddress(dset,devAiSoftRaw); static long init_record(aiRecord *pai) { diff --git a/src/dev/softDev/devAoSoft.c b/src/dev/softDev/devAoSoft.c index 29bdd54c6..fe92592ab 100644 --- a/src/dev/softDev/devAoSoft.c +++ b/src/dev/softDev/devAoSoft.c @@ -17,28 +17,27 @@ * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "link.h" -#include "special.h" -#include "aoRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "link.h" +#include "special.h" +#include "aoRecord.h" +#include "epicsExport.h" /* added for Channel Access Links */ static long init_record(); /* Create the dset for devAoSoft */ static long write_ao(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -54,8 +53,7 @@ static struct { NULL, write_ao, NULL}; -epicsShareExtern dset *pdevAoSoft; -epicsShareDef dset *pdevAoSoft = (dset *)&devAoSoft; +epicsExportAddress(dset,devAoSoft); static long init_record(aoRecord *pao) diff --git a/src/dev/softDev/devAoSoftRaw.c b/src/dev/softDev/devAoSoftRaw.c index 33c9a3a49..06340e92c 100644 --- a/src/dev/softDev/devAoSoftRaw.c +++ b/src/dev/softDev/devAoSoftRaw.c @@ -30,12 +30,11 @@ #include "link.h" #include "special.h" #include "aoRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devAoSoftRaw */ static long write_ao(aoRecord *pao); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -50,9 +49,9 @@ static struct { NULL, NULL, write_ao, - NULL}; -epicsShareExtern dset *pdevAoSoftRaw; -epicsShareDef dset *pdevAoSoftRaw = (dset *)&devAoSoftRaw; + NULL +}; +epicsExportAddress(dset,devAoSoftRaw); static long write_ao(aoRecord *pao) { diff --git a/src/dev/softDev/devBiSoft.c b/src/dev/softDev/devBiSoft.c index 7b958868a..902c13735 100644 --- a/src/dev/softDev/devBiSoft.c +++ b/src/dev/softDev/devBiSoft.c @@ -14,24 +14,23 @@ * Current Author: Marty Kraimer * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "biRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "biRecord.h" +#include "epicsExport.h" /* Create the dset for devBiSoft */ static long init_record(); static long read_bi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_bi }; -epicsShareExtern dset *pdevBiSoft; -epicsShareDef dset *pdevBiSoft = (dset *)&devBiSoft; +epicsExportAddress(dset,devBiSoft); static long init_record(biRecord *pbi) { diff --git a/src/dev/softDev/devBiSoftRaw.c b/src/dev/softDev/devBiSoftRaw.c index 82d599795..f18499275 100644 --- a/src/dev/softDev/devBiSoftRaw.c +++ b/src/dev/softDev/devBiSoftRaw.c @@ -14,24 +14,23 @@ * Current Author: Marty Kraimer * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "biRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "biRecord.h" +#include "epicsExport.h" /* Create the dset for devBiSoftRaw */ static long init_record(); static long read_bi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_bi }; -epicsShareExtern dset *pdevBiSoftRaw; -epicsShareDef dset *pdevBiSoftRaw = (dset *)&devBiSoftRaw; +epicsExportAddress(dset,devBiSoftRaw); static long init_record(biRecord *pbi) { diff --git a/src/dev/softDev/devBoSoft.c b/src/dev/softDev/devBoSoft.c index 4f7322519..3af34b26e 100644 --- a/src/dev/softDev/devBoSoft.c +++ b/src/dev/softDev/devBoSoft.c @@ -18,27 +18,25 @@ */ -#include -#include -#include - -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "boRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include +#include +#include +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "boRecord.h" +#include "epicsExport.h" static long init_record(); /* Create the dset for devBoSoft */ static long write_bo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -51,9 +49,9 @@ static struct { NULL, init_record, NULL, - write_bo}; -epicsShareExtern dset *pdevBoSoft; -epicsShareDef dset *pdevBoSoft = (dset *)&devBoSoft; + write_bo +}; +epicsExportAddress(dset,devBoSoft); static long init_record(boRecord *pbo) { diff --git a/src/dev/softDev/devBoSoftRaw.c b/src/dev/softDev/devBoSoftRaw.c index 7ddbfe853..74490e456 100644 --- a/src/dev/softDev/devBoSoftRaw.c +++ b/src/dev/softDev/devBoSoftRaw.c @@ -17,20 +17,18 @@ */ -#include -#include -#include - -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "boRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include +#include +#include +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "boRecord.h" +#include "epicsExport.h" /* added for Channel Access Links */ static long init_record(); @@ -38,7 +36,7 @@ static long init_record(); /* Create the dset for devBoSoftRaw */ static long write_bo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -51,11 +49,9 @@ static struct { NULL, init_record, NULL, - write_bo}; -epicsShareExtern dset *pdevBoSoftRaw; -epicsShareDef dset *pdevBoSoftRaw = (dset *)&devBoSoftRaw; - - + write_bo +}; +epicsExportAddress(dset,devBoSoftRaw); static long init_record(boRecord *pbo) { diff --git a/src/dev/softDev/devEventSoft.c b/src/dev/softDev/devEventSoft.c index 43189034d..75ebc92bc 100644 --- a/src/dev/softDev/devEventSoft.c +++ b/src/dev/softDev/devEventSoft.c @@ -13,25 +13,24 @@ * Author: Janet Anderson * Date: 04-21-91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "eventRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "eventRecord.h" +#include "epicsExport.h" /* Create the dset for devEventSoft */ static long init_record(); static long read_event(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_event }; -epicsShareExtern dset *pdevEventSoft; -epicsShareDef dset *pdevEventSoft = (dset *)&devEventSoft; +epicsExportAddress(dset,devEventSoft); static long init_record(eventRecord *pevent) { diff --git a/src/dev/softDev/devHistogramSoft.c b/src/dev/softDev/devHistogramSoft.c index 7c23d0020..2039a44dc 100644 --- a/src/dev/softDev/devHistogramSoft.c +++ b/src/dev/softDev/devHistogramSoft.c @@ -13,26 +13,25 @@ * Author: Janet Anderson * Date: 07/02/91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "cvtTable.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "link.h" -#include "histogramRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "cvtTable.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "link.h" +#include "histogramRecord.h" +#include "epicsExport.h" /* Create the dset for devHistogramSoft */ static long init_record(); static long read_histogram(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -49,8 +48,7 @@ static struct { read_histogram, NULL }; -epicsShareExtern dset *pdevHistogramSoft; -epicsShareDef dset *pdevHistogramSoft = (dset *)&devHistogramSoft; +epicsExportAddress(dset,devHistogramSoft); static long init_record(histogramRecord *phistogram) { diff --git a/src/dev/softDev/devLiSoft.c b/src/dev/softDev/devLiSoft.c index dfc640f19..8bf25e0fd 100644 --- a/src/dev/softDev/devLiSoft.c +++ b/src/dev/softDev/devLiSoft.c @@ -13,26 +13,25 @@ * Author: Janet Anderson * Date: 09-23-91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "longinRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "longinRecord.h" +#include "epicsExport.h" /* Create the dset for devLiSoft */ static long init_record(); static long read_longin(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -47,8 +46,7 @@ static struct { NULL, read_longin }; -epicsShareExtern dset *pdevLiSoft; -epicsShareDef dset *pdevLiSoft = (dset *)&devLiSoft; +epicsExportAddress(dset,devLiSoft); static long init_record(longinRecord *plongin) { diff --git a/src/dev/softDev/devLoSoft.c b/src/dev/softDev/devLoSoft.c index 85be7380a..1d2eac2d6 100644 --- a/src/dev/softDev/devLoSoft.c +++ b/src/dev/softDev/devLoSoft.c @@ -13,24 +13,23 @@ * Author: Janet Anderson * Date: 09-23-91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "longoutRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "longoutRecord.h" +#include "epicsExport.h" /* Create the dset for devLoSoft */ static long init_record(); static long write_longout(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -45,8 +44,7 @@ static struct { NULL, write_longout }; -epicsShareExtern dset *pdevLoSoft; -epicsShareDef dset *pdevLoSoft = (dset *)&devLoSoft; +epicsExportAddress(dset,devLoSoft); static long init_record(longoutRecord *plongout) { diff --git a/src/dev/softDev/devMbbiDirectSoft.c b/src/dev/softDev/devMbbiDirectSoft.c index 599f2dc15..bba256b03 100644 --- a/src/dev/softDev/devMbbiDirectSoft.c +++ b/src/dev/softDev/devMbbiDirectSoft.c @@ -14,24 +14,23 @@ * Current Author: Matthew Needes * Date: 10-08-93 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbbiDirectRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbbiDirectRecord.h" +#include "epicsExport.h" /* Create the dset for devMbbiSoft */ static long init_record(); static long read_mbbi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_mbbi }; -epicsShareExtern dset *pdevMbbiDirectSoft; -epicsShareDef dset *pdevMbbiDirectSoft = (dset *)&devMbbiDirectSoft; +epicsExportAddress(dset,devMbbiDirectSoft); static long init_record(mbbiDirectRecord *pmbbi) { diff --git a/src/dev/softDev/devMbbiDirectSoftRaw.c b/src/dev/softDev/devMbbiDirectSoftRaw.c index c24a51387..cf4b54fd6 100644 --- a/src/dev/softDev/devMbbiDirectSoftRaw.c +++ b/src/dev/softDev/devMbbiDirectSoftRaw.c @@ -14,24 +14,23 @@ * Current Author: Matthew Needes * Date: 10-08-93 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbbiDirectRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbbiDirectRecord.h" +#include "epicsExport.h" /* Create the dset for devMbbiDirectSoftRaw */ static long init_record(); static long read_mbbi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_mbbi }; -epicsShareExtern dset *pdevMbbiDirectSoftRaw; -epicsShareDef dset *pdevMbbiDirectSoftRaw = (dset *)&devMbbiDirectSoftRaw; +epicsExportAddress(dset,devMbbiDirectSoftRaw); static long init_record(mbbiDirectRecord *pmbbi) { diff --git a/src/dev/softDev/devMbbiSoft.c b/src/dev/softDev/devMbbiSoft.c index bbfe3487e..5a5dbcc8e 100644 --- a/src/dev/softDev/devMbbiSoft.c +++ b/src/dev/softDev/devMbbiSoft.c @@ -14,24 +14,23 @@ * Current Author: Marty Kraimer * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbbiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbbiRecord.h" +#include "epicsExport.h" /* Create the dset for devMbbiSoft */ static long init_record(); static long read_mbbi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_mbbi }; -epicsShareExtern dset *pdevMbbiSoft; -epicsShareDef dset *pdevMbbiSoft = (dset *)&devMbbiSoft; +epicsExportAddress(dset,devMbbiSoft); static long init_record(mbbiRecord *pmbbi) { diff --git a/src/dev/softDev/devMbbiSoftRaw.c b/src/dev/softDev/devMbbiSoftRaw.c index 87e9dc43b..77b720562 100644 --- a/src/dev/softDev/devMbbiSoftRaw.c +++ b/src/dev/softDev/devMbbiSoftRaw.c @@ -14,24 +14,23 @@ * Current Author: Marty Kraimer * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbbiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbbiRecord.h" +#include "epicsExport.h" /* Create the dset for devMbbiSoftRaw */ static long init_record(); static long read_mbbi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, read_mbbi }; -epicsShareExtern dset *pdevMbbiSoftRaw; -epicsShareDef dset *pdevMbbiSoftRaw = (dset *)&devMbbiSoftRaw; +epicsExportAddress(dset,devMbbiSoftRaw); static long init_record(mbbiRecord *pmbbi) { diff --git a/src/dev/softDev/devMbboDirectSoft.c b/src/dev/softDev/devMbboDirectSoft.c index 2c7a9083f..ac0073941 100644 --- a/src/dev/softDev/devMbboDirectSoft.c +++ b/src/dev/softDev/devMbboDirectSoft.c @@ -14,24 +14,23 @@ * Current Author: Matthew Needes * Date: 10-08-93 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbboDirectRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbboDirectRecord.h" +#include "epicsExport.h" /* Create the dset for devMbboSoft */ static long init_record(); static long write_mbbo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, write_mbbo }; -epicsShareExtern dset *pdevMbboDirectSoft; -epicsShareDef dset *pdevMbboDirectSoft = (dset *)&devMbboDirectSoft; +epicsExportAddress(dset,devMbboDirectSoft); static long init_record(mbboDirectRecord *pmbbo) { diff --git a/src/dev/softDev/devMbboDirectSoftRaw.c b/src/dev/softDev/devMbboDirectSoftRaw.c index d242aec1c..bfee0f9b9 100644 --- a/src/dev/softDev/devMbboDirectSoftRaw.c +++ b/src/dev/softDev/devMbboDirectSoftRaw.c @@ -14,25 +14,24 @@ * Current Author: Matthew Needes * Date: 10-08-93 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbboDirectRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbboDirectRecord.h" +#include "epicsExport.h" /* Create the dset for devMbboDirectSoftRaw */ static long init_record(); static long write_mbbo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -47,8 +46,7 @@ static struct { NULL, write_mbbo }; -epicsShareExtern dset *pdevMbboDirectSoftRaw; -epicsShareDef dset *pdevMbboDirectSoftRaw = (dset *)&devMbboDirectSoftRaw; +epicsExportAddress(dset,devMbboDirectSoftRaw); static long init_record(mbboDirectRecord *pmbbo) { diff --git a/src/dev/softDev/devMbboSoft.c b/src/dev/softDev/devMbboSoft.c index e073f43cb..c38212838 100644 --- a/src/dev/softDev/devMbboSoft.c +++ b/src/dev/softDev/devMbboSoft.c @@ -14,24 +14,23 @@ * Current Author: Marty Kraimer * Date: 6-1-90 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbboRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbboRecord.h" +#include "epicsExport.h" /* Create the dset for devMbboSoft */ static long init_record(); static long write_mbbo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, write_mbbo }; -epicsShareExtern dset *pdevMbboSoft; -epicsShareDef dset *pdevMbboSoft = (dset *)&devMbboSoft; +epicsExportAddress(dset,devMbboSoft); static long init_record(mbboRecord *pmbbo) { diff --git a/src/dev/softDev/devMbboSoftRaw.c b/src/dev/softDev/devMbboSoftRaw.c index 6c460a300..31bd786eb 100644 --- a/src/dev/softDev/devMbboSoftRaw.c +++ b/src/dev/softDev/devMbboSoftRaw.c @@ -13,24 +13,23 @@ * Author: Janet Anderson * Date: 3-28-92 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "mbboRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "mbboRecord.h" +#include "epicsExport.h" /* Create the dset for devMbboSoftRaw */ static long init_record(); static long write_mbbo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -45,8 +44,7 @@ static struct { NULL, write_mbbo }; -epicsShareExtern dset *pdevMbboSoftRaw; -epicsShareDef dset *pdevMbboSoftRaw = (dset *)&devMbboSoftRaw; +epicsExportAddress(dset,devMbboSoftRaw); static long init_record(mbboRecord *pmbbo) { diff --git a/src/dev/softDev/devSASoft.c b/src/dev/softDev/devSASoft.c index 4a7ecab5f..1c8e5c924 100644 --- a/src/dev/softDev/devSASoft.c +++ b/src/dev/softDev/devSASoft.c @@ -13,27 +13,26 @@ */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "link.h" -#include "subArrayRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "link.h" +#include "subArrayRecord.h" +#include "epicsExport.h" static int sizeofTypes[] = {MAX_STRING_SIZE,1,1,2,2,4,4,4,8,2}; /* Create the dset for devSASoft */ static long init_record(); static long read_sa(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -48,8 +47,7 @@ static struct { NULL, read_sa }; -epicsShareExtern dset *pdevSASoft; -epicsShareDef dset *pdevSASoft = (dset *)&devSASoft; +epicsExportAddress(dset,devSASoft); static long init_record(subArrayRecord *psa) diff --git a/src/dev/softDev/devSiSoft.c b/src/dev/softDev/devSiSoft.c index eb8b1f532..a79057cf2 100644 --- a/src/dev/softDev/devSiSoft.c +++ b/src/dev/softDev/devSiSoft.c @@ -15,24 +15,23 @@ */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "stringinRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "stringinRecord.h" +#include "epicsExport.h" /* Create the dset for devSiSoft */ static long init_record(); static long read_stringin(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -47,8 +46,7 @@ static struct { NULL, read_stringin }; -epicsShareExtern dset *pdevSiSoft; -epicsShareDef dset *pdevSiSoft = (dset *)&devSiSoft; +epicsExportAddress(dset,devSiSoft); static long init_record(stringinRecord *pstringin) { diff --git a/src/dev/softDev/devSoSoft.c b/src/dev/softDev/devSoSoft.c index 819a2504c..db77845b6 100644 --- a/src/dev/softDev/devSoSoft.c +++ b/src/dev/softDev/devSoSoft.c @@ -14,24 +14,23 @@ * Date: 04-21-91 */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "stringoutRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "stringoutRecord.h" +#include "epicsExport.h" /* Create the dset for devSoSoft */ static long init_record(); static long write_stringout(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -46,8 +45,7 @@ static struct { NULL, write_stringout }; -epicsShareExtern dset *pdevSoSoft; -epicsShareDef dset *pdevSoSoft = (dset *)&devSoSoft; +epicsExportAddress(dset,devSoSoft); static long init_record(stringoutRecord *pstringout) { diff --git a/src/dev/softDev/devWfSoft.c b/src/dev/softDev/devWfSoft.c index df5c50944..4bf27c7b1 100644 --- a/src/dev/softDev/devWfSoft.c +++ b/src/dev/softDev/devWfSoft.c @@ -18,25 +18,24 @@ */ -#include -#include -#include +#include +#include +#include -#include "alarm.h" -#include "dbDefs.h" -#include "dbAccess.h" -#include "recGbl.h" -#include "recSup.h" -#include "devSup.h" -#include "link.h" -#include "waveformRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "alarm.h" +#include "dbDefs.h" +#include "dbAccess.h" +#include "recGbl.h" +#include "recSup.h" +#include "devSup.h" +#include "link.h" +#include "waveformRecord.h" +#include "epicsExport.h" /* Create the dset for devWfSoft */ static long init_record(); static long read_wf(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -51,8 +50,7 @@ static struct { NULL, read_wf }; -epicsShareExtern dset *pdevWfSoft; -epicsShareDef dset *pdevWfSoft = (dset *)&devWfSoft; +epicsExportAddress(dset,devWfSoft); static long init_record(waveformRecord *pwf) diff --git a/src/dev/testDev/devAiTestAsyn.c b/src/dev/testDev/devAiTestAsyn.c index 7c3e39854..f682d16e8 100644 --- a/src/dev/testDev/devAiTestAsyn.c +++ b/src/dev/testDev/devAiTestAsyn.c @@ -33,13 +33,12 @@ #include "link.h" #include "dbCommon.h" #include "aiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devAiTestAsyn */ static long init_record(); static long read_ai(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -56,8 +55,7 @@ static struct { read_ai, NULL }; -epicsShareExtern dset *pdevAiTestAsyn; -epicsShareDef dset *pdevAiTestAsyn = (dset *)&devAiTestAsyn; +epicsExportAddress(dset,devAiTestAsyn); static long init_record(pai) diff --git a/src/dev/testDev/devAoTestAsyn.c b/src/dev/testDev/devAoTestAsyn.c index e45ed86bf..c3d56740e 100644 --- a/src/dev/testDev/devAoTestAsyn.c +++ b/src/dev/testDev/devAoTestAsyn.c @@ -34,13 +34,12 @@ #include "link.h" #include "dbCommon.h" #include "aoRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devAoTestAsyn */ static long init_record(); static long write_ao(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -57,8 +56,7 @@ static struct { write_ao, NULL }; -epicsShareExtern dset *pdevAoTestAsyn; -epicsShareDef dset *pdevAoTestAsyn = (dset *)&devAoTestAsyn; +epicsExportAddress(dset,devAoTestAsyn); static long init_record(pao) struct aoRecord *pao; diff --git a/src/dev/testDev/devBiTestAsyn.c b/src/dev/testDev/devBiTestAsyn.c index 7efbb8d0e..dc8ebc082 100644 --- a/src/dev/testDev/devBiTestAsyn.c +++ b/src/dev/testDev/devBiTestAsyn.c @@ -33,13 +33,12 @@ #include "link.h" #include "dbCommon.h" #include "biRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devBiTestAsyn */ static long init_record(); static long read_bi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -56,8 +55,7 @@ static struct { read_bi, NULL }; -epicsShareExtern dset *pdevBiTestAsyn; -epicsShareDef dset *pdevBiTestAsyn = (dset *)&devBiTestAsyn; +epicsExportAddress(dset,devBiTestAsyn); static long init_record(pbi) struct biRecord *pbi; diff --git a/src/dev/testDev/devBoTestAsyn.c b/src/dev/testDev/devBoTestAsyn.c index e088b09a2..1b1b96b12 100644 --- a/src/dev/testDev/devBoTestAsyn.c +++ b/src/dev/testDev/devBoTestAsyn.c @@ -34,13 +34,12 @@ #include "link.h" #include "dbCommon.h" #include "boRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devBoTestAsyn */ static long init_record(); static long write_bo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -57,8 +56,7 @@ static struct { write_bo, NULL }; -epicsShareExtern dset *pdevBoTestAsyn; -epicsShareDef dset *pdevBoTestAsyn = (dset *)&devBoTestAsyn; +epicsExportAddress(dset,devBoTestAsyn); static long init_record(pbo) struct boRecord *pbo; diff --git a/src/dev/testDev/devEventTestIoEvent.c b/src/dev/testDev/devEventTestIoEvent.c index a76ef3333..98c5483a3 100644 --- a/src/dev/testDev/devEventTestIoEvent.c +++ b/src/dev/testDev/devEventTestIoEvent.c @@ -27,14 +27,13 @@ #include "recSup.h" #include "devSup.h" #include "eventRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devEventTestIoEvent */ static long init_record(); static long get_ioint_info(); static long read_event(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -49,8 +48,7 @@ static struct { get_ioint_info, read_event }; -epicsShareExtern dset *pdevEventTestIoEvent; -epicsShareDef dset *pdevEventTestIoEvent = (dset *)&devEventTestIoEvent; +epicsExportAddress(dset,devEventTestIoEvent); typedef struct myCallback { CALLBACK callback; diff --git a/src/dev/testDev/devHistogramTestAsyn.c b/src/dev/testDev/devHistogramTestAsyn.c index fe0d48005..efa2f4a89 100644 --- a/src/dev/testDev/devHistogramTestAsyn.c +++ b/src/dev/testDev/devHistogramTestAsyn.c @@ -29,13 +29,12 @@ #include "link.h" #include "dbCommon.h" #include "histogramRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devHistogramTestAsyn */ static long init_record(); static long read_histogram(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -52,8 +51,7 @@ static struct { read_histogram, NULL }; -epicsShareExtern dset *pdevHistogramTestAsyn; -epicsShareDef dset *pdevHistogramTestAsyn = (dset *)&devHistogramTestAsyn; +epicsExportAddress(dset,devHistogramTestAsyn); static long init_record(phistogram) struct histogramRecord *phistogram; diff --git a/src/dev/testDev/devMbbiTestAsyn.c b/src/dev/testDev/devMbbiTestAsyn.c index db5f9c433..5e9a4256b 100644 --- a/src/dev/testDev/devMbbiTestAsyn.c +++ b/src/dev/testDev/devMbbiTestAsyn.c @@ -33,13 +33,12 @@ #include "link.h" #include "dbCommon.h" #include "mbbiRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devMbbiTestAsyn */ static long init_record(); static long read_mbbi(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -56,8 +55,7 @@ static struct { read_mbbi, NULL }; -epicsShareExtern dset *pdevMbbiTestAsyn; -epicsShareDef dset *pdevMbbiTestAsyn = (dset *)&devMbbiTestAsyn; +epicsExportAddress(dset,devMbbiTestAsyn); static long init_record(pmbbi) struct mbbiRecord *pmbbi; diff --git a/src/dev/testDev/devMbboTestAsyn.c b/src/dev/testDev/devMbboTestAsyn.c index 8ce2e9f10..2cd2314ce 100644 --- a/src/dev/testDev/devMbboTestAsyn.c +++ b/src/dev/testDev/devMbboTestAsyn.c @@ -34,13 +34,12 @@ #include "link.h" #include "dbCommon.h" #include "mbboRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devMbboTestAsyn */ static long init_record(); static long write_mbbo(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -57,8 +56,7 @@ static struct { write_mbbo, NULL }; -epicsShareExtern dset *pdevMbboTestAsyn; -epicsShareDef dset *pdevMbboTestAsyn = (dset *)&devMbboTestAsyn; +epicsExportAddress(dset,devMbboTestAsyn); static long init_record(pmbbo) struct mbboRecord *pmbbo; diff --git a/src/dev/testDev/devSiTestAsyn.c b/src/dev/testDev/devSiTestAsyn.c index 090290ac1..cb8d4636c 100644 --- a/src/dev/testDev/devSiTestAsyn.c +++ b/src/dev/testDev/devSiTestAsyn.c @@ -32,13 +32,12 @@ #include "link.h" #include "dbCommon.h" #include "stringinRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devSiTestAsyn */ static long init_record(); static long read_stringin(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -55,8 +54,7 @@ static struct { read_stringin, NULL }; -epicsShareExtern dset *pdevSiTestAsyn; -epicsShareDef dset *pdevSiTestAsyn = (dset *)&devSiTestAsyn; +epicsExportAddress(dset,devSiTestAsyn); static long init_record(pstringin) struct stringinRecord *pstringin; diff --git a/src/dev/testDev/devSoTestAsyn.c b/src/dev/testDev/devSoTestAsyn.c index a205ef326..4549dd213 100644 --- a/src/dev/testDev/devSoTestAsyn.c +++ b/src/dev/testDev/devSoTestAsyn.c @@ -33,13 +33,12 @@ #include "link.h" #include "dbCommon.h" #include "stringoutRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devSoTestAsyn */ static long init_record(); static long write_stringout(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -56,8 +55,7 @@ static struct { write_stringout, NULL }; -epicsShareExtern dset *pdevSoTestAsyn; -epicsShareDef dset *pdevSoTestAsyn = (dset *)&devSoTestAsyn; +epicsExportAddress(dset,devSoTestAsyn); static long init_record(pstringout) struct stringoutRecord *pstringout; diff --git a/src/dev/testDev/devWfTestAsyn.c b/src/dev/testDev/devWfTestAsyn.c index 7a6516af5..4a239c2a2 100644 --- a/src/dev/testDev/devWfTestAsyn.c +++ b/src/dev/testDev/devWfTestAsyn.c @@ -33,13 +33,12 @@ #include "link.h" #include "dbCommon.h" #include "waveformRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* Create the dset for devWfTestAsyn */ static long init_record(); static long read_wf(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -56,8 +55,7 @@ static struct { read_wf, NULL }; -epicsShareExtern dset *pdevWfTestAsyn; -epicsShareDef dset *pdevWfTestAsyn = (dset *)&devWfTestAsyn; +epicsExportAddress(dset,devWfTestAsyn); static long init_record(pwf) struct waveformRecord *pwf; diff --git a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c index 99ee781ab..fb8a97aa8 100644 --- a/src/makeBaseApp/top/exampleApp/src/dbSubExample.c +++ b/src/makeBaseApp/top/exampleApp/src/dbSubExample.c @@ -3,8 +3,7 @@ #include #include #include -#define epicsExportSharedSymbols -#include "shareLib.h" +#include typedef long (*processMethod)(subRecord *precord); @@ -27,8 +26,9 @@ static registryFunctionRef mySubRef[] = { {"mySubProcess",(REGISTRYFUNCTION)mySubProcess} }; -epicsShareFunc void mySub(void) +void mySub(void) { registryFunctionRefAdd(mySubRef,NELEMENTS(mySubRef)); } +epicsExportRegistrar(mySub); diff --git a/src/makeBaseApp/top/exampleApp/src/devXxxSoft.c b/src/makeBaseApp/top/exampleApp/src/devXxxSoft.c index 4d4aa8c21..0507fdfd0 100644 --- a/src/makeBaseApp/top/exampleApp/src/devXxxSoft.c +++ b/src/makeBaseApp/top/exampleApp/src/devXxxSoft.c @@ -15,13 +15,12 @@ #include "devSup.h" #include "link.h" #include "xxxRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /*Create the dset for devXxxSoft */ static long init_record(); static long read_xxx(); -static struct { +struct { long number; DEVSUPFUN report; DEVSUPFUN init; @@ -36,8 +35,7 @@ static struct { NULL, read_xxx, }; -epicsShareExtern dset *pdevXxxSoft; -epicsShareDef dset *pdevXxxSoft = (dset *)&devXxxSoft; +epicsExportAddress(dset,devXxxSoft); static long init_record(pxxx) diff --git a/src/makeBaseApp/top/exampleApp/src/xxxRecord.c b/src/makeBaseApp/top/exampleApp/src/xxxRecord.c index a9def0c45..6fb14726b 100644 --- a/src/makeBaseApp/top/exampleApp/src/xxxRecord.c +++ b/src/makeBaseApp/top/exampleApp/src/xxxRecord.c @@ -16,10 +16,10 @@ #include "errMdef.h" #include "recSup.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "xxxRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table */ #define report NULL @@ -40,7 +40,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset xxxRSET={ +rset xxxRSET={ RSETNUMBER, report, initialize, @@ -58,7 +58,9 @@ epicsShareDef struct rset xxxRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double}; + get_alarm_double +}; +epicsExportAddress(rset,xxxRSET); typedef struct xxxset { /* xxx input dset */ long number; diff --git a/src/misc/asSubRecordFunctions.c b/src/misc/asSubRecordFunctions.c index 286666c76..957db300a 100644 --- a/src/misc/asSubRecordFunctions.c +++ b/src/misc/asSubRecordFunctions.c @@ -29,8 +29,7 @@ #include "asLib.h" #include "asDbLib.h" #include "subRecord.h" -#define epicsExportSharedSymbols -#include "shareLib.h" +#include "epicsExport.h" /* The following is provided for access security*/ /*It allows a CA client to force access security initialization*/ @@ -85,7 +84,8 @@ static registryFunctionRef asSubRef[] = { {"asSubProcess",(REGISTRYFUNCTION)asSubProcess} }; -epicsShareFunc void asSub(void) +static void asSub(void) { registryFunctionRefAdd(asSubRef,NELEMENTS(asSubRef)); } +epicsExportRegistrar(asSub); diff --git a/src/rec/aaiRecord.c b/src/rec/aaiRecord.c index 60ea2ac71..124b8f09a 100644 --- a/src/rec/aaiRecord.c +++ b/src/rec/aaiRecord.c @@ -39,10 +39,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "aaiRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -63,7 +63,7 @@ static long get_graphic_double(); static long get_control_double(); #define get_alarm_double NULL -epicsShareDef struct rset aaiRSET={ +rset aaiRSET={ RSETNUMBER, report, initialize, @@ -81,7 +81,9 @@ epicsShareDef struct rset aaiRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,aaiRSET); struct aaidset { /* aai dset */ long number; diff --git a/src/rec/aaoRecord.c b/src/rec/aaoRecord.c index 8c4615956..65dbfadce 100644 --- a/src/rec/aaoRecord.c +++ b/src/rec/aaoRecord.c @@ -39,10 +39,10 @@ #include "devSup.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "aaoRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -63,7 +63,7 @@ static long get_graphic_double(); static long get_control_double(); #define get_alarm_double NULL -epicsShareDef struct rset aaoRSET={ +rset aaoRSET={ RSETNUMBER, report, initialize, @@ -81,7 +81,9 @@ epicsShareDef struct rset aaoRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,aaoRSET); struct aaodset { /* aao dset */ long number; diff --git a/src/rec/aiRecord.c b/src/rec/aiRecord.c index a64bed09b..6493c848d 100644 --- a/src/rec/aiRecord.c +++ b/src/rec/aiRecord.c @@ -36,10 +36,10 @@ #include "recGbl.h" #include "special.h" #include "menuConvert.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "aiRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -60,7 +60,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset aiRSET={ +rset aiRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset aiRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double}; + get_alarm_double +}; +epicsExportAddress(rset,aiRSET); typedef struct aidset { /* analog input dset */ long number; diff --git a/src/rec/aoRecord.c b/src/rec/aoRecord.c index 588f4b7d2..41078b461 100644 --- a/src/rec/aoRecord.c +++ b/src/rec/aoRecord.c @@ -37,11 +37,11 @@ #include "recGbl.h" #include "menuConvert.h" #include "menuOmsl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "aoRecord.h" #undef GEN_SIZE_OFFSET #include "menuIvoa.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -62,7 +62,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset aoRSET={ +rset aoRSET={ RSETNUMBER, report, initialize, @@ -91,6 +91,7 @@ struct aodset { /* analog input dset */ DEVSUPFUN write_ao;/*(0)=>(success ) */ DEVSUPFUN special_linconv; }; +epicsExportAddress(rset,aoRSET); diff --git a/src/rec/biRecord.c b/src/rec/biRecord.c index ec956d1a4..522bee865 100644 --- a/src/rec/biRecord.c +++ b/src/rec/biRecord.c @@ -35,10 +35,10 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "biRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL @@ -57,7 +57,7 @@ static long put_enum_str(); #define get_graphic_double NULL #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset biRSET={ +rset biRSET={ RSETNUMBER, report, initialize, @@ -85,6 +85,7 @@ struct bidset { /* binary input dset */ DEVSUPFUN read_bi;/*(0,2)=> success and convert, don't convert)*/ /* if convert then raw value stored in rval */ }; +epicsExportAddress(rset,biRSET); static void checkAlarms(); static void monitor(); static long readValue(); diff --git a/src/rec/boRecord.c b/src/rec/boRecord.c index ed0ce0d21..cfb466337 100644 --- a/src/rec/boRecord.c +++ b/src/rec/boRecord.c @@ -35,12 +35,12 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "boRecord.h" #undef GEN_SIZE_OFFSET #include "menuIvoa.h" #include "menuOmsl.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -61,7 +61,7 @@ static long put_enum_str(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset boRSET={ +rset boRSET={ RSETNUMBER, report, initialize, @@ -79,7 +79,9 @@ epicsShareDef struct rset boRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,boRSET); struct bodset { /* binary output dset */ long number; diff --git a/src/rec/calcRecord.c b/src/rec/calcRecord.c index befc5ce26..714a63c16 100644 --- a/src/rec/calcRecord.c +++ b/src/rec/calcRecord.c @@ -34,10 +34,10 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "calcRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -58,7 +58,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset calcRSET={ +rset calcRSET={ RSETNUMBER, report, initialize, @@ -76,7 +76,9 @@ epicsShareDef struct rset calcRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,calcRSET); static void checkAlarms(); static void monitor(); diff --git a/src/rec/calcoutRecord.c b/src/rec/calcoutRecord.c index ea05d5a84..959449a75 100644 --- a/src/rec/calcoutRecord.c +++ b/src/rec/calcoutRecord.c @@ -38,11 +38,11 @@ #include "taskwd.h" #include "postfix.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "calcoutRecord.h" #undef GEN_SIZE_OFFSET #include "menuIvoa.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -63,7 +63,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset calcoutRSET={ +rset calcoutRSET={ RSETNUMBER, report, initialize, @@ -83,6 +83,7 @@ epicsShareDef struct rset calcoutRSET={ get_control_double, get_alarm_double }; +epicsExportAddress(rset,calcoutRSET); /* To provide feedback to the user as to the connection status of the diff --git a/src/rec/compressRecord.c b/src/rec/compressRecord.c index f3fa33c2a..b178f866b 100644 --- a/src/rec/compressRecord.c +++ b/src/rec/compressRecord.c @@ -33,10 +33,10 @@ #include "special.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "compressRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -57,7 +57,7 @@ static long get_graphic_double(); static long get_control_double(); #define get_alarm_double NULL -epicsShareDef struct rset compressRSET={ +rset compressRSET={ RSETNUMBER, report, initialize, @@ -77,6 +77,7 @@ epicsShareDef struct rset compressRSET={ get_control_double, get_alarm_double }; +epicsExportAddress(rset,compressRSET); static void reset(compressRecord *pcompress) { diff --git a/src/rec/dfanoutRecord.c b/src/rec/dfanoutRecord.c index 027ab8b15..a388382ed 100644 --- a/src/rec/dfanoutRecord.c +++ b/src/rec/dfanoutRecord.c @@ -39,10 +39,10 @@ #include "recGbl.h" #include "special.h" #include "menuOmsl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "dfanoutRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -63,7 +63,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset dfanoutRSET={ +rset dfanoutRSET={ RSETNUMBER, report, initialize, @@ -81,7 +81,9 @@ epicsShareDef struct rset dfanoutRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,dfanoutRSET); static void checkAlarms(); diff --git a/src/rec/egRecord.c b/src/rec/egRecord.c index cd1b83154..3b3da2f38 100644 --- a/src/rec/egRecord.c +++ b/src/rec/egRecord.c @@ -31,11 +31,11 @@ #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "egRecord.h" #undef GEN_SIZE_OFFSET #include "egDefs.h" +#include "epicsExport.h" #define STATIC static @@ -60,7 +60,7 @@ STATIC long EgProc(struct egRecord *); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset egRSET={ +rset egRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset egRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,egRSET); diff --git a/src/rec/egeventRecord.c b/src/rec/egeventRecord.c index 9e9fb3aad..fccd25395 100644 --- a/src/rec/egeventRecord.c +++ b/src/rec/egeventRecord.c @@ -30,12 +30,12 @@ #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #include "egRecord.h" #define GEN_SIZE_OFFSET #include "egeventRecord.h" #undef GEN_SIZE_OFFSET #include "egDefs.h" +#include "epicsExport.h" #define STATIC static @@ -60,7 +60,7 @@ static long get_graphic_double(struct dbAddr *paddr, struct dbr_grDouble *pgd); static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd); static long get_alarm_double(struct dbAddr *paddr, struct dbr_alDouble *pad); -epicsShareDef struct rset egeventRSET={ +rset egeventRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset egeventRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,egeventRSET); diff --git a/src/rec/erRecord.c b/src/rec/erRecord.c index 36d1addfa..74176a75b 100644 --- a/src/rec/erRecord.c +++ b/src/rec/erRecord.c @@ -31,10 +31,10 @@ #include "recGbl.h" #include "erDefs.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "erRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" #define STATIC static @@ -59,7 +59,7 @@ static long get_graphic_double(struct dbAddr *paddr, struct dbr_grDouble *pgd); static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd); static long get_alarm_double(struct dbAddr *paddr, struct dbr_alDouble *pad); -epicsShareDef struct rset erRSET={ +rset erRSET={ RSETNUMBER, report, initialize, @@ -77,7 +77,9 @@ epicsShareDef struct rset erRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,erRSET); /****************************************************************************** diff --git a/src/rec/ereventRecord.c b/src/rec/ereventRecord.c index 2661b3e2c..527040e2a 100644 --- a/src/rec/ereventRecord.c +++ b/src/rec/ereventRecord.c @@ -31,10 +31,10 @@ #include "recGbl.h" #include "ereventDefs.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "ereventRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" #define STATIC static @@ -59,7 +59,7 @@ STATIC long ErEventProc(struct ereventRecord *); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset ereventRSET={ +rset ereventRSET={ RSETNUMBER, report, initialize, @@ -77,7 +77,9 @@ epicsShareDef struct rset ereventRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,ereventRSET); diff --git a/src/rec/eventRecord.c b/src/rec/eventRecord.c index cd90e8f5c..dae7dcc4f 100644 --- a/src/rec/eventRecord.c +++ b/src/rec/eventRecord.c @@ -33,10 +33,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "eventRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -57,7 +57,7 @@ static long get_value(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset eventRSET={ +rset eventRSET={ RSETNUMBER, report, initialize, @@ -75,7 +75,9 @@ epicsShareDef struct rset eventRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,eventRSET); struct eventdset { /* event input dset */ long number; diff --git a/src/rec/fanoutRecord.c b/src/rec/fanoutRecord.c index d173e52ea..80b023ec3 100644 --- a/src/rec/fanoutRecord.c +++ b/src/rec/fanoutRecord.c @@ -31,10 +31,10 @@ #include "recSup.h" #include "recGbl.h" #include "dbCommon.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "fanoutRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -55,7 +55,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset fanoutRSET={ +rset fanoutRSET={ RSETNUMBER, report, initialize, @@ -75,6 +75,7 @@ epicsShareDef struct rset fanoutRSET={ get_control_double, get_alarm_double }; +epicsExportAddress(rset,fanoutRSET); static long init_record(pfanout,pass) struct fanoutRecord *pfanout; diff --git a/src/rec/histogramRecord.c b/src/rec/histogramRecord.c index 90baa52d5..452b2e86c 100644 --- a/src/rec/histogramRecord.c +++ b/src/rec/histogramRecord.c @@ -37,10 +37,10 @@ #include "special.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "histogramRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -61,7 +61,7 @@ static long get_precision(struct dbAddr *paddr,long *precision); static long get_graphic_double(struct dbAddr *paddr,struct dbr_grDouble *pgd); static long get_control_double(struct dbAddr *paddr,struct dbr_ctrlDouble *pcd); -epicsShareDef struct rset histogramRSET={ +rset histogramRSET={ RSETNUMBER, report, initialize, @@ -79,7 +79,9 @@ epicsShareDef struct rset histogramRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,histogramRSET); struct histogramdset { /* histogram input dset */ long number; diff --git a/src/rec/longinRecord.c b/src/rec/longinRecord.c index 2b33cbc7e..794c4ad3d 100644 --- a/src/rec/longinRecord.c +++ b/src/rec/longinRecord.c @@ -32,10 +32,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "longinRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -56,7 +56,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset longinRSET={ +rset longinRSET={ RSETNUMBER, report, initialize, @@ -74,7 +74,9 @@ epicsShareDef struct rset longinRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,longinRSET); struct longindset { /* longin input dset */ diff --git a/src/rec/longoutRecord.c b/src/rec/longoutRecord.c index 881ba1b8a..3e17d1f07 100644 --- a/src/rec/longoutRecord.c +++ b/src/rec/longoutRecord.c @@ -29,12 +29,12 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "longoutRecord.h" #undef GEN_SIZE_OFFSET #include "menuIvoa.h" #include "menuOmsl.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -55,7 +55,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset longoutRSET={ +rset longoutRSET={ RSETNUMBER, report, initialize, @@ -73,7 +73,9 @@ epicsShareDef struct rset longoutRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,longoutRSET); struct longoutdset { /* longout input dset */ diff --git a/src/rec/mbbiDirectRecord.c b/src/rec/mbbiDirectRecord.c index 5987e82ea..175b55125 100644 --- a/src/rec/mbbiDirectRecord.c +++ b/src/rec/mbbiDirectRecord.c @@ -35,10 +35,10 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "mbbiDirectRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -59,7 +59,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset mbbiDirectRSET={ +rset mbbiDirectRSET={ RSETNUMBER, report, initialize, @@ -77,7 +77,9 @@ epicsShareDef struct rset mbbiDirectRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,mbbiDirectRSET); struct mbbidset { /* multi bit binary input dset */ long number; diff --git a/src/rec/mbbiRecord.c b/src/rec/mbbiRecord.c index 513e131dc..bd3cb57d0 100644 --- a/src/rec/mbbiRecord.c +++ b/src/rec/mbbiRecord.c @@ -32,10 +32,10 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "mbbiRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL @@ -54,7 +54,7 @@ static long put_enum_str(); #define get_graphic_double NULL #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset mbbiRSET={ +rset mbbiRSET={ RSETNUMBER, report, initialize, @@ -72,7 +72,9 @@ epicsShareDef struct rset mbbiRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,mbbiRSET); struct mbbidset { /* multi bit binary input dset */ long number; diff --git a/src/rec/mbboDirectRecord.c b/src/rec/mbboDirectRecord.c index 5f54b240a..2d11da2f1 100644 --- a/src/rec/mbboDirectRecord.c +++ b/src/rec/mbboDirectRecord.c @@ -34,12 +34,12 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "mbboDirectRecord.h" #undef GEN_SIZE_OFFSET #include "menuOmsl.h" #include "menuIvoa.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -60,7 +60,7 @@ static long special(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset mbboDirectRSET={ +rset mbboDirectRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset mbboDirectRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,mbboDirectRSET); struct mbbodset { /* multi bit binary output dset */ long number; diff --git a/src/rec/mbboRecord.c b/src/rec/mbboRecord.c index b1b3deb15..6e808f652 100644 --- a/src/rec/mbboRecord.c +++ b/src/rec/mbboRecord.c @@ -34,12 +34,12 @@ #include "recSup.h" #include "recGbl.h" #include "special.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "mbboRecord.h" #undef GEN_SIZE_OFFSET #include "menuOmsl.h" #include "menuIvoa.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -60,7 +60,7 @@ static long put_enum_str(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset mbboRSET={ +rset mbboRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset mbboRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,mbboRSET); struct mbbodset { /* multi bit binary output dset */ long number; diff --git a/src/rec/permissiveRecord.c b/src/rec/permissiveRecord.c index 9c0bbfe00..280a0cf41 100644 --- a/src/rec/permissiveRecord.c +++ b/src/rec/permissiveRecord.c @@ -31,10 +31,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "permissiveRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -55,7 +55,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset permissiveRSET={ +rset permissiveRSET={ RSETNUMBER, report, initialize, @@ -73,7 +73,9 @@ epicsShareDef struct rset permissiveRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,permissiveRSET); static void monitor(); diff --git a/src/rec/selRecord.c b/src/rec/selRecord.c index 78c28b0c2..fe786b83b 100644 --- a/src/rec/selRecord.c +++ b/src/rec/selRecord.c @@ -32,10 +32,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "selRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -56,7 +56,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset selRSET={ +rset selRSET={ RSETNUMBER, report, initialize, @@ -74,7 +74,9 @@ epicsShareDef struct rset selRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,selRSET); #define SEL_MAX 12 #define SELECTED 0 diff --git a/src/rec/seqRecord.c b/src/rec/seqRecord.c index acdbb8834..80d0b0f03 100644 --- a/src/rec/seqRecord.c +++ b/src/rec/seqRecord.c @@ -32,10 +32,10 @@ #include "special.h" #include "callback.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "seqRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" int seqRecDebug = 0; @@ -43,7 +43,7 @@ int seqRecDebug = 0; static long init_record(), process(), asyncFinish(), get_precision(); static void processCallback(); -epicsShareDef struct rset seqRSET={ +rset seqRSET={ RSETNUMBER, NULL, /* report */ NULL, /* initialize */ @@ -64,6 +64,7 @@ epicsShareDef struct rset seqRSET={ NULL /* get_alarm_double */ }; +epicsExportAddress(rset,seqRSET); /* Total number of link-groups in a sequence record */ #define NUM_LINKS 10 diff --git a/src/rec/stateRecord.c b/src/rec/stateRecord.c index 291255db1..2c8cd0226 100644 --- a/src/rec/stateRecord.c +++ b/src/rec/stateRecord.c @@ -32,10 +32,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "stateRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -56,7 +56,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset stateRSET={ +rset stateRSET={ RSETNUMBER, report, initialize, @@ -74,7 +74,9 @@ epicsShareDef struct rset stateRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,stateRSET); static void monitor(); diff --git a/src/rec/stringinRecord.c b/src/rec/stringinRecord.c index 389d87d81..da512420a 100644 --- a/src/rec/stringinRecord.c +++ b/src/rec/stringinRecord.c @@ -33,10 +33,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "stringinRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -57,7 +57,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset stringinRSET={ +rset stringinRSET={ RSETNUMBER, report, initialize, @@ -75,7 +75,9 @@ epicsShareDef struct rset stringinRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,stringinRSET); struct stringindset { /* stringin input dset */ long number; diff --git a/src/rec/stringoutRecord.c b/src/rec/stringoutRecord.c index 52d9034f6..e53081009 100644 --- a/src/rec/stringoutRecord.c +++ b/src/rec/stringoutRecord.c @@ -33,12 +33,12 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "stringoutRecord.h" #undef GEN_SIZE_OFFSET #include "menuOmsl.h" #include "menuIvoa.h" +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -59,7 +59,7 @@ static long process(); #define get_control_double NULL #define get_alarm_double NULL -epicsShareDef struct rset stringoutRSET={ +rset stringoutRSET={ RSETNUMBER, report, initialize, @@ -77,7 +77,9 @@ epicsShareDef struct rset stringoutRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,stringoutRSET); struct stringoutdset { /* stringout input dset */ long number; diff --git a/src/rec/subArrayRecord.c b/src/rec/subArrayRecord.c index 11b225969..ebf04c39e 100644 --- a/src/rec/subArrayRecord.c +++ b/src/rec/subArrayRecord.c @@ -35,10 +35,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "subArrayRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -59,7 +59,7 @@ static long get_graphic_double(); static long get_control_double(); #define get_alarm_double NULL -epicsShareDef struct rset subArrayRSET={ +rset subArrayRSET={ RSETNUMBER, report, initialize, @@ -77,7 +77,9 @@ epicsShareDef struct rset subArrayRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,subArrayRSET); struct sadset { /* subArray dset */ long number; diff --git a/src/rec/subRecord.c b/src/rec/subRecord.c index b727e903a..d2721ed73 100644 --- a/src/rec/subRecord.c +++ b/src/rec/subRecord.c @@ -36,10 +36,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "subRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL @@ -60,7 +60,7 @@ static long get_graphic_double(); static long get_control_double(); static long get_alarm_double(); -epicsShareDef struct rset subRSET={ +rset subRSET={ RSETNUMBER, report, initialize, @@ -78,7 +78,9 @@ epicsShareDef struct rset subRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,subRSET); static void checkAlarms(); static long do_sub(); diff --git a/src/rec/waveformRecord.c b/src/rec/waveformRecord.c index 1ffd2e5fc..39070b25c 100644 --- a/src/rec/waveformRecord.c +++ b/src/rec/waveformRecord.c @@ -34,10 +34,10 @@ #include "errMdef.h" #include "recSup.h" #include "recGbl.h" -#define epicsExportSharedSymbols #define GEN_SIZE_OFFSET #include "waveformRecord.h" #undef GEN_SIZE_OFFSET +#include "epicsExport.h" /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL @@ -56,7 +56,7 @@ static long get_precision(); static long get_graphic_double(); static long get_control_double(); #define get_alarm_double NULL -epicsShareDef struct rset waveformRSET={ +rset waveformRSET={ RSETNUMBER, report, initialize, @@ -74,7 +74,9 @@ epicsShareDef struct rset waveformRSET={ put_enum_str, get_graphic_double, get_control_double, - get_alarm_double }; + get_alarm_double +}; +epicsExportAddress(rset,waveformRSET); struct wfdset { /* waveform dset */ long number; DEVSUPFUN dev_report; diff --git a/src/registry/registerRecordDeviceDriver.pl b/src/registry/registerRecordDeviceDriver.pl index c748455f2..cdc8fec32 100755 --- a/src/registry/registerRecordDeviceDriver.pl +++ b/src/registry/registerRecordDeviceDriver.pl @@ -60,6 +60,7 @@ print << "END" ; #include "registryDeviceSupport.h" #include "registryDriverSupport.h" #include "iocsh.h" +#include "epicsExport.h" #include "shareLib.h" END @@ -68,8 +69,8 @@ print "extern \"C\" {\n"; #definitions for recordtype if($numberRecordType>0) { for ($i=0; $i<$numberRecordType; $i++) { - print "epicsShareExtern rset $recordType[$i]RSET;\n"; - print "epicsShareFunc int $recordType[$i]RecordSizeOffset(dbRecordType *pdbRecordType);\n" + print "epicsShareExtern rset *p$recordType[$i]RSET;\n"; + print "epicsShareExtern int (*p$recordType[$i]RecordSizeOffset)(dbRecordType *pdbRecordType);\n" } print "\nstatic const char * const recordTypeNames[$numberRecordType] = {\n"; for ($i=0; $i<$numberRecordType; $i++) { @@ -81,7 +82,7 @@ if($numberRecordType>0) { print "static const recordTypeLocation rtl[$i] = {\n"; for ($i=0; $i<$numberRecordType; $i++) { - print " {&$recordType[$i]RSET, $recordType[$i]RecordSizeOffset}"; + print " {p$recordType[$i]RSET, p$recordType[$i]RecordSizeOffset}"; if($i < $numberRecordType-1) { print ",";} print "\n"; } @@ -113,7 +114,7 @@ if($numberDeviceSupport>0) { #definitions for driver if($numberDriverSupport>0) { for ($i=0; $i<$numberDriverSupport; $i++) { - print "epicsShareExtern struct drvet $driverSupport[$i];\n"; + print "epicsShareExtern drvet *p$driverSupport[$i];\n"; } print "\nstatic char *driverSupportNames[$numberDriverSupport] = {\n"; for ($i=0; $i<$numberDriverSupport; $i++) { @@ -125,7 +126,7 @@ if($numberDriverSupport>0) { print "static struct drvet *drvsl[$i] = {\n"; for ($i=0; $i<$numberDriverSupport; $i++) { - print " &$driverSupport[$i]"; + print " p$driverSupport[$i]"; if($i < $numberDriverSupport-1) { print ",";} print "\n"; } @@ -134,9 +135,8 @@ if($numberDriverSupport>0) { #definitions registrar if($numberRegistrar>0) { - print "typedef void(*REGISTRARFUNC)(void);\n"; for ($i=0; $i<$numberRegistrar; $i++) { - print "epicsShareFunc void $registrar[$i](void);\n"; + print "epicsShareExtern void (*p$registrar[$i])(void);\n"; } } @@ -199,7 +199,7 @@ END } if($numberRegistrar>0) { for($i=0; $i< $numberRegistrar; $i++ ) { - print " $registrar[$i]();\n"; + print " (*p$registrar[$i])();\n"; } } print << "END" ;