Merge ~epics-core/epics-base/+git/Com:libcom-api into ~epics-core/epics-base/+git/epics-base:7.0

Proposed by mdavidsaver
Status: Superseded
Proposed branch: ~epics-core/epics-base/+git/Com:libcom-api
Merge into: ~epics-core/epics-base/+git/epics-base:7.0
Diff against target: 10887 lines (+1348/-1603)
279 files modified
modules/ca/src/client/bhe.h (+1/-9)
modules/ca/src/client/cac.h (+1/-9)
modules/ca/src/client/cacIO.h (+1/-9)
modules/ca/src/client/cadef.h (+1/-9)
modules/ca/src/client/caerr.h (+2/-10)
modules/ca/src/client/db_access.h (+1/-9)
modules/ca/src/client/disconnectGovernorTimer.h (+1/-9)
modules/ca/src/client/nciu.h (+1/-9)
modules/ca/src/client/oldAccess.h (+1/-9)
modules/ca/src/client/repeaterClient.h (+1/-9)
modules/ca/src/client/repeaterSubscribeTimer.h (+1/-11)
modules/ca/src/client/searchTimer.h (+1/-9)
modules/ca/src/client/syncGroup.h (+1/-9)
modules/ca/src/client/tcpRecvWatchdog.h (+1/-9)
modules/ca/src/client/tcpSendWatchdog.h (+1/-9)
modules/ca/src/client/udpiiu.h (+1/-9)
modules/database/src/ioc/db/dbAccessDefs.h (+1/-9)
modules/database/src/ioc/db/dbCAC.h (+7/-6)
modules/libcom/src/Makefile (+3/-0)
modules/libcom/src/as/asLib.h (+40/-40)
modules/libcom/src/as/asLibRoutines.c (+34/-35)
modules/libcom/src/as/asTrapWrite.c (+4/-5)
modules/libcom/src/as/asTrapWrite.h (+3/-3)
modules/libcom/src/bucketLib/bucketLib.c (+15/-16)
modules/libcom/src/bucketLib/bucketLib.h (+16/-16)
modules/libcom/src/calc/calcPerform.c (+2/-3)
modules/libcom/src/calc/postfix.c (+4/-5)
modules/libcom/src/calc/postfix.h (+6/-6)
modules/libcom/src/cvtFast/cvtFast.c (+0/-1)
modules/libcom/src/cvtFast/cvtFast.h (+16/-16)
modules/libcom/src/cxxTemplates/epicsSingleton.h (+2/-2)
modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp (+0/-1)
modules/libcom/src/cxxTemplates/resourceLib.h (+2/-2)
modules/libcom/src/dbmf/dbmf.c (+0/-1)
modules/libcom/src/dbmf/dbmf.h (+9/-9)
modules/libcom/src/ellLib/ellLib.c (+0/-1)
modules/libcom/src/ellLib/ellLib.h (+14/-14)
modules/libcom/src/ellLib/ellSort.c (+0/-1)
modules/libcom/src/env/bldEnvData.pl (+3/-4)
modules/libcom/src/env/envDefs.h (+47/-47)
modules/libcom/src/env/envSubr.c (+9/-10)
modules/libcom/src/error/errSymLib.c (+0/-1)
modules/libcom/src/error/errSymTbl.h (+8/-8)
modules/libcom/src/error/errlog.c (+1/-2)
modules/libcom/src/error/errlog.h (+23/-23)
modules/libcom/src/fdmgr/fdManager.cpp (+5/-6)
modules/libcom/src/fdmgr/fdManager.h (+8/-8)
modules/libcom/src/fdmgr/fdmgr.cpp (+19/-20)
modules/libcom/src/fdmgr/fdmgr.h (+10/-10)
modules/libcom/src/flex/Makefile (+1/-1)
modules/libcom/src/flex/flex.c (+0/-1)
modules/libcom/src/freeList/freeList.h (+7/-7)
modules/libcom/src/freeList/freeListLib.c (+6/-7)
modules/libcom/src/gpHash/gpHash.h (+9/-9)
modules/libcom/src/gpHash/gpHashLib.c (+8/-9)
modules/libcom/src/iocsh/initHooks.c (+0/-1)
modules/libcom/src/iocsh/initHooks.h (+5/-5)
modules/libcom/src/iocsh/iocsh.cpp (+11/-12)
modules/libcom/src/iocsh/iocsh.h (+13/-13)
modules/libcom/src/iocsh/libComRegister.c (+1/-2)
modules/libcom/src/iocsh/libComRegister.h (+2/-2)
modules/libcom/src/iocsh/registry.c (+6/-7)
modules/libcom/src/iocsh/registry.h (+7/-7)
modules/libcom/src/libComAPI.h (+32/-0)
modules/libcom/src/libComVersion.h (+1/-1)
modules/libcom/src/log/iocLog.c (+4/-5)
modules/libcom/src/log/iocLog.h (+5/-5)
modules/libcom/src/log/iocLogServer.c (+3/-0)
modules/libcom/src/log/logClient.c (+5/-6)
modules/libcom/src/log/logClient.h (+7/-7)
modules/libcom/src/macLib/macCore.c (+9/-10)
modules/libcom/src/macLib/macEnv.c (+2/-3)
modules/libcom/src/macLib/macLib.h (+27/-27)
modules/libcom/src/macLib/macUtil.c (+2/-3)
modules/libcom/src/misc/aToIPAddr.c (+1/-2)
modules/libcom/src/misc/adjustment.c (+1/-2)
modules/libcom/src/misc/adjustment.h (+2/-2)
modules/libcom/src/misc/alarm.h (+3/-3)
modules/libcom/src/misc/alarmString.c (+2/-3)
modules/libcom/src/misc/cantProceed.c (+3/-4)
modules/libcom/src/misc/cantProceed.h (+4/-4)
modules/libcom/src/misc/epicsConvert.c (+1/-2)
modules/libcom/src/misc/epicsConvert.h (+2/-2)
modules/libcom/src/misc/epicsExit.c (+6/-7)
modules/libcom/src/misc/epicsExit.h (+7/-7)
modules/libcom/src/misc/epicsStdlib.c (+16/-17)
modules/libcom/src/misc/epicsStdlib.h (+15/-15)
modules/libcom/src/misc/epicsString.c (+0/-1)
modules/libcom/src/misc/epicsString.h (+15/-15)
modules/libcom/src/misc/epicsTypes.h (+11/-11)
modules/libcom/src/misc/epicsUnitTest.c (+0/-1)
modules/libcom/src/misc/epicsUnitTest.h (+15/-15)
modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp (+0/-1)
modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h (+4/-4)
modules/libcom/src/misc/shareLib.h (+1/-1)
modules/libcom/src/misc/truncateFile.c (+1/-2)
modules/libcom/src/misc/unixFileName.h (+3/-3)
modules/libcom/src/osi/devLibVME.c (+0/-1)
modules/libcom/src/osi/devLibVME.h (+28/-28)
modules/libcom/src/osi/devLibVMEImpl.h (+2/-2)
modules/libcom/src/osi/epicsAssert.h (+2/-2)
modules/libcom/src/osi/epicsAtomicDefault.h (+4/-4)
modules/libcom/src/osi/epicsEvent.cpp (+3/-4)
modules/libcom/src/osi/epicsEvent.h (+12/-12)
modules/libcom/src/osi/epicsFindSymbol.h (+4/-4)
modules/libcom/src/osi/epicsGeneralTime.c (+2/-3)
modules/libcom/src/osi/epicsGeneralTime.h (+9/-9)
modules/libcom/src/osi/epicsInterrupt.h (+5/-5)
modules/libcom/src/osi/epicsMath.cpp (+2/-3)
modules/libcom/src/osi/epicsMessageQueue.cpp (+0/-1)
modules/libcom/src/osi/epicsMessageQueue.h (+12/-12)
modules/libcom/src/osi/epicsMutex.cpp (+8/-9)
modules/libcom/src/osi/epicsMutex.h (+11/-11)
modules/libcom/src/osi/epicsReadline.c (+3/-4)
modules/libcom/src/osi/epicsReadline.h (+4/-4)
modules/libcom/src/osi/epicsSignal.h (+5/-5)
modules/libcom/src/osi/epicsSpin.h (+7/-7)
modules/libcom/src/osi/epicsStackTrace.c (+0/-1)
modules/libcom/src/osi/epicsStackTrace.h (+3/-3)
modules/libcom/src/osi/epicsStackTracePvt.h (+4/-4)
modules/libcom/src/osi/epicsStdio.c (+13/-14)
modules/libcom/src/osi/epicsStdio.h (+17/-17)
modules/libcom/src/osi/epicsTempFile.h (+2/-2)
modules/libcom/src/osi/epicsTempFilex.cpp (+5/-0)
modules/libcom/src/osi/epicsThread.cpp (+4/-5)
modules/libcom/src/osi/epicsThread.h (+40/-40)
modules/libcom/src/osi/epicsTime.cpp (+20/-21)
modules/libcom/src/osi/epicsTime.h (+33/-33)
modules/libcom/src/osi/generalTimeSup.h (+6/-6)
modules/libcom/src/osi/os/Darwin/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/Darwin/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/Darwin/osdFindAddr.c (+0/-1)
modules/libcom/src/osi/os/Darwin/osdMonotonic.c (+0/-1)
modules/libcom/src/osi/os/Darwin/osdSockAddrReuse.cpp (+2/-3)
modules/libcom/src/osi/os/Darwin/osdTime.cpp (+1/-2)
modules/libcom/src/osi/os/Darwin/osdTime.h (+1/-1)
modules/libcom/src/osi/os/Darwin/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/Linux/osdThread.h (+3/-3)
modules/libcom/src/osi/os/Linux/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/os/Linux/osdTime.h (+1/-1)
modules/libcom/src/osi/os/Linux/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/RTEMS/epicsAtomicOSD.h (+1/-1)
modules/libcom/src/osi/os/RTEMS/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/RTEMS/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/RTEMS/osdFindSymbol.c (+3/-4)
modules/libcom/src/osi/os/RTEMS/osdMessageQueue.c (+8/-9)
modules/libcom/src/osi/os/RTEMS/osdMutex.c (+1/-1)
modules/libcom/src/osi/os/RTEMS/osdPoolStatus.c (+1/-2)
modules/libcom/src/osi/os/RTEMS/osdProcess.c (+2/-3)
modules/libcom/src/osi/os/RTEMS/osdSignal.cpp (+4/-5)
modules/libcom/src/osi/os/RTEMS/osdThread.c (+5/-5)
modules/libcom/src/osi/os/RTEMS/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/os/WIN32/epicsGetopt.c (+2/-3)
modules/libcom/src/osi/os/WIN32/epicsGetopt.h (+4/-4)
modules/libcom/src/osi/os/WIN32/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp (+0/-1)
modules/libcom/src/osi/os/WIN32/epicsTempFile.cpp (+1/-2)
modules/libcom/src/osi/os/WIN32/osdBackTrace.cpp (+0/-1)
modules/libcom/src/osi/os/WIN32/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/WIN32/osdEvent.c (+8/-9)
modules/libcom/src/osi/os/WIN32/osdFindAddr.c (+0/-1)
modules/libcom/src/osi/os/WIN32/osdFindSymbol.c (+3/-4)
modules/libcom/src/osi/os/WIN32/osdMonotonic.c (+0/-1)
modules/libcom/src/osi/os/WIN32/osdMutex.c (+1/-2)
modules/libcom/src/osi/os/WIN32/osdNetIntf.c (+2/-3)
modules/libcom/src/osi/os/WIN32/osdPoolStatus.c (+1/-2)
modules/libcom/src/osi/os/WIN32/osdProcess.c (+2/-3)
modules/libcom/src/osi/os/WIN32/osdSignal.cpp (+4/-5)
modules/libcom/src/osi/os/WIN32/osdSock.c (+8/-9)
modules/libcom/src/osi/os/WIN32/osdSock.h (+1/-1)
modules/libcom/src/osi/os/WIN32/osdSockAddrReuse.cpp (+2/-3)
modules/libcom/src/osi/os/WIN32/osdSockUnsentCount.c (+0/-1)
modules/libcom/src/osi/os/WIN32/osdStdio.c (+2/-3)
modules/libcom/src/osi/os/WIN32/osdStrtod.h (+1/-1)
modules/libcom/src/osi/os/WIN32/osdThread.c (+29/-30)
modules/libcom/src/osi/os/WIN32/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/os/WIN32/osdTime.cpp (+2/-3)
modules/libcom/src/osi/os/WIN32/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/WIN32/osiFileName.h (+3/-3)
modules/libcom/src/osi/os/WIN32/systemCallIntMech.cpp (+0/-1)
modules/libcom/src/osi/os/cygwin32/devLibVMEOSD.c (+1/-2)
modules/libcom/src/osi/os/cygwin32/osdSockAddrReuse.cpp (+2/-3)
modules/libcom/src/osi/os/cygwin32/osdStrtod.h (+1/-1)
modules/libcom/src/osi/os/cygwin32/osiFileName.h (+3/-3)
modules/libcom/src/osi/os/cygwin32/systemCallIntMech.cpp (+0/-1)
modules/libcom/src/osi/os/default/devLibVMEOSD.c (+1/-2)
modules/libcom/src/osi/os/default/epicsMMIODef.h (+1/-1)
modules/libcom/src/osi/os/default/epicsSocketConvertErrnoToString.cpp (+0/-1)
modules/libcom/src/osi/os/default/osdAssert.c (+0/-1)
modules/libcom/src/osi/os/default/osdBackTrace.cpp (+0/-1)
modules/libcom/src/osi/os/default/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/default/osdFindAddr.c (+0/-1)
modules/libcom/src/osi/os/default/osdFindSymbol.c (+3/-4)
modules/libcom/src/osi/os/default/osdInterrupt.c (+4/-5)
modules/libcom/src/osi/os/default/osdMessageQueue.cpp (+10/-11)
modules/libcom/src/osi/os/default/osdNetIntf.c (+2/-3)
modules/libcom/src/osi/os/default/osdPoolStatus.c (+1/-2)
modules/libcom/src/osi/os/default/osdSignal.cpp (+4/-5)
modules/libcom/src/osi/os/default/osdSpin.c (+0/-1)
modules/libcom/src/osi/os/default/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/os/default/osdThreadHooks.c (+7/-8)
modules/libcom/src/osi/os/default/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/freebsd/osdTime.h (+1/-1)
modules/libcom/src/osi/os/freebsd/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/iOS/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/iOS/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/iOS/osdMonotonic.c (+0/-1)
modules/libcom/src/osi/os/iOS/osdSockAddrReuse.cpp (+2/-3)
modules/libcom/src/osi/os/iOS/osdTime.h (+1/-1)
modules/libcom/src/osi/os/posix/epicsAtomicOSD.cpp (+0/-1)
modules/libcom/src/osi/os/posix/epicsAtomicOSD.h (+4/-4)
modules/libcom/src/osi/os/posix/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/posix/epicsTempFile.cpp (+1/-2)
modules/libcom/src/osi/os/posix/osdElfFindAddr.c (+1/-2)
modules/libcom/src/osi/os/posix/osdEvent.c (+7/-8)
modules/libcom/src/osi/os/posix/osdExecinfoBackTrace.cpp (+0/-1)
modules/libcom/src/osi/os/posix/osdFindSymbol.c (+3/-4)
modules/libcom/src/osi/os/posix/osdMonotonic.c (+0/-1)
modules/libcom/src/osi/os/posix/osdMutex.c (+0/-1)
modules/libcom/src/osi/os/posix/osdProcess.c (+2/-3)
modules/libcom/src/osi/os/posix/osdSignal.cpp (+4/-5)
modules/libcom/src/osi/os/posix/osdSock.c (+5/-6)
modules/libcom/src/osi/os/posix/osdSockAddrReuse.cpp (+2/-3)
modules/libcom/src/osi/os/posix/osdSpin.c (+0/-1)
modules/libcom/src/osi/os/posix/osdStdio.c (+2/-3)
modules/libcom/src/osi/os/posix/osdThread.c (+32/-33)
modules/libcom/src/osi/os/posix/osdThread.h (+3/-3)
modules/libcom/src/osi/os/posix/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/os/posix/osdTime.cpp (+1/-2)
modules/libcom/src/osi/os/posix/osdTime.h (+1/-1)
modules/libcom/src/osi/os/posix/systemCallIntMech.cpp (+0/-1)
modules/libcom/src/osi/os/solaris/epicsAtomicOSD.h (+3/-3)
modules/libcom/src/osi/os/solaris/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/solaris/osdBackTrace.cpp (+0/-1)
modules/libcom/src/osi/os/solaris/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/solaris/osdStrtod.h (+1/-1)
modules/libcom/src/osi/os/solaris/osdgetexec.c (+0/-1)
modules/libcom/src/osi/os/vxWorks/epicsMath.h (+3/-3)
modules/libcom/src/osi/os/vxWorks/osdEnv.c (+3/-4)
modules/libcom/src/osi/os/vxWorks/osdFindSymbol.c (+2/-2)
modules/libcom/src/osi/os/vxWorks/osdMessageQueue.cpp (+2/-3)
modules/libcom/src/osi/os/vxWorks/osdPoolStatus.c (+1/-2)
modules/libcom/src/osi/os/vxWorks/osdProcess.c (+2/-3)
modules/libcom/src/osi/os/vxWorks/osdSignal.cpp (+4/-5)
modules/libcom/src/osi/os/vxWorks/osdSock.c (+5/-6)
modules/libcom/src/osi/os/vxWorks/osdThread.c (+3/-3)
modules/libcom/src/osi/os/vxWorks/osdThreadExtra.c (+2/-3)
modules/libcom/src/osi/osiClockTime.c (+0/-1)
modules/libcom/src/osi/osiNTPTime.c (+0/-1)
modules/libcom/src/osi/osiPoolStatus.h (+2/-2)
modules/libcom/src/osi/osiProcess.h (+3/-3)
modules/libcom/src/osi/osiSock.c (+5/-6)
modules/libcom/src/osi/osiSock.h (+22/-22)
modules/libcom/src/pool/epicsThreadPool.h (+16/-16)
modules/libcom/src/pool/poolJob.c (+0/-1)
modules/libcom/src/pool/threadPool.c (+2/-3)
modules/libcom/src/ring/epicsRingBytes.c (+13/-14)
modules/libcom/src/ring/epicsRingBytes.h (+14/-14)
modules/libcom/src/ring/epicsRingPointer.cpp (+13/-14)
modules/libcom/src/ring/epicsRingPointer.h (+14/-14)
modules/libcom/src/taskwd/taskwd.c (+1/-2)
modules/libcom/src/taskwd/taskwd.h (+9/-9)
modules/libcom/src/timer/epicsTimer.cpp (+20/-21)
modules/libcom/src/timer/epicsTimer.h (+29/-29)
modules/libcom/src/timer/timer.cpp (+0/-1)
modules/libcom/src/timer/timerQueue.cpp (+0/-1)
modules/libcom/src/timer/timerQueueActive.cpp (+0/-1)
modules/libcom/src/timer/timerQueueActiveMgr.cpp (+0/-1)
modules/libcom/src/timer/timerQueuePassive.cpp (+0/-1)
modules/libcom/src/yacc/Makefile (+1/-1)
modules/libcom/src/yacc/antelope.c (+0/-1)
modules/libcom/src/yajl/yajl.c (+0/-1)
modules/libcom/src/yajl/yajl_alloc.c (+0/-1)
modules/libcom/src/yajl/yajl_buf.c (+0/-1)
modules/libcom/src/yajl/yajl_common.h (+2/-2)
modules/libcom/src/yajl/yajl_encode.c (+0/-1)
modules/libcom/src/yajl/yajl_gen.c (+0/-1)
modules/libcom/src/yajl/yajl_lex.c (+0/-1)
modules/libcom/src/yajl/yajl_parser.c (+0/-1)
Reviewer Review Type Date Requested Status
EPICS Core Developers Pending
Review via email: mp+375942@code.launchpad.net

This proposal has been superseded by a proposal from 2020-03-12.

Description of the change

After another frustrating iteration of dllimport/export hell, I decided to see what was entailed in replacing use of shareLib.h in libCom (only). This large, but highly mechanical, change set is the result. (done with 'sed')

Adds libComAPI.h which defines LIBCOM_API and LIBCOMSTD_API. Use of the macro epicsExportSharedSymbols is replaced by LIBCOM_API_BUILDING.

Complicates encountered:

1. Defining LIBCOM_API_BUILDING at the directory level necessitates special handling of epicsTempFile.cpp (now compiled twice) and iocLogServer. This could be avoided by doing the executable builds in separate directories.

2. libComAPI.h still includes shareLib.h due to the unfortunate example in shareLib.h for working around ordering problems by un/re-defining epicsExportSharedSymbols. All code using this pattern breaks unless every Base header includes shareLib.h :( The fix is trivial, but too widespread and otherwise inconsequential to force a break now.

The end result is that no downstream/user changes are needed. I did however, go ahead and remove the now unnecessary un/re-define games from the libca headers.

To post a comment you must log in.
Revision history for this message
Ralph Lange (ralph-lange) wrote :

I like the cleaner approach!

As granularity is by library, every library will need a header file like libComAPI.h with functionally identical content. Instead of replicating the code - could this header be generated at compile time?
(I'm not so much concerned about the replication itself - more about the number of places that have to be patched if the mechanism ever needs to be changed.)

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

> could this header be generated at compile time?

To me this is a desirable end goal, but not a short term blocker.
I made a brief, unsuccessful, attempt to do this before moving on.

The problem I ran into is that the usual recipe (as I understand it)
of manually adding a rule relating each .d file to a generated header
isn't realistically scalable to the ~100 .o files which make up libCom.

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

Meeting: Yes, after doxygen changes merged.

AI on ANJ: to look at generating libComAPI.h (and eventually others)

Revision history for this message
Andrew Johnson (anj) wrote :

FYI I have a working generator script, and the necessary adjustments to the build rules to create the requested API.h file before the .d files are generated.

Is it reasonable to assume that at most one API.h file will need to be generated per build directory? I can support multiples if necessary, but it would need some more work on the build rules. I don't think your LIBCOM_API_BUILDING variable would work as is in the case of building multiple DLLs in the same build dir if any of them called any others.

BTW it is possible to set variables to values that vary when building different targets, they're called Target Specific Variables by GNUmake and they apply when building prerequisites ** n of the target too. Try something like this:

BUILDING = YES
FLAGS_YES = -DLIBCOM_API_BUILDING
USR_CPPFLAGS = $(FLAGS_$(BUILDING))
iocLogServer$(exe): BUILDING = NO

I haven't tested this particular construct, but I have used target-specific variables before, there's one in modules/libcom/osi/Makefile for example.

Revision history for this message
Andrew Johnson (anj) wrote :

Got a better way that only defines LIBCOM_API_BUILDING when it's compiling files that will go into the library. Add the line below to the Makefile *after* the "include $(TOP)/configure/RULES"

$(LIBNAME): USR_CPPFLAGS += -DLIBCOM_API_BUILDING

Tested on Linux, I /assume/ this will work on Windows but haven't tried it yet.

Revision history for this message
Andrew Johnson (anj) wrote :

Correction to my Makefile line above, which should be:

$(LIBNAME) $(SHRLIBNAME): USR_CPPFLAGS += -DLIBCOM_API_BUILDING

I also have a better solution for the epicsTempFile.cpp files (there are both os/posix and os/WIN32 implementations): Rename them to .c and remove the extern "C" wrappers, then #include that inside the antelope.c file instead of the header file. I haven't tried the result on an MSVC target but the mingw cross-build works. I have pushed these changes as a separate GitHub branch since they don't depend on the libComAPI.h stuff.

Revision history for this message
mdavidsaver (mdavidsaver) wrote :

> Is it reasonable to assume that at most one API.h file will need to be generated per build directory?

Is it reasonable to assume that only one shared library will be built per build directory?

I can't recall wanting to do this, so I've no particular objection to this limitation.

Revision history for this message
Ralph Lange (ralph-lange) wrote :

Would that be a limitation applying to libCom scope only, or more general.

As a general limitation, I have a gut feeling that this will backfire / break existing user code.
We would at least have to provide a migration guide showing how to deal with situations where multiple libraries are created in one place.

Revision history for this message
Andrew Johnson (anj) wrote :

If there are multiple libraries being built that use generated API.h files the Makefile needs to set the correct _API_BUILDING flag while building the sources for each library. That’s actually not too hard with the target specific variable approach I’m suggesting, although I’m not quite there yet. I just need a way to generate the specific LIBNAME and/or SHRLIBNAME being built for this target given the stem, which I think I know how to do.

Revision history for this message
Andrew Johnson (anj) wrote :

I think I've fixed the epicsTempFile.c build issue now (we'll find out for sure tomorrow); I have rules that allow building multiple libraries per Makefile, and I have tested this with a collection of Base APIs switched, across multiple modules. I'm waiting for the other branch to succeed before I push the next one.

I do want to rename the LIBCOMSTD_API macro which expands to '__stdcall' on Windows. It doesn't need to have the library name stem in it at all as long as it checks for an existing definition. I might have suggested that we stick with the original epicsShareAPI name except that isn't a very descriptive name either, and if we're going to change it now would seem to be the best time. I considered STDCALL, __stdcall, or even the Microsoft names pascal, WINAPI or NTAPI, but it doesn't look like they have #ifndef checks so we might have to go with something like epicsStdCall. Anyone got any better ideas?

Unmerged commits

f5e2011... by mdavidsaver

drop epicsExportSharedSymbols un/re-define

fe39293... by mdavidsaver

LIBCOM_API workaround for iocLogServer

for lack of PROD_CFLAGS LIB_CFLAGS ...

7ba5084... by mdavidsaver

use LIBCOM_API

sed -i \
 -e 's|epicsShareFunc|LIBCOM_API|g' \
 -e 's|epicsShareClass|LIBCOM_API|g' \
 -e 's|epicsShareExtern|LIBCOM_API extern|g' \
 -e 's|epicsShareDef\s*||g' \
 -e 's|shareLib\.h|libComAPI.h|g' \
 -e 's|epicsShareAPI|LIBCOMSTD_API|g' \
 -e '/#define\s*epicsExportSharedSymbols/d' \
 *.{h,c,cpp}

exclude changes to shareLib.h and epicsExport.h

f6a25a6... by mdavidsaver

build epicsTempFile again

Compile epicsTempFile.cpp twice, with different dllimport/export,
for use in Com.dll and e_flex/antelope.exe (which doesn't link
against Com).

9ea95e2... by mdavidsaver

workaround for unfortunately ubiquitous example

breaks until shareLib.h was included previously.
final include sould be _after_ the #endif

> #ifdef cacIOh_restore_epicsExportSharedSymbols
> # define epicsExportSharedSymbols
> # include "shareLib.h"
> #endif

8faddf0... by mdavidsaver

add libComAPI.h

a5e6e31... by mdavidsaver

correct unfortunate example

Everything breaks unless all base headers
include shareLib.h ....

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/modules/ca/src/client/bhe.h b/modules/ca/src/client/bhe.h
2index 4da9520..0534637 100644
3--- a/modules/ca/src/client/bhe.h
4+++ b/modules/ca/src/client/bhe.h
5@@ -22,20 +22,12 @@
6 #ifndef bheh
7 #define bheh
8
9-#ifdef epicsExportSharedSymbols
10-# define bhehEpicsExportSharedSymbols
11-# undef epicsExportSharedSymbols
12-#endif
13-
14 #include "tsDLList.h"
15 #include "tsFreeList.h"
16 #include "epicsTime.h"
17 #include "compilerDependencies.h"
18
19-#ifdef bhehEpicsExportSharedSymbols
20-# define epicsExportSharedSymbols
21-# include "shareLib.h"
22-#endif
23+#include "shareLib.h"
24
25 #include "inetAddrID.h"
26 #include "caProto.h"
27diff --git a/modules/ca/src/client/cac.h b/modules/ca/src/client/cac.h
28index 7db5c6d..6134628 100644
29--- a/modules/ca/src/client/cac.h
30+++ b/modules/ca/src/client/cac.h
31@@ -22,11 +22,6 @@
32 #ifndef cach
33 #define cach
34
35-#ifdef epicsExportSharedSymbols
36-# define cach_restore_epicsExportSharedSymbols
37-# undef epicsExportSharedSymbols
38-#endif
39-
40 #include "compilerDependencies.h"
41 #include "ipAddrToAsciiAsynchronous.h"
42 #include "msgForMultiplyDefinedPV.h"
43@@ -35,10 +30,7 @@
44 #include "freeList.h"
45 #include "localHostName.h"
46
47-#ifdef cach_restore_epicsExportSharedSymbols
48-# define epicsExportSharedSymbols
49-# include "shareLib.h"
50-#endif
51+#include "shareLib.h"
52
53 #include "nciu.h"
54 #include "comBuf.h"
55diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h
56index 4e8af4a..e512731 100644
57--- a/modules/ca/src/client/cacIO.h
58+++ b/modules/ca/src/client/cacIO.h
59@@ -47,20 +47,12 @@
60 #include <new>
61 #include <stdarg.h>
62
63-#ifdef epicsExportSharedSymbols
64-# define cacIOh_restore_epicsExportSharedSymbols
65-# undef epicsExportSharedSymbols
66-#endif
67-
68 #include "tsDLList.h"
69 #include "epicsMutex.h"
70 #include "epicsGuard.h"
71 #include "epicsThread.h"
72
73-#ifdef cacIOh_restore_epicsExportSharedSymbols
74-# define epicsExportSharedSymbols
75-# include "shareLib.h"
76-#endif
77+#include "shareLib.h"
78
79
80 class cacChannel;
81diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h
82index e62dd72..d51ad5f 100644
83--- a/modules/ca/src/client/cadef.h
84+++ b/modules/ca/src/client/cadef.h
85@@ -32,17 +32,9 @@
86 # include <stdarg.h>
87 #endif
88
89-#ifdef epicsExportSharedSymbols
90-# define INCLcadefh_accessh_epicsExportSharedSymbols
91-# undef epicsExportSharedSymbols
92-#endif
93-
94 #include "epicsThread.h"
95
96-#ifdef INCLcadefh_accessh_epicsExportSharedSymbols
97-# define epicsExportSharedSymbols
98-# include "shareLib.h"
99-#endif
100+#include "shareLib.h"
101
102
103 #include "caerr.h"
104diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h
105index 5393096..b846583 100644
106--- a/modules/ca/src/client/caerr.h
107+++ b/modules/ca/src/client/caerr.h
108@@ -23,17 +23,9 @@
109 #ifndef INCLcaerrh
110 #define INCLcaerrh
111
112-#ifdef epicsExportSharedSymbols
113-# define INCLcaerrh_accessh_epicsExportSharedSymbols
114-# undef epicsExportSharedSymbols
115-#endif
116-
117-# include "epicsTypes.h"
118+#include "epicsTypes.h"
119
120-#ifdef INCLcaerrh_accessh_epicsExportSharedSymbols
121-# define epicsExportSharedSymbols
122-# include "shareLib.h"
123-#endif
124+#include "shareLib.h"
125
126 /* CA Status Code Definitions */
127
128diff --git a/modules/ca/src/client/db_access.h b/modules/ca/src/client/db_access.h
129index 92aa5d0..b0318dc 100644
130--- a/modules/ca/src/client/db_access.h
131+++ b/modules/ca/src/client/db_access.h
132@@ -17,18 +17,10 @@
133
134 #include <stddef.h>
135
136-#ifdef epicsExportSharedSymbols
137-# define INCLdb_accessh_epicsExportSharedSymbols
138-# undef epicsExportSharedSymbols
139-#endif
140-
141 #include "epicsTypes.h"
142 #include "epicsTime.h"
143
144-#ifdef INCLdb_accessh_epicsExportSharedSymbols
145-# define epicsExportSharedSymbols
146-# include "shareLib.h"
147-#endif
148+#include "shareLib.h"
149
150
151 #ifdef __cplusplus
152diff --git a/modules/ca/src/client/disconnectGovernorTimer.h b/modules/ca/src/client/disconnectGovernorTimer.h
153index f636d62..1b83b39 100644
154--- a/modules/ca/src/client/disconnectGovernorTimer.h
155+++ b/modules/ca/src/client/disconnectGovernorTimer.h
156@@ -26,19 +26,11 @@
157 #ifndef disconnectGovernorTimerh
158 #define disconnectGovernorTimerh
159
160-#ifdef epicsExportSharedSymbols
161-# define searchTimerh_epicsExportSharedSymbols
162-# undef epicsExportSharedSymbols
163-#endif
164-
165 #include "epicsMutex.h"
166 #include "epicsGuard.h"
167 #include "epicsTimer.h"
168
169-#ifdef searchTimerh_epicsExportSharedSymbols
170-# define epicsExportSharedSymbols
171-# include "shareLib.h"
172-#endif
173+#include "shareLib.h"
174
175 #include "caProto.h"
176 #include "netiiu.h"
177diff --git a/modules/ca/src/client/nciu.h b/modules/ca/src/client/nciu.h
178index 7cba6e8..2e8231e 100644
179--- a/modules/ca/src/client/nciu.h
180+++ b/modules/ca/src/client/nciu.h
181@@ -25,21 +25,13 @@
182 #ifndef nciuh
183 #define nciuh
184
185-#ifdef epicsExportSharedSymbols
186-# define nciuh_restore_epicsExportSharedSymbols
187-# undef epicsExportSharedSymbols
188-#endif
189-
190 #include "resourceLib.h"
191 #include "tsDLList.h"
192 #include "tsFreeList.h"
193 #include "epicsMutex.h"
194 #include "compilerDependencies.h"
195
196-#ifdef nciuh_restore_epicsExportSharedSymbols
197-# define epicsExportSharedSymbols
198-# include "shareLib.h"
199-#endif
200+#include "shareLib.h"
201
202 #define CA_MINOR_PROTOCOL_REVISION 13
203 #include "caProto.h"
204diff --git a/modules/ca/src/client/oldAccess.h b/modules/ca/src/client/oldAccess.h
205index 1337cb3..db54e13 100644
206--- a/modules/ca/src/client/oldAccess.h
207+++ b/modules/ca/src/client/oldAccess.h
208@@ -28,19 +28,11 @@
209
210 #include <memory>
211
212-#ifdef epicsExportSharedSymbols
213-# define oldAccessh_restore_epicsExportSharedSymbols
214-# undef epicsExportSharedSymbols
215-#endif
216-
217 #include "tsFreeList.h"
218 #include "compilerDependencies.h"
219 #include "osiSock.h"
220
221-#ifdef oldAccessh_restore_epicsExportSharedSymbols
222-# define epicsExportSharedSymbols
223-# include "shareLib.h"
224-#endif
225+#include "shareLib.h"
226
227 #include "caProto.h"
228 #include "cacIO.h"
229diff --git a/modules/ca/src/client/repeaterClient.h b/modules/ca/src/client/repeaterClient.h
230index faaf080..ff94460 100644
231--- a/modules/ca/src/client/repeaterClient.h
232+++ b/modules/ca/src/client/repeaterClient.h
233@@ -26,19 +26,11 @@
234 #ifndef repeaterClienth
235 #define repeaterClienth
236
237-#ifdef epicsExportSharedSymbols
238-# define repeaterClienth_restore_epicsExportSharedSymbols
239-# undef epicsExportSharedSymbols
240-#endif
241-
242 #include "tsDLList.h"
243 #include "tsFreeList.h"
244 #include "compilerDependencies.h"
245
246-#ifdef repeaterClienth_restore_epicsExportSharedSymbols
247-# define epicsExportSharedSymbols
248-# include "shareLib.h"
249-#endif
250+#include "shareLib.h"
251
252 union osiSockAddr;
253
254diff --git a/modules/ca/src/client/repeaterSubscribeTimer.h b/modules/ca/src/client/repeaterSubscribeTimer.h
255index fa47684..713e422 100644
256--- a/modules/ca/src/client/repeaterSubscribeTimer.h
257+++ b/modules/ca/src/client/repeaterSubscribeTimer.h
258@@ -28,17 +28,7 @@
259
260 #include "epicsTimer.h"
261
262-#ifdef epicsExportSharedSymbols
263-# define repeaterSubscribeTimerh_epicsExportSharedSymbols
264-# undef epicsExportSharedSymbols
265-#endif
266-
267-#include "epicsTimer.h"
268-
269-#ifdef repeaterSubscribeTimerh_epicsExportSharedSymbols
270-# define epicsExportSharedSymbols
271-# include "shareLib.h"
272-#endif
273+#include "shareLib.h"
274
275 class epicsMutex;
276 class cacContextNotify;
277diff --git a/modules/ca/src/client/searchTimer.h b/modules/ca/src/client/searchTimer.h
278index 7b9fe17..95b88b5 100644
279--- a/modules/ca/src/client/searchTimer.h
280+++ b/modules/ca/src/client/searchTimer.h
281@@ -26,19 +26,11 @@
282 #ifndef searchTimerh
283 #define searchTimerh
284
285-#ifdef epicsExportSharedSymbols
286-# define searchTimerh_epicsExportSharedSymbols
287-# undef epicsExportSharedSymbols
288-#endif
289-
290 #include "epicsMutex.h"
291 #include "epicsGuard.h"
292 #include "epicsTimer.h"
293
294-#ifdef searchTimerh_epicsExportSharedSymbols
295-# define epicsExportSharedSymbols
296-# include "shareLib.h"
297-#endif
298+#include "shareLib.h"
299
300 #include "caProto.h"
301 #include "netiiu.h"
302diff --git a/modules/ca/src/client/syncGroup.h b/modules/ca/src/client/syncGroup.h
303index 3b9c3cd..5556d88 100644
304--- a/modules/ca/src/client/syncGroup.h
305+++ b/modules/ca/src/client/syncGroup.h
306@@ -25,21 +25,13 @@
307 #ifndef syncGrouph
308 #define syncGrouph
309
310-#ifdef epicsExportSharedSymbols
311-# define syncGrouph_restore_epicsExportSharedSymbols
312-# undef epicsExportSharedSymbols
313-#endif
314-
315 #include "tsDLList.h"
316 #include "tsFreeList.h"
317 #include "resourceLib.h"
318 #include "epicsEvent.h"
319 #include "compilerDependencies.h"
320
321-#ifdef syncGrouph_restore_epicsExportSharedSymbols
322-# define epicsExportSharedSymbols
323-# include "shareLib.h"
324-#endif
325+#include "shareLib.h"
326
327 #include "cadef.h"
328 #include "cacIO.h"
329diff --git a/modules/ca/src/client/tcpRecvWatchdog.h b/modules/ca/src/client/tcpRecvWatchdog.h
330index 0b15e22..7e1f20c 100644
331--- a/modules/ca/src/client/tcpRecvWatchdog.h
332+++ b/modules/ca/src/client/tcpRecvWatchdog.h
333@@ -26,17 +26,9 @@
334 #ifndef tcpRecvWatchdogh
335 #define tcpRecvWatchdogh
336
337-#ifdef epicsExportSharedSymbols
338-# define tcpRecvWatchdogh_epicsExportSharedSymbols
339-# undef epicsExportSharedSymbols
340-#endif
341-
342 #include "epicsTimer.h"
343
344-#ifdef tcpRecvWatchdogh_epicsExportSharedSymbols
345-# define epicsExportSharedSymbols
346-# include "shareLib.h"
347-#endif
348+#include "shareLib.h"
349
350 class tcpiiu;
351
352diff --git a/modules/ca/src/client/tcpSendWatchdog.h b/modules/ca/src/client/tcpSendWatchdog.h
353index 05a2dfe..edab731 100644
354--- a/modules/ca/src/client/tcpSendWatchdog.h
355+++ b/modules/ca/src/client/tcpSendWatchdog.h
356@@ -27,17 +27,9 @@
357 #define tcpSendWatchdogh
358
359
360-#ifdef epicsExportSharedSymbols
361-# define tcpSendWatchdogh_epicsExportSharedSymbols
362-# undef epicsExportSharedSymbols
363-#endif
364-
365 #include "epicsTimer.h"
366
367-#ifdef tcpSendWatchdogh_epicsExportSharedSymbols
368-# define epicsExportSharedSymbols
369-# include "shareLib.h"
370-#endif
371+#include "shareLib.h"
372
373 class tcpSendWatchdog : private epicsTimerNotify {
374 public:
375diff --git a/modules/ca/src/client/udpiiu.h b/modules/ca/src/client/udpiiu.h
376index fdf3482..bf7ea10 100644
377--- a/modules/ca/src/client/udpiiu.h
378+++ b/modules/ca/src/client/udpiiu.h
379@@ -27,20 +27,12 @@
380
381 #include <memory>
382
383-#ifdef epicsExportSharedSymbols
384-# define udpiiuh_accessh_epicsExportSharedSymbols
385-# undef epicsExportSharedSymbols
386-#endif
387-
388 #include "osiSock.h"
389 #include "epicsThread.h"
390 #include "epicsTime.h"
391 #include "tsDLList.h"
392
393-#ifdef udpiiuh_accessh_epicsExportSharedSymbols
394-# define epicsExportSharedSymbols
395-# include "shareLib.h"
396-#endif
397+#include "shareLib.h"
398
399 #include "netiiu.h"
400 #include "searchTimer.h"
401diff --git a/modules/database/src/ioc/db/dbAccessDefs.h b/modules/database/src/ioc/db/dbAccessDefs.h
402index 805dfd4..6f5a4c2 100644
403--- a/modules/database/src/ioc/db/dbAccessDefs.h
404+++ b/modules/database/src/ioc/db/dbAccessDefs.h
405@@ -11,18 +11,10 @@
406 #ifndef INCdbAccessDefsh
407 #define INCdbAccessDefsh
408
409-#ifdef epicsExportSharedSymbols
410-# define INCLdb_accessh_epicsExportSharedSymbols
411-# undef epicsExportSharedSymbols
412-#endif
413-
414 #include "epicsTypes.h"
415 #include "epicsTime.h"
416
417-#ifdef INCLdb_accessh_epicsExportSharedSymbols
418-# define epicsExportSharedSymbols
419-# include "shareLib.h"
420-#endif
421+#include "shareLib.h"
422
423 #include "dbBase.h"
424 #include "dbAddr.h"
425diff --git a/modules/database/src/ioc/db/dbCAC.h b/modules/database/src/ioc/db/dbCAC.h
426index 2d97fac..9ead387 100644
427--- a/modules/database/src/ioc/db/dbCAC.h
428+++ b/modules/database/src/ioc/db/dbCAC.h
429@@ -19,11 +19,6 @@
430 #ifndef dbCACh
431 #define dbCACh
432
433-#ifdef epicsExportSharedSymbols
434-# define dbCACh_restore_epicsExportSharedSymbols
435-# undef epicsExportSharedSymbols
436-#endif
437-
438 #include "stdlib.h"
439
440 #include <memory> // std::auto_ptr
441@@ -31,13 +26,19 @@
442 #include "tsDLList.h"
443 #include "tsFreeList.h"
444 #include "resourceLib.h"
445+
446+#ifdef epicsExportSharedSymbols
447+# define dbCACh_restore_epicsExportSharedSymbols
448+# undef epicsExportSharedSymbols
449+#endif
450+
451 #include "cacIO.h"
452 #include "compilerDependencies.h"
453
454 #ifdef dbCACh_restore_epicsExportSharedSymbols
455 # define epicsExportSharedSymbols
456-# include "shareLib.h"
457 #endif
458+#include "shareLib.h"
459
460 #include "db_access.h"
461 #include "dbNotify.h"
462diff --git a/modules/libcom/src/Makefile b/modules/libcom/src/Makefile
463index 57533ba..72ddd42 100644
464--- a/modules/libcom/src/Makefile
465+++ b/modules/libcom/src/Makefile
466@@ -14,10 +14,13 @@ include $(TOP)/configure/CONFIG
467 # Uncomment this to remove the (benign) valgrind helper stubs
468 #USR_CFLAGS += -DNVALGRIND
469
470+USR_CPPFLAGS += -DLIBCOM_API_BUILDING
471+
472 INC += valgrind/valgrind.h
473
474 INC += libComVersion.h
475 INC += libComVersionNum.h
476+INC += libComAPI.h
477
478 include $(LIBCOM)/as/Makefile
479 include $(LIBCOM)/bucketLib/Makefile
480diff --git a/modules/libcom/src/as/asLib.h b/modules/libcom/src/as/asLib.h
481index 528ce6e..d0a89fd 100644
482--- a/modules/libcom/src/as/asLib.h
483+++ b/modules/libcom/src/as/asLib.h
484@@ -12,7 +12,7 @@
485 #ifndef INCasLibh
486 #define INCasLibh
487
488-#include "shareLib.h"
489+#include "libComAPI.h"
490 #include "ellLib.h"
491 #include "errMdef.h"
492 #include "errlog.h"
493@@ -24,7 +24,7 @@ extern "C" {
494 /* 0 - Use (unverified) client provided host name string.
495 * 1 - Use actual client IP address. HAG() are resolved to IPs at ACF load time.
496 */
497-epicsShareExtern int asCheckClientIP;
498+LIBCOM_API extern int asCheckClientIP;
499
500 typedef struct asgMember *ASMEMBERPVT;
501 typedef struct asgClient *ASCLIENTPVT;
502@@ -67,63 +67,63 @@ void *asTrapWriteBefore(ASCLIENTPVT asClientPvt,
503 asTrapWriteWithData(asClientPvt, user, host, addr, 0, 0, NULL)
504
505
506-epicsShareFunc long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction);
507-epicsShareFunc long epicsShareAPI asInitFile(
508+LIBCOM_API long LIBCOMSTD_API asInitialize(ASINPUTFUNCPTR inputfunction);
509+LIBCOM_API long LIBCOMSTD_API asInitFile(
510 const char *filename,const char *substitutions);
511-epicsShareFunc long epicsShareAPI asInitFP(FILE *fp,const char *substitutions);
512-epicsShareFunc long epicsShareAPI asInitMem(const char *acf, const char *substitutions);
513+LIBCOM_API long LIBCOMSTD_API asInitFP(FILE *fp,const char *substitutions);
514+LIBCOM_API long LIBCOMSTD_API asInitMem(const char *acf, const char *substitutions);
515 /*caller must provide permanent storage for asgName*/
516-epicsShareFunc long epicsShareAPI asAddMember(
517+LIBCOM_API long LIBCOMSTD_API asAddMember(
518 ASMEMBERPVT *asMemberPvt,const char *asgName);
519-epicsShareFunc long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt);
520+LIBCOM_API long LIBCOMSTD_API asRemoveMember(ASMEMBERPVT *asMemberPvt);
521 /*caller must provide permanent storage for newAsgName*/
522-epicsShareFunc long epicsShareAPI asChangeGroup(
523+LIBCOM_API long LIBCOMSTD_API asChangeGroup(
524 ASMEMBERPVT *asMemberPvt,const char *newAsgName);
525-epicsShareFunc void * epicsShareAPI asGetMemberPvt(ASMEMBERPVT asMemberPvt);
526-epicsShareFunc void epicsShareAPI asPutMemberPvt(
527+LIBCOM_API void * LIBCOMSTD_API asGetMemberPvt(ASMEMBERPVT asMemberPvt);
528+LIBCOM_API void LIBCOMSTD_API asPutMemberPvt(
529 ASMEMBERPVT asMemberPvt,void *userPvt);
530 /*client must provide permanent storage for user and host*/
531-epicsShareFunc long epicsShareAPI asAddClient(
532+LIBCOM_API long LIBCOMSTD_API asAddClient(
533 ASCLIENTPVT *asClientPvt,ASMEMBERPVT asMemberPvt,
534 int asl,const char *user,char *host);
535 /*client must provide permanent storage for user and host*/
536-epicsShareFunc long epicsShareAPI asChangeClient(
537+LIBCOM_API long LIBCOMSTD_API asChangeClient(
538 ASCLIENTPVT asClientPvt,int asl,const char *user,char *host);
539-epicsShareFunc long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt);
540-epicsShareFunc void * epicsShareAPI asGetClientPvt(ASCLIENTPVT asClientPvt);
541-epicsShareFunc void epicsShareAPI asPutClientPvt(
542+LIBCOM_API long LIBCOMSTD_API asRemoveClient(ASCLIENTPVT *asClientPvt);
543+LIBCOM_API void * LIBCOMSTD_API asGetClientPvt(ASCLIENTPVT asClientPvt);
544+LIBCOM_API void LIBCOMSTD_API asPutClientPvt(
545 ASCLIENTPVT asClientPvt,void *userPvt);
546-epicsShareFunc long epicsShareAPI asRegisterClientCallback(
547+LIBCOM_API long LIBCOMSTD_API asRegisterClientCallback(
548 ASCLIENTPVT asClientPvt, ASCLIENTCALLBACK pcallback);
549-epicsShareFunc long epicsShareAPI asComputeAllAsg(void);
550+LIBCOM_API long LIBCOMSTD_API asComputeAllAsg(void);
551 /* following declared below after ASG is declared
552-epicsShareFunc long epicsShareAPI asComputeAsg(ASG *pasg);
553+LIBCOM_API long LIBCOMSTD_API asComputeAsg(ASG *pasg);
554 */
555-epicsShareFunc long epicsShareAPI asCompute(ASCLIENTPVT asClientPvt);
556-epicsShareFunc int epicsShareAPI asDump(
557+LIBCOM_API long LIBCOMSTD_API asCompute(ASCLIENTPVT asClientPvt);
558+LIBCOM_API int LIBCOMSTD_API asDump(
559 void (*memcallback)(ASMEMBERPVT,FILE *),
560 void (*clientcallback)(ASCLIENTPVT,FILE *),int verbose);
561-epicsShareFunc int epicsShareAPI asDumpFP(FILE *fp,
562+LIBCOM_API int LIBCOMSTD_API asDumpFP(FILE *fp,
563 void (*memcallback)(ASMEMBERPVT,FILE *),
564 void (*clientcallback)(ASCLIENTPVT,FILE *),int verbose);
565-epicsShareFunc int epicsShareAPI asDumpUag(const char *uagname);
566-epicsShareFunc int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname);
567-epicsShareFunc int epicsShareAPI asDumpHag(const char *hagname);
568-epicsShareFunc int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname);
569-epicsShareFunc int epicsShareAPI asDumpRules(const char *asgname);
570-epicsShareFunc int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname);
571-epicsShareFunc int epicsShareAPI asDumpMem(const char *asgname,
572+LIBCOM_API int LIBCOMSTD_API asDumpUag(const char *uagname);
573+LIBCOM_API int LIBCOMSTD_API asDumpUagFP(FILE *fp,const char *uagname);
574+LIBCOM_API int LIBCOMSTD_API asDumpHag(const char *hagname);
575+LIBCOM_API int LIBCOMSTD_API asDumpHagFP(FILE *fp,const char *hagname);
576+LIBCOM_API int LIBCOMSTD_API asDumpRules(const char *asgname);
577+LIBCOM_API int LIBCOMSTD_API asDumpRulesFP(FILE *fp,const char *asgname);
578+LIBCOM_API int LIBCOMSTD_API asDumpMem(const char *asgname,
579 void (*memcallback)(ASMEMBERPVT,FILE *),int clients);
580-epicsShareFunc int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
581+LIBCOM_API int LIBCOMSTD_API asDumpMemFP(FILE *fp,const char *asgname,
582 void (*memcallback)(ASMEMBERPVT,FILE *),int clients);
583-epicsShareFunc int epicsShareAPI asDumpHash(void);
584-epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp);
585+LIBCOM_API int LIBCOMSTD_API asDumpHash(void);
586+LIBCOM_API int LIBCOMSTD_API asDumpHashFP(FILE *fp);
587
588-epicsShareFunc void * epicsShareAPI asTrapWriteBeforeWithData(
589+LIBCOM_API void * LIBCOMSTD_API asTrapWriteBeforeWithData(
590 const char *userid, const char *hostid, void *addr,
591 int dbrType, int no_elements, void *data);
592
593-epicsShareFunc void epicsShareAPI asTrapWriteAfterWrite(void *pvt);
594+LIBCOM_API void LIBCOMSTD_API asTrapWriteAfterWrite(void *pvt);
595
596 #define S_asLib_clientsExist (M_asLib| 1) /*Client Exists*/
597 #define S_asLib_noUag (M_asLib| 2) /*User Access Group does not exist*/
598@@ -141,7 +141,7 @@ epicsShareFunc void epicsShareAPI asTrapWriteAfterWrite(void *pvt);
599 #define S_asLib_noMemory (M_asLib|14) /*access security: no Memory */
600
601
602 /*Private declarations */
603-epicsShareExtern int asActive;
604+LIBCOM_API extern int asActive;
605
606 /* definition of access rights*/
607 typedef enum{asNOACCESS,asREAD,asWRITE} asAccessRights;
608@@ -156,7 +156,7 @@ typedef struct asBase{
609 struct gphPvt *phash;
610 } ASBASE;
611
612-epicsShareExtern volatile ASBASE *pasbase;
613+LIBCOM_API extern volatile ASBASE *pasbase;
614
615 /*Defs for User Access Groups*/
616 typedef struct{
617@@ -238,11 +238,11 @@ typedef struct asgClient {
618 int trapMask;
619 } ASGCLIENT;
620
621-epicsShareFunc long epicsShareAPI asComputeAsg(ASG *pasg);
622+LIBCOM_API long LIBCOMSTD_API asComputeAsg(ASG *pasg);
623 /*following is "friend" function*/
624-epicsShareFunc void * epicsShareAPI asCalloc(size_t nobj,size_t size);
625-epicsShareFunc char * epicsShareAPI asStrdup(unsigned char *str);
626-epicsShareFunc void asFreeAll(ASBASE *pasbase);
627+LIBCOM_API void * LIBCOMSTD_API asCalloc(size_t nobj,size_t size);
628+LIBCOM_API char * LIBCOMSTD_API asStrdup(unsigned char *str);
629+LIBCOM_API void asFreeAll(ASBASE *pasbase);
630 #ifdef __cplusplus
631 }
632 #endif
633diff --git a/modules/libcom/src/as/asLibRoutines.c b/modules/libcom/src/as/asLibRoutines.c
634index e19b639..1f72beb 100644
635--- a/modules/libcom/src/as/asLibRoutines.c
636+++ b/modules/libcom/src/as/asLibRoutines.c
637@@ -14,7 +14,6 @@
638 #include <string.h>
639 #include <ctype.h>
640
641-#define epicsExportSharedSymbols
642 #include "osiSock.h"
643 #include "epicsTypes.h"
644 #include "epicsStdio.h"
645@@ -36,9 +35,9 @@ static epicsMutexId asLock;
646 #define UNLOCK epicsMutexUnlock(asLock)
647
648 /*following must be global because asCa nneeds it*/
649-epicsShareDef ASBASE volatile *pasbase=NULL;
650+ASBASE volatile *pasbase=NULL;
651 static ASBASE *pasbasenew=NULL;
652-epicsShareDef int asActive = FALSE;
653+int asActive = FALSE;
654
655 static void *freeListPvt = NULL;
656
657@@ -82,7 +81,7 @@ static void asInitializeOnce(void *arg)
658 osiSockAttach();
659 asLock = epicsMutexMustCreate();
660 }
661-long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
662+long LIBCOMSTD_API asInitialize(ASINPUTFUNCPTR inputfunction)
663 {
664 ASG *pasg;
665 long status;
666@@ -167,7 +166,7 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction)
667 return(0);
668 }
669
670-long epicsShareAPI asInitFile(const char *filename,const char *substitutions)
671+long LIBCOMSTD_API asInitFile(const char *filename,const char *substitutions)
672 {
673 FILE *fp;
674 long status;
675@@ -222,7 +221,7 @@ static int myInputFunction(char *buf, int max_size)
676 return(n);
677 }
678
679
680-long epicsShareAPI asInitFP(FILE *fp,const char *substitutions)
681+long LIBCOMSTD_API asInitFP(FILE *fp,const char *substitutions)
682 {
683 char buffer[BUF_SIZE];
684 char mac_buffer[BUF_SIZE];
685@@ -272,7 +271,7 @@ static int memInputFunction(char *buf, int max_size)
686 return ret;
687 }
688
689-long epicsShareAPI asInitMem(const char *acf, const char *substitutions)
690+long LIBCOMSTD_API asInitMem(const char *acf, const char *substitutions)
691 {
692 long ret = S_asLib_InitFailed;
693 if(!acf) return ret;
694@@ -284,7 +283,7 @@ long epicsShareAPI asInitMem(const char *acf, const char *substitutions)
695 return ret;
696 }
697
698-long epicsShareAPI asAddMember(ASMEMBERPVT *pasMemberPvt,const char *asgName)
699+long LIBCOMSTD_API asAddMember(ASMEMBERPVT *pasMemberPvt,const char *asgName)
700 {
701 long status;
702
703@@ -295,7 +294,7 @@ long epicsShareAPI asAddMember(ASMEMBERPVT *pasMemberPvt,const char *asgName)
704 return(status);
705 }
706
707-long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt)
708+long LIBCOMSTD_API asRemoveMember(ASMEMBERPVT *asMemberPvt)
709 {
710 ASGMEMBER *pasgmember;
711
712@@ -320,7 +319,7 @@ long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt)
713 return(0);
714 }
715
716-long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName)
717+long LIBCOMSTD_API asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName)
718 {
719 ASGMEMBER *pasgmember;
720 long status;
721@@ -341,7 +340,7 @@ long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName
722 return(status);
723 }
724
725
726-void * epicsShareAPI asGetMemberPvt(ASMEMBERPVT asMemberPvt)
727+void * LIBCOMSTD_API asGetMemberPvt(ASMEMBERPVT asMemberPvt)
728 {
729 ASGMEMBER *pasgmember = asMemberPvt;
730
731@@ -350,7 +349,7 @@ void * epicsShareAPI asGetMemberPvt(ASMEMBERPVT asMemberPvt)
732 return(pasgmember->userPvt);
733 }
734
735-void epicsShareAPI asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
736+void LIBCOMSTD_API asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
737 {
738 ASGMEMBER *pasgmember = asMemberPvt;
739
740@@ -360,7 +359,7 @@ void epicsShareAPI asPutMemberPvt(ASMEMBERPVT asMemberPvt,void *userPvt)
741 return;
742 }
743
744
745-long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt,
746+long LIBCOMSTD_API asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt,
747 int asl,const char *user,char *host)
748 {
749 ASGMEMBER *pasgmember = asMemberPvt;
750@@ -388,7 +387,7 @@ long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt
751 return(status);
752 }
753
754-long epicsShareAPI asChangeClient(
755+long LIBCOMSTD_API asChangeClient(
756 ASCLIENTPVT asClientPvt,int asl,const char *user,char *host)
757 {
758 ASGCLIENT *pasgclient = asClientPvt;
759@@ -410,7 +409,7 @@ long epicsShareAPI asChangeClient(
760 return(status);
761 }
762
763-long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt)
764+long LIBCOMSTD_API asRemoveClient(ASCLIENTPVT *asClientPvt)
765 {
766 ASGCLIENT *pasgclient = *asClientPvt;
767 ASGMEMBER *pasgMember;
768@@ -431,7 +430,7 @@ long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt)
769 return(0);
770 }
771
772
773-long epicsShareAPI asRegisterClientCallback(ASCLIENTPVT asClientPvt,
774+long LIBCOMSTD_API asRegisterClientCallback(ASCLIENTPVT asClientPvt,
775 ASCLIENTCALLBACK pcallback)
776 {
777 ASGCLIENT *pasgclient = asClientPvt;
778@@ -445,7 +444,7 @@ long epicsShareAPI asRegisterClientCallback(ASCLIENTPVT asClientPvt,
779 return(0);
780 }
781
782-void * epicsShareAPI asGetClientPvt(ASCLIENTPVT asClientPvt)
783+void * LIBCOMSTD_API asGetClientPvt(ASCLIENTPVT asClientPvt)
784 {
785 ASGCLIENT *pasgclient = asClientPvt;
786
787@@ -454,7 +453,7 @@ void * epicsShareAPI asGetClientPvt(ASCLIENTPVT asClientPvt)
788 return(pasgclient->userPvt);
789 }
790
791-void epicsShareAPI asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt)
792+void LIBCOMSTD_API asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt)
793 {
794 ASGCLIENT *pasgclient = asClientPvt;
795 if(!asActive) return;
796@@ -464,7 +463,7 @@ void epicsShareAPI asPutClientPvt(ASCLIENTPVT asClientPvt,void *userPvt)
797 UNLOCK;
798 }
799
800
801-long epicsShareAPI asComputeAllAsg(void)
802+long LIBCOMSTD_API asComputeAllAsg(void)
803 {
804 long status;
805
806@@ -475,7 +474,7 @@ long epicsShareAPI asComputeAllAsg(void)
807 return(status);
808 }
809
810-long epicsShareAPI asComputeAsg(ASG *pasg)
811+long LIBCOMSTD_API asComputeAsg(ASG *pasg)
812 {
813 long status;
814
815@@ -486,7 +485,7 @@ long epicsShareAPI asComputeAsg(ASG *pasg)
816 return(status);
817 }
818
819-long epicsShareAPI asCompute(ASCLIENTPVT asClientPvt)
820+long LIBCOMSTD_API asCompute(ASCLIENTPVT asClientPvt)
821 {
822 long status;
823
824@@ -502,7 +501,7 @@ long epicsShareAPI asCompute(ASCLIENTPVT asClientPvt)
825 static const char *asAccessName[] = {"NONE","READ","WRITE"};
826 static const char *asTrapOption[] = {"NOTRAPWRITE","TRAPWRITE"};
827 static const char *asLevelName[] = {"ASL0","ASL1"};
828-int epicsShareAPI asDump(
829+int LIBCOMSTD_API asDump(
830 void (*memcallback)(struct asgMember *,FILE *),
831 void (*clientcallback)(struct asgClient *,FILE *),
832 int verbose)
833@@ -510,7 +509,7 @@ int epicsShareAPI asDump(
834 return asDumpFP(stdout,memcallback,clientcallback,verbose);
835 }
836
837-int epicsShareAPI asDumpFP(
838+int LIBCOMSTD_API asDumpFP(
839 FILE *fp,
840 void (*memcallback)(struct asgMember *,FILE *),
841 void (*clientcallback)(struct asgClient *,FILE *),
842@@ -655,12 +654,12 @@ int epicsShareAPI asDumpFP(
843 return(0);
844 }
845
846
847-int epicsShareAPI asDumpUag(const char *uagname)
848+int LIBCOMSTD_API asDumpUag(const char *uagname)
849 {
850 return asDumpUagFP(stdout,uagname);
851 }
852
853-int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname)
854+int LIBCOMSTD_API asDumpUagFP(FILE *fp,const char *uagname)
855 {
856 UAG *puag;
857 UAGNAME *puagname;
858@@ -686,12 +685,12 @@ int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname)
859 return(0);
860 }
861
862-int epicsShareAPI asDumpHag(const char *hagname)
863+int LIBCOMSTD_API asDumpHag(const char *hagname)
864 {
865 return asDumpHagFP(stdout,hagname);
866 }
867
868-int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname)
869+int LIBCOMSTD_API asDumpHagFP(FILE *fp,const char *hagname)
870 {
871 HAG *phag;
872 HAGNAME *phagname;
873@@ -717,12 +716,12 @@ int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname)
874 return(0);
875 }
876
877
878-int epicsShareAPI asDumpRules(const char *asgname)
879+int LIBCOMSTD_API asDumpRules(const char *asgname)
880 {
881 return asDumpRulesFP(stdout,asgname);
882 }
883
884-int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
885+int LIBCOMSTD_API asDumpRulesFP(FILE *fp,const char *asgname)
886 {
887 ASG *pasg;
888 ASGINP *pasginp;
889@@ -801,13 +800,13 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname)
890 return(0);
891 }
892
893
894-int epicsShareAPI asDumpMem(const char *asgname,void (*memcallback)(ASMEMBERPVT,FILE *),
895+int LIBCOMSTD_API asDumpMem(const char *asgname,void (*memcallback)(ASMEMBERPVT,FILE *),
896 int clients)
897 {
898 return asDumpMemFP(stdout,asgname,memcallback,clients);
899 }
900
901-int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
902+int LIBCOMSTD_API asDumpMemFP(FILE *fp,const char *asgname,
903 void (*memcallback)(ASMEMBERPVT,FILE *),int clients)
904 {
905 ASG *pasg;
906@@ -858,12 +857,12 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname,
907 return(0);
908 }
909
910-epicsShareFunc int epicsShareAPI asDumpHash(void)
911+LIBCOM_API int LIBCOMSTD_API asDumpHash(void)
912 {
913 return asDumpHashFP(stdout);
914 }
915
916-epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp)
917+LIBCOM_API int LIBCOMSTD_API asDumpHashFP(FILE *fp)
918 {
919 if(!asActive) return(0);
920 gphDumpFP(fp,pasbase->phash);
921@@ -872,14 +871,14 @@ epicsShareFunc int epicsShareAPI asDumpHashFP(FILE *fp)
922
923
924 /*Start of private routines*/
925 /* asCalloc is "friend" function */
926-epicsShareFunc void * epicsShareAPI asCalloc(size_t nobj,size_t size)
927+LIBCOM_API void * LIBCOMSTD_API asCalloc(size_t nobj,size_t size)
928 {
929 void *p;
930
931 p=callocMustSucceed(nobj,size,"asCalloc");
932 return(p);
933 }
934-epicsShareFunc char * epicsShareAPI asStrdup(unsigned char *str)
935+LIBCOM_API char * LIBCOMSTD_API asStrdup(unsigned char *str)
936 {
937 size_t len = strlen((char *) str);
938 char *buf = asCalloc(1, len + 1);
939diff --git a/modules/libcom/src/as/asTrapWrite.c b/modules/libcom/src/as/asTrapWrite.c
940index 544e9a2..c6f9ab4 100644
941--- a/modules/libcom/src/as/asTrapWrite.c
942+++ b/modules/libcom/src/as/asTrapWrite.c
943@@ -19,7 +19,6 @@
944 #include <stdio.h>
945 #include <string.h>
946
947-#define epicsExportSharedSymbols
948 #include "ellLib.h"
949 #include "freeList.h"
950 #include "epicsStdio.h"
951@@ -71,7 +70,7 @@ static void asTrapWriteInit(void)
952 pasTrapWritePvt->lock = epicsMutexMustCreate();
953 }
954
955-asTrapWriteId epicsShareAPI asTrapWriteRegisterListener(
956+asTrapWriteId LIBCOMSTD_API asTrapWriteRegisterListener(
957 asTrapWriteListener func)
958 {
959 listener *plistener;
960@@ -84,7 +83,7 @@ asTrapWriteId epicsShareAPI asTrapWriteRegisterListener(
961 return((asTrapWriteId)plistener);
962 }
963
964-void epicsShareAPI asTrapWriteUnregisterListener(asTrapWriteId id)
965+void LIBCOMSTD_API asTrapWriteUnregisterListener(asTrapWriteId id)
966 {
967 listener *plistener = (listener *)id;
968 writeMessage *pwriteMessage;
969@@ -111,7 +110,7 @@ void epicsShareAPI asTrapWriteUnregisterListener(asTrapWriteId id)
970 epicsMutexUnlock(pasTrapWritePvt->lock);
971 }
972
973
974-void * epicsShareAPI asTrapWriteBeforeWithData(
975+void * LIBCOMSTD_API asTrapWriteBeforeWithData(
976 const char *userid, const char *hostid, void *addr,
977 int dbrType, int no_elements, void *data)
978 {
979@@ -149,7 +148,7 @@ void * epicsShareAPI asTrapWriteBeforeWithData(
980 return pwriteMessage;
981 }
982
983-void epicsShareAPI asTrapWriteAfterWrite(void *pvt)
984+void LIBCOMSTD_API asTrapWriteAfterWrite(void *pvt)
985 {
986 writeMessage *pwriteMessage = (writeMessage *)pvt;
987 listenerPvt *plistenerPvt;
988diff --git a/modules/libcom/src/as/asTrapWrite.h b/modules/libcom/src/as/asTrapWrite.h
989index b8033cb..280ed1a 100644
990--- a/modules/libcom/src/as/asTrapWrite.h
991+++ b/modules/libcom/src/as/asTrapWrite.h
992@@ -12,7 +12,7 @@
993 #ifndef INCasTrapWriteh
994 #define INCasTrapWriteh
995
996-#include "shareLib.h"
997+#include "libComAPI.h"
998
999 #ifdef __cplusplus
1000 extern "C" {
1001@@ -32,9 +32,9 @@ typedef struct asTrapWriteMessage {
1002 typedef void *asTrapWriteId;
1003 typedef void(*asTrapWriteListener)(asTrapWriteMessage *pmessage,int after);
1004
1005-epicsShareFunc asTrapWriteId epicsShareAPI asTrapWriteRegisterListener(
1006+LIBCOM_API asTrapWriteId LIBCOMSTD_API asTrapWriteRegisterListener(
1007 asTrapWriteListener func);
1008-epicsShareFunc void epicsShareAPI asTrapWriteUnregisterListener(
1009+LIBCOM_API void LIBCOMSTD_API asTrapWriteUnregisterListener(
1010 asTrapWriteId id);
1011
1012 /*
1013diff --git a/modules/libcom/src/bucketLib/bucketLib.c b/modules/libcom/src/bucketLib/bucketLib.c
1014index 40df596..1912777 100644
1015--- a/modules/libcom/src/bucketLib/bucketLib.c
1016+++ b/modules/libcom/src/bucketLib/bucketLib.c
1017@@ -23,7 +23,6 @@
1018 #include <math.h>
1019 #include <time.h>
1020
1021-#define epicsExportSharedSymbols
1022 #include "epicsAssert.h"
1023 #include "freeList.h" /* bucketLib uses freeListLib inside the DLL */
1024 #include "bucketLib.h"
1025@@ -216,7 +215,7 @@ static BUCKETID bucketStringHash (BUCKET *pb, const void *pId)
1026 /*
1027 * bucketCreate()
1028 */
1029-epicsShareFunc BUCKET * epicsShareAPI bucketCreate (unsigned nHashTableEntries)
1030+LIBCOM_API BUCKET * LIBCOMSTD_API bucketCreate (unsigned nHashTableEntries)
1031 {
1032 BUCKETID mask;
1033 unsigned nbits;
1034@@ -283,7 +282,7 @@ epicsShareFunc BUCKET * epicsShareAPI bucketCreate (unsigned nHashTableEntries)
1035 /*
1036 * bucketFree()
1037 */
1038-epicsShareFunc int epicsShareAPI bucketFree (BUCKET *prb)
1039+LIBCOM_API int LIBCOMSTD_API bucketFree (BUCKET *prb)
1040 {
1041 /*
1042 * deleting a bucket with entries in use
1043@@ -305,17 +304,17 @@ epicsShareFunc int epicsShareAPI bucketFree (BUCKET *prb)
1044 /*
1045 * bucketAddItem()
1046 */
1047-epicsShareFunc int epicsShareAPI
1048+LIBCOM_API int LIBCOMSTD_API
1049 bucketAddItemUnsignedId(BUCKET *prb, const unsigned *pId, const void *pApp)
1050 {
1051 return bucketAddItem(prb, &BSET[bidtUnsigned], pId, pApp);
1052 }
1053-epicsShareFunc int epicsShareAPI
1054+LIBCOM_API int LIBCOMSTD_API
1055 bucketAddItemPointerId(BUCKET *prb, void * const *pId, const void *pApp)
1056 {
1057 return bucketAddItem(prb, &BSET[bidtPointer], pId, pApp);
1058 }
1059-epicsShareFunc int epicsShareAPI
1060+LIBCOM_API int LIBCOMSTD_API
1061 bucketAddItemStringId(BUCKET *prb, const char *pId, const void *pApp)
1062 {
1063 return bucketAddItem(prb, &BSET[bidtString], pId, pApp);
1064@@ -395,15 +394,15 @@ static void *bucketLookupAndRemoveItem (BUCKET *prb, bucketSET *pBSET, const voi
1065
1066 return pApp;
1067 }
1068-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId)
1069+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId)
1070 {
1071 return bucketLookupAndRemoveItem(prb, &BSET[bidtUnsigned], pId);
1072 }
1073-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemPointerId (BUCKET *prb, void * const *pId)
1074+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemPointerId (BUCKET *prb, void * const *pId)
1075 {
1076 return bucketLookupAndRemoveItem(prb, &BSET[bidtPointer], pId);
1077 }
1078-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemStringId (BUCKET *prb, const char *pId)
1079+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemStringId (BUCKET *prb, const char *pId)
1080 {
1081 return bucketLookupAndRemoveItem(prb, &BSET[bidtString], pId);
1082 }
1083@@ -412,17 +411,17 @@ epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemStringId (BUCKET *p
1084 /*
1085 * bucketRemoveItem()
1086 */
1087-epicsShareFunc int epicsShareAPI
1088+LIBCOM_API int LIBCOMSTD_API
1089 bucketRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId)
1090 {
1091 return bucketLookupAndRemoveItem(prb, &BSET[bidtUnsigned], pId)?S_bucket_success:S_bucket_uknId;
1092 }
1093-epicsShareFunc int epicsShareAPI
1094+LIBCOM_API int LIBCOMSTD_API
1095 bucketRemoveItemPointerId (BUCKET *prb, void * const *pId)
1096 {
1097 return bucketLookupAndRemoveItem(prb, &BSET[bidtPointer], pId)?S_bucket_success:S_bucket_uknId;
1098 }
1099-epicsShareFunc int epicsShareAPI
1100+LIBCOM_API int LIBCOMSTD_API
1101 bucketRemoveItemStringId (BUCKET *prb, const char *pId)
1102 {
1103 return bucketLookupAndRemoveItem(prb, &BSET[bidtString], pId)?S_bucket_success:S_bucket_uknId;
1104@@ -432,17 +431,17 @@ epicsShareFunc int epicsShareAPI
1105 /*
1106 * bucketLookupItem()
1107 */
1108-epicsShareFunc void * epicsShareAPI
1109+LIBCOM_API void * LIBCOMSTD_API
1110 bucketLookupItemUnsignedId (BUCKET *prb, const unsigned *pId)
1111 {
1112 return bucketLookupItem(prb, &BSET[bidtUnsigned], pId);
1113 }
1114-epicsShareFunc void * epicsShareAPI
1115+LIBCOM_API void * LIBCOMSTD_API
1116 bucketLookupItemPointerId (BUCKET *prb, void * const *pId)
1117 {
1118 return bucketLookupItem(prb, &BSET[bidtPointer], pId);
1119 }
1120-epicsShareFunc void * epicsShareAPI
1121+LIBCOM_API void * LIBCOMSTD_API
1122 bucketLookupItemStringId (BUCKET *prb, const char *pId)
1123 {
1124 return bucketLookupItem(prb, &BSET[bidtString], pId);
1125@@ -474,7 +473,7 @@ static void *bucketLookupItem (BUCKET *pb, bucketSET *pBSET, const void *pId)
1126 /*
1127 * bucketShow()
1128 */
1129-epicsShareFunc int epicsShareAPI bucketShow(BUCKET *pb)
1130+LIBCOM_API int LIBCOMSTD_API bucketShow(BUCKET *pb)
1131 {
1132 ITEM **ppi;
1133 ITEM *pi;
1134diff --git a/modules/libcom/src/bucketLib/bucketLib.h b/modules/libcom/src/bucketLib/bucketLib.h
1135index 60d73b4..192d679 100644
1136--- a/modules/libcom/src/bucketLib/bucketLib.h
1137+++ b/modules/libcom/src/bucketLib/bucketLib.h
1138@@ -25,7 +25,7 @@ extern "C" {
1139
1140 #include "errMdef.h"
1141 #include "epicsTypes.h"
1142-#include "shareLib.h"
1143+#include "libComAPI.h"
1144
1145 typedef unsigned BUCKETID;
1146
1147@@ -46,32 +46,32 @@ typedef struct bucket{
1148 unsigned nInUse;
1149 }BUCKET;
1150
1151-epicsShareFunc BUCKET * epicsShareAPI bucketCreate (unsigned nHashTableEntries);
1152-epicsShareFunc int epicsShareAPI bucketFree (BUCKET *prb);
1153-epicsShareFunc int epicsShareAPI bucketShow (BUCKET *pb);
1154+LIBCOM_API BUCKET * LIBCOMSTD_API bucketCreate (unsigned nHashTableEntries);
1155+LIBCOM_API int LIBCOMSTD_API bucketFree (BUCKET *prb);
1156+LIBCOM_API int LIBCOMSTD_API bucketShow (BUCKET *pb);
1157
1158 /*
1159 * !! Identifier must exist (and remain constant) at the specified address until
1160 * the item is deleted from the bucket !!
1161 */
1162-epicsShareFunc int epicsShareAPI bucketAddItemUnsignedId (BUCKET *prb,
1163+LIBCOM_API int LIBCOMSTD_API bucketAddItemUnsignedId (BUCKET *prb,
1164 const unsigned *pId, const void *pApp);
1165-epicsShareFunc int epicsShareAPI bucketAddItemPointerId (BUCKET *prb,
1166+LIBCOM_API int LIBCOMSTD_API bucketAddItemPointerId (BUCKET *prb,
1167 void * const *pId, const void *pApp);
1168-epicsShareFunc int epicsShareAPI bucketAddItemStringId (BUCKET *prb,
1169+LIBCOM_API int LIBCOMSTD_API bucketAddItemStringId (BUCKET *prb,
1170 const char *pId, const void *pApp);
1171
1172-epicsShareFunc int epicsShareAPI bucketRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId);
1173-epicsShareFunc int epicsShareAPI bucketRemoveItemPointerId (BUCKET *prb, void * const *pId);
1174-epicsShareFunc int epicsShareAPI bucketRemoveItemStringId (BUCKET *prb, const char *pId);
1175+LIBCOM_API int LIBCOMSTD_API bucketRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId);
1176+LIBCOM_API int LIBCOMSTD_API bucketRemoveItemPointerId (BUCKET *prb, void * const *pId);
1177+LIBCOM_API int LIBCOMSTD_API bucketRemoveItemStringId (BUCKET *prb, const char *pId);
1178
1179-epicsShareFunc void * epicsShareAPI bucketLookupItemUnsignedId (BUCKET *prb, const unsigned *pId);
1180-epicsShareFunc void * epicsShareAPI bucketLookupItemPointerId (BUCKET *prb, void * const *pId);
1181-epicsShareFunc void * epicsShareAPI bucketLookupItemStringId (BUCKET *prb, const char *pId);
1182+LIBCOM_API void * LIBCOMSTD_API bucketLookupItemUnsignedId (BUCKET *prb, const unsigned *pId);
1183+LIBCOM_API void * LIBCOMSTD_API bucketLookupItemPointerId (BUCKET *prb, void * const *pId);
1184+LIBCOM_API void * LIBCOMSTD_API bucketLookupItemStringId (BUCKET *prb, const char *pId);
1185
1186-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId);
1187-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemPointerId (BUCKET *prb, void * const *pId);
1188-epicsShareFunc void * epicsShareAPI bucketLookupAndRemoveItemStringId (BUCKET *prb, const char *pId);
1189+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId);
1190+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemPointerId (BUCKET *prb, void * const *pId);
1191+LIBCOM_API void * LIBCOMSTD_API bucketLookupAndRemoveItemStringId (BUCKET *prb, const char *pId);
1192
1193
1194 /*
1195diff --git a/modules/libcom/src/calc/calcPerform.c b/modules/libcom/src/calc/calcPerform.c
1196index c0f4aeb..9bf08e9 100644
1197--- a/modules/libcom/src/calc/calcPerform.c
1198+++ b/modules/libcom/src/calc/calcPerform.c
1199@@ -16,7 +16,6 @@
1200 #include <stdio.h>
1201 #include <string.h>
1202
1203-#define epicsExportSharedSymbols
1204 #include "osiUnistd.h"
1205 #include "dbDefs.h"
1206 #include "epicsMath.h"
1207@@ -41,7 +40,7 @@ static int cond_search(const char **ppinst, int match);
1208 *
1209 * Evalutate the postfix expression
1210 */
1211-epicsShareFunc long
1212+LIBCOM_API long
1213 calcPerform(double *parg, double *presult, const char *pinst)
1214 {
1215 double stack[CALCPERFORM_STACK+1]; /* zero'th entry not used */
1216@@ -387,7 +386,7 @@ epicsShareFunc long
1217 #endif
1218
1219
1220
1221-epicsShareFunc long
1222+LIBCOM_API long
1223 calcArgUsage(const char *pinst, unsigned long *pinputs, unsigned long *pstores)
1224 {
1225 unsigned long inputs = 0;
1226diff --git a/modules/libcom/src/calc/postfix.c b/modules/libcom/src/calc/postfix.c
1227index 463ceea..ad698ef 100644
1228--- a/modules/libcom/src/calc/postfix.c
1229+++ b/modules/libcom/src/calc/postfix.c
1230@@ -17,7 +17,6 @@
1231 #include <string.h>
1232 #include <ctype.h>
1233
1234-#define epicsExportSharedSymbols
1235 #include "dbDefs.h"
1236 #include "epicsAssert.h"
1237 #include "epicsStdlib.h"
1238@@ -25,7 +24,7 @@
1239 #include "epicsTypes.h"
1240 #include "postfix.h"
1241 #include "postfixPvt.h"
1242-#include "shareLib.h"
1243+#include "libComAPI.h"
1244
1245
1246 /* declarations for postfix */
1247@@ -205,7 +204,7 @@ static int
1248 *
1249 * convert an infix expression to a postfix expression
1250 */
1251-epicsShareFunc long
1252+LIBCOM_API long
1253 postfix(const char *psrc, char *pout, short *perror)
1254 {
1255 ELEMENT stack[80];
1256@@ -489,7 +488,7 @@ bad:
1257 *
1258 * Return a message string appropriate for the given error code
1259 */
1260-epicsShareFunc const char *
1261+LIBCOM_API const char *
1262 calcErrorStr(short error)
1263 {
1264 static const char *errStrs[] = {
1265@@ -519,7 +518,7 @@ epicsShareFunc const char *
1266 *
1267 * Disassemble the given postfix instructions to stdout
1268 */
1269-epicsShareFunc void
1270+LIBCOM_API void
1271 calcExprDump(const char *pinst)
1272 {
1273 static const char *opcodes[] = {
1274diff --git a/modules/libcom/src/calc/postfix.h b/modules/libcom/src/calc/postfix.h
1275index b904920..b2037b3 100644
1276--- a/modules/libcom/src/calc/postfix.h
1277+++ b/modules/libcom/src/calc/postfix.h
1278@@ -14,7 +14,7 @@
1279 #ifndef INCpostfixh
1280 #define INCpostfixh
1281
1282-#include "shareLib.h"
1283+#include "libComAPI.h"
1284
1285 #define CALCPERFORM_NARGS 12
1286 #define CALCPERFORM_STACK 80
1287@@ -67,19 +67,19 @@
1288 extern "C" {
1289 #endif
1290
1291-epicsShareFunc long
1292+LIBCOM_API long
1293 postfix(const char *pinfix, char *ppostfix, short *perror);
1294
1295-epicsShareFunc long
1296+LIBCOM_API long
1297 calcPerform(double *parg, double *presult, const char *ppostfix);
1298
1299-epicsShareFunc long
1300+LIBCOM_API long
1301 calcArgUsage(const char *ppostfix, unsigned long *pinputs, unsigned long *pstores);
1302
1303-epicsShareFunc const char *
1304+LIBCOM_API const char *
1305 calcErrorStr(short error);
1306
1307-epicsShareFunc void
1308+LIBCOM_API void
1309 calcExprDump(const char *pinst);
1310
1311 #ifdef __cplusplus
1312diff --git a/modules/libcom/src/cvtFast/cvtFast.c b/modules/libcom/src/cvtFast/cvtFast.c
1313index 106c1ba..887f0c8 100644
1314--- a/modules/libcom/src/cvtFast/cvtFast.c
1315+++ b/modules/libcom/src/cvtFast/cvtFast.c
1316@@ -16,7 +16,6 @@
1317 #include <string.h>
1318 #include <limits.h>
1319
1320-#define epicsExportSharedSymbols
1321 #include "cvtFast.h"
1322 #include "epicsMath.h"
1323 #include "epicsStdio.h"
1324diff --git a/modules/libcom/src/cvtFast/cvtFast.h b/modules/libcom/src/cvtFast/cvtFast.h
1325index db06dda..31c04c4 100644
1326--- a/modules/libcom/src/cvtFast/cvtFast.h
1327+++ b/modules/libcom/src/cvtFast/cvtFast.h
1328@@ -20,7 +20,7 @@
1329 #include <stddef.h>
1330
1331 #include "epicsTypes.h"
1332-#include "shareLib.h"
1333+#include "libComAPI.h"
1334
1335 #ifdef __cplusplus
1336 extern "C" {
1337@@ -29,38 +29,38 @@ extern "C" {
1338 /*
1339 * All functions return the number of characters in the output
1340 */
1341-epicsShareFunc int
1342+LIBCOM_API int
1343 cvtFloatToString(float val, char *pdest, epicsUInt16 prec);
1344-epicsShareFunc int
1345+LIBCOM_API int
1346 cvtDoubleToString(double val, char *pdest, epicsUInt16 prec);
1347
1348-epicsShareFunc int
1349+LIBCOM_API int
1350 cvtFloatToExpString(float val, char *pdest, epicsUInt16 prec);
1351-epicsShareFunc int
1352+LIBCOM_API int
1353 cvtDoubleToExpString(double val, char *pdest, epicsUInt16 prec);
1354-epicsShareFunc int
1355+LIBCOM_API int
1356 cvtFloatToCompactString(float val, char *pdest, epicsUInt16 prec);
1357-epicsShareFunc int
1358+LIBCOM_API int
1359 cvtDoubleToCompactString(double val, char *pdest, epicsUInt16 prec);
1360
1361-epicsShareFunc size_t
1362+LIBCOM_API size_t
1363 cvtInt32ToString(epicsInt32 val, char *pdest);
1364-epicsShareFunc size_t
1365+LIBCOM_API size_t
1366 cvtUInt32ToString(epicsUInt32 val, char *pdest);
1367-epicsShareFunc size_t
1368+LIBCOM_API size_t
1369 cvtInt64ToString(epicsInt64 val, char *pdest);
1370-epicsShareFunc size_t
1371+LIBCOM_API size_t
1372 cvtUInt64ToString(epicsUInt64 val, char *pdest);
1373
1374-epicsShareFunc size_t
1375+LIBCOM_API size_t
1376 cvtInt32ToHexString(epicsInt32 val, char *pdest);
1377-epicsShareFunc size_t
1378+LIBCOM_API size_t
1379 cvtUInt32ToHexString(epicsUInt32 val, char *pdest);
1380-epicsShareFunc size_t
1381+LIBCOM_API size_t
1382 cvtInt32ToOctalString(epicsInt32 val, char *pdest);
1383-epicsShareFunc size_t
1384+LIBCOM_API size_t
1385 cvtInt64ToHexString(epicsInt64 val, char *pdest);
1386-epicsShareFunc size_t
1387+LIBCOM_API size_t
1388 cvtUInt64ToHexString(epicsUInt64 val, char *pdest);
1389
1390 /* Support the original names */
1391diff --git a/modules/libcom/src/cxxTemplates/epicsSingleton.h b/modules/libcom/src/cxxTemplates/epicsSingleton.h
1392index 2c63d3f..89c3ab9 100644
1393--- a/modules/libcom/src/cxxTemplates/epicsSingleton.h
1394+++ b/modules/libcom/src/cxxTemplates/epicsSingleton.h
1395@@ -18,10 +18,10 @@
1396 #include <new>
1397 #include <cstddef>
1398
1399-#include "shareLib.h"
1400+#include "libComAPI.h"
1401 #include "epicsAssert.h"
1402
1403-class epicsShareClass SingletonUntyped {
1404+class LIBCOM_API SingletonUntyped {
1405 public:
1406 SingletonUntyped ();
1407 ~SingletonUntyped ();
1408diff --git a/modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp b/modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp
1409index 8cd69d9..b878e3d 100644
1410--- a/modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp
1411+++ b/modules/libcom/src/cxxTemplates/epicsSingletonMutex.cpp
1412@@ -14,7 +14,6 @@
1413
1414 #include <climits>
1415
1416-#define epicsExportSharedSymbols
1417 #include "epicsMutex.h"
1418 #include "epicsGuard.h"
1419 #include "epicsThread.h"
1420diff --git a/modules/libcom/src/cxxTemplates/resourceLib.h b/modules/libcom/src/cxxTemplates/resourceLib.h
1421index 7b61e23..ff7ef99 100644
1422--- a/modules/libcom/src/cxxTemplates/resourceLib.h
1423+++ b/modules/libcom/src/cxxTemplates/resourceLib.h
1424@@ -41,7 +41,7 @@
1425
1426 #include "tsSLList.h"
1427 #include "epicsString.h"
1428-#include "shareLib.h"
1429+#include "libComAPI.h"
1430 typedef size_t resTableIndex;
1431
1432 template < class T, class ID > class resTableIter;
1433@@ -253,7 +253,7 @@ private:
1434 //
1435 // character string identifier
1436 //
1437-class epicsShareClass stringId {
1438+class LIBCOM_API stringId {
1439 public:
1440 enum allocationType {copyString, refString};
1441 stringId (const char * idIn, allocationType typeIn=copyString);
1442diff --git a/modules/libcom/src/dbmf/dbmf.c b/modules/libcom/src/dbmf/dbmf.c
1443index e04a7be..035e75a 100644
1444--- a/modules/libcom/src/dbmf/dbmf.c
1445+++ b/modules/libcom/src/dbmf/dbmf.c
1446@@ -28,7 +28,6 @@
1447 #define REDZONE 0
1448 #endif
1449
1450-#define epicsExportSharedSymbols
1451 #include "cantProceed.h"
1452 #include "epicsMutex.h"
1453 #include "ellLib.h"
1454diff --git a/modules/libcom/src/dbmf/dbmf.h b/modules/libcom/src/dbmf/dbmf.h
1455index 2c8a28f..6ced560 100644
1456--- a/modules/libcom/src/dbmf/dbmf.h
1457+++ b/modules/libcom/src/dbmf/dbmf.h
1458@@ -17,21 +17,21 @@
1459 #define DBMF_H
1460
1461 #include <stdlib.h>
1462-#include "shareLib.h"
1463+#include "libComAPI.h"
1464
1465 #ifdef __cplusplus
1466 extern "C" {
1467 #endif
1468
1469-epicsShareFunc int dbmfInit(size_t size, int chunkItems);
1470-epicsShareFunc void * dbmfMalloc(size_t bytes);
1471-epicsShareFunc char * dbmfStrdup(const char *str);
1472-epicsShareFunc char * dbmfStrndup(const char *str, size_t len);
1473-epicsShareFunc char * dbmfStrcat3(const char *lhs, const char *mid,
1474+LIBCOM_API int dbmfInit(size_t size, int chunkItems);
1475+LIBCOM_API void * dbmfMalloc(size_t bytes);
1476+LIBCOM_API char * dbmfStrdup(const char *str);
1477+LIBCOM_API char * dbmfStrndup(const char *str, size_t len);
1478+LIBCOM_API char * dbmfStrcat3(const char *lhs, const char *mid,
1479 const char *rhs);
1480-epicsShareFunc void dbmfFree(void *bytes);
1481-epicsShareFunc void dbmfFreeChunks(void);
1482-epicsShareFunc int dbmfShow(int level);
1483+LIBCOM_API void dbmfFree(void *bytes);
1484+LIBCOM_API void dbmfFreeChunks(void);
1485+LIBCOM_API int dbmfShow(int level);
1486
1487 /* Rules:
1488 * 1) Size is always made a multiple of 8.
1489diff --git a/modules/libcom/src/ellLib/ellLib.c b/modules/libcom/src/ellLib/ellLib.c
1490index c539a84..184202f 100644
1491--- a/modules/libcom/src/ellLib/ellLib.c
1492+++ b/modules/libcom/src/ellLib/ellLib.c
1493@@ -13,7 +13,6 @@
1494
1495 #include <stdlib.h>
1496
1497-#define epicsExportSharedSymbols
1498 #include "epicsAssert.h"
1499 #include "ellLib.h"
1500
1501diff --git a/modules/libcom/src/ellLib/ellLib.h b/modules/libcom/src/ellLib/ellLib.h
1502index 52b58d1..fab2b8d 100644
1503--- a/modules/libcom/src/ellLib/ellLib.h
1504+++ b/modules/libcom/src/ellLib/ellLib.h
1505@@ -13,7 +13,7 @@
1506 #ifndef INC_ellLib_H
1507 #define INC_ellLib_H
1508
1509-#include "shareLib.h"
1510+#include "libComAPI.h"
1511
1512 #ifdef __cplusplus
1513 extern "C" {
1514@@ -46,20 +46,20 @@ typedef void (*FREEFUNC)(void *);
1515 #define ellPrevious(PNODE) ((PNODE)->previous)
1516 #define ellFree(PLIST) ellFree2(PLIST, free)
1517
1518-epicsShareFunc void ellAdd (ELLLIST *pList, ELLNODE *pNode);
1519-epicsShareFunc void ellConcat (ELLLIST *pDstList, ELLLIST *pAddList);
1520-epicsShareFunc void ellDelete (ELLLIST *pList, ELLNODE *pNode);
1521-epicsShareFunc void ellExtract (ELLLIST *pSrcList, ELLNODE *pStartNode, ELLNODE *pEndNode, ELLLIST *pDstList);
1522-epicsShareFunc ELLNODE * ellGet (ELLLIST *pList);
1523-epicsShareFunc ELLNODE * ellPop (ELLLIST *pList);
1524-epicsShareFunc void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode);
1525-epicsShareFunc ELLNODE * ellNth (ELLLIST *pList, int nodeNum);
1526-epicsShareFunc ELLNODE * ellNStep (ELLNODE *pNode, int nStep);
1527-epicsShareFunc int ellFind (ELLLIST *pList, ELLNODE *pNode);
1528+LIBCOM_API void ellAdd (ELLLIST *pList, ELLNODE *pNode);
1529+LIBCOM_API void ellConcat (ELLLIST *pDstList, ELLLIST *pAddList);
1530+LIBCOM_API void ellDelete (ELLLIST *pList, ELLNODE *pNode);
1531+LIBCOM_API void ellExtract (ELLLIST *pSrcList, ELLNODE *pStartNode, ELLNODE *pEndNode, ELLLIST *pDstList);
1532+LIBCOM_API ELLNODE * ellGet (ELLLIST *pList);
1533+LIBCOM_API ELLNODE * ellPop (ELLLIST *pList);
1534+LIBCOM_API void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode);
1535+LIBCOM_API ELLNODE * ellNth (ELLLIST *pList, int nodeNum);
1536+LIBCOM_API ELLNODE * ellNStep (ELLNODE *pNode, int nStep);
1537+LIBCOM_API int ellFind (ELLLIST *pList, ELLNODE *pNode);
1538 typedef int (*pListCmp)(const ELLNODE* A, const ELLNODE* B);
1539-epicsShareFunc void ellSortStable(ELLLIST *pList, pListCmp);
1540-epicsShareFunc void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc);
1541-epicsShareFunc void ellVerify (ELLLIST *pList);
1542+LIBCOM_API void ellSortStable(ELLLIST *pList, pListCmp);
1543+LIBCOM_API void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc);
1544+LIBCOM_API void ellVerify (ELLLIST *pList);
1545
1546 #ifdef __cplusplus
1547 }
1548diff --git a/modules/libcom/src/ellLib/ellSort.c b/modules/libcom/src/ellLib/ellSort.c
1549index 2f8f274..1aa6679 100644
1550--- a/modules/libcom/src/ellLib/ellSort.c
1551+++ b/modules/libcom/src/ellLib/ellSort.c
1552@@ -12,7 +12,6 @@
1553 */
1554 #include <stdlib.h>
1555
1556-#define epicsExportSharedSymbols
1557 #include "epicsAssert.h"
1558 #include "ellLib.h"
1559
1560diff --git a/modules/libcom/src/env/bldEnvData.pl b/modules/libcom/src/env/bldEnvData.pl
1561index 693be65..d4c4731 100644
1562--- a/modules/libcom/src/env/bldEnvData.pl
1563+++ b/modules/libcom/src/env/bldEnvData.pl
1564@@ -44,7 +44,7 @@ open SRC, '<', $env_defs
1565
1566 my @vars;
1567 while (<SRC>) {
1568- if (m/epicsShareExtern\s+const\s+ENV_PARAM\s+([A-Za-z_]\w*)\s*;/) {
1569+ if (m/LIBCOM_API extern\s+const\s+ENV_PARAM\s+([A-Za-z_]\w*)\s*;/) {
1570 push @vars, $1;
1571 }
1572 }
1573@@ -96,7 +96,6 @@ $sources
1574 */
1575
1576 #include <stddef.h>
1577-#define epicsExportSharedSymbols
1578 #include "envDefs.h"
1579
1580 END
1581@@ -113,14 +112,14 @@ foreach my $var (@vars) {
1582 $default = '';
1583 }
1584
1585- print OUT "epicsShareDef const ENV_PARAM $var =\n",
1586+ print OUT "const ENV_PARAM $var =\n",
1587 " {\"$var\", \"$default\"};\n";
1588 }
1589
1590 # Also provide a list of all defined parameters
1591 #
1592 print OUT "\n",
1593- "epicsShareDef const ENV_PARAM* env_param_list[] = {\n",
1594+ "const ENV_PARAM* env_param_list[] = {\n",
1595 wrap(' ', ' ', join(', ', map("&$_", @vars), 'NULL')),
1596 "\n};\n";
1597 close OUT;
1598diff --git a/modules/libcom/src/env/envDefs.h b/modules/libcom/src/env/envDefs.h
1599index 2490702..fdb9125 100644
1600--- a/modules/libcom/src/env/envDefs.h
1601+++ b/modules/libcom/src/env/envDefs.h
1602@@ -32,7 +32,7 @@
1603 extern "C" {
1604 #endif
1605
1606-#include "shareLib.h"
1607+#include "libComAPI.h"
1608
1609 typedef struct envParam {
1610 char *name; /* text name of the parameter */
1611@@ -40,65 +40,65 @@ typedef struct envParam {
1612 } ENV_PARAM;
1613
1614 /*
1615- * bldEnvData.pl looks for "epicsShareExtern const ENV_PARAM <name>;"
1616+ * bldEnvData.pl looks for "LIBCOM_API extern const ENV_PARAM <name>;"
1617 */
1618-epicsShareExtern const ENV_PARAM EPICS_CA_ADDR_LIST;
1619-epicsShareExtern const ENV_PARAM EPICS_CA_CONN_TMO;
1620-epicsShareExtern const ENV_PARAM EPICS_CA_AUTO_ADDR_LIST;
1621-epicsShareExtern const ENV_PARAM EPICS_CA_REPEATER_PORT;
1622-epicsShareExtern const ENV_PARAM EPICS_CA_SERVER_PORT;
1623-epicsShareExtern const ENV_PARAM EPICS_CA_MAX_ARRAY_BYTES;
1624-epicsShareExtern const ENV_PARAM EPICS_CA_AUTO_ARRAY_BYTES;
1625-epicsShareExtern const ENV_PARAM EPICS_CA_MAX_SEARCH_PERIOD;
1626-epicsShareExtern const ENV_PARAM EPICS_CA_NAME_SERVERS;
1627-epicsShareExtern const ENV_PARAM EPICS_CA_MCAST_TTL;
1628-epicsShareExtern const ENV_PARAM EPICS_CAS_INTF_ADDR_LIST;
1629-epicsShareExtern const ENV_PARAM EPICS_CAS_IGNORE_ADDR_LIST;
1630-epicsShareExtern const ENV_PARAM EPICS_CAS_AUTO_BEACON_ADDR_LIST;
1631-epicsShareExtern const ENV_PARAM EPICS_CAS_BEACON_ADDR_LIST;
1632-epicsShareExtern const ENV_PARAM EPICS_CAS_SERVER_PORT;
1633-epicsShareExtern const ENV_PARAM EPICS_CA_BEACON_PERIOD; /* deprecated */
1634-epicsShareExtern const ENV_PARAM EPICS_CAS_BEACON_PERIOD;
1635-epicsShareExtern const ENV_PARAM EPICS_CAS_BEACON_PORT;
1636-epicsShareExtern const ENV_PARAM EPICS_BUILD_COMPILER_CLASS;
1637-epicsShareExtern const ENV_PARAM EPICS_BUILD_OS_CLASS;
1638-epicsShareExtern const ENV_PARAM EPICS_BUILD_TARGET_ARCH;
1639-epicsShareExtern const ENV_PARAM EPICS_TZ;
1640-epicsShareExtern const ENV_PARAM EPICS_TS_NTP_INET;
1641-epicsShareExtern const ENV_PARAM EPICS_IOC_IGNORE_SERVERS;
1642-epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_PORT;
1643-epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_INET;
1644-epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_FILE_LIMIT;
1645-epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_FILE_NAME;
1646-epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_FILE_COMMAND;
1647-epicsShareExtern const ENV_PARAM IOCSH_PS1;
1648-epicsShareExtern const ENV_PARAM IOCSH_HISTSIZE;
1649-epicsShareExtern const ENV_PARAM IOCSH_HISTEDIT_DISABLE;
1650+LIBCOM_API extern const ENV_PARAM EPICS_CA_ADDR_LIST;
1651+LIBCOM_API extern const ENV_PARAM EPICS_CA_CONN_TMO;
1652+LIBCOM_API extern const ENV_PARAM EPICS_CA_AUTO_ADDR_LIST;
1653+LIBCOM_API extern const ENV_PARAM EPICS_CA_REPEATER_PORT;
1654+LIBCOM_API extern const ENV_PARAM EPICS_CA_SERVER_PORT;
1655+LIBCOM_API extern const ENV_PARAM EPICS_CA_MAX_ARRAY_BYTES;
1656+LIBCOM_API extern const ENV_PARAM EPICS_CA_AUTO_ARRAY_BYTES;
1657+LIBCOM_API extern const ENV_PARAM EPICS_CA_MAX_SEARCH_PERIOD;
1658+LIBCOM_API extern const ENV_PARAM EPICS_CA_NAME_SERVERS;
1659+LIBCOM_API extern const ENV_PARAM EPICS_CA_MCAST_TTL;
1660+LIBCOM_API extern const ENV_PARAM EPICS_CAS_INTF_ADDR_LIST;
1661+LIBCOM_API extern const ENV_PARAM EPICS_CAS_IGNORE_ADDR_LIST;
1662+LIBCOM_API extern const ENV_PARAM EPICS_CAS_AUTO_BEACON_ADDR_LIST;
1663+LIBCOM_API extern const ENV_PARAM EPICS_CAS_BEACON_ADDR_LIST;
1664+LIBCOM_API extern const ENV_PARAM EPICS_CAS_SERVER_PORT;
1665+LIBCOM_API extern const ENV_PARAM EPICS_CA_BEACON_PERIOD; /* deprecated */
1666+LIBCOM_API extern const ENV_PARAM EPICS_CAS_BEACON_PERIOD;
1667+LIBCOM_API extern const ENV_PARAM EPICS_CAS_BEACON_PORT;
1668+LIBCOM_API extern const ENV_PARAM EPICS_BUILD_COMPILER_CLASS;
1669+LIBCOM_API extern const ENV_PARAM EPICS_BUILD_OS_CLASS;
1670+LIBCOM_API extern const ENV_PARAM EPICS_BUILD_TARGET_ARCH;
1671+LIBCOM_API extern const ENV_PARAM EPICS_TZ;
1672+LIBCOM_API extern const ENV_PARAM EPICS_TS_NTP_INET;
1673+LIBCOM_API extern const ENV_PARAM EPICS_IOC_IGNORE_SERVERS;
1674+LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_PORT;
1675+LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_INET;
1676+LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_FILE_LIMIT;
1677+LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_FILE_NAME;
1678+LIBCOM_API extern const ENV_PARAM EPICS_IOC_LOG_FILE_COMMAND;
1679+LIBCOM_API extern const ENV_PARAM IOCSH_PS1;
1680+LIBCOM_API extern const ENV_PARAM IOCSH_HISTSIZE;
1681+LIBCOM_API extern const ENV_PARAM IOCSH_HISTEDIT_DISABLE;
1682
1683-epicsShareExtern const ENV_PARAM *env_param_list[];
1684+LIBCOM_API extern const ENV_PARAM *env_param_list[];
1685
1686 struct in_addr;
1687
1688-epicsShareFunc char * epicsShareAPI
1689+LIBCOM_API char * LIBCOMSTD_API
1690 envGetConfigParam(const ENV_PARAM *pParam, int bufDim, char *pBuf);
1691-epicsShareFunc const char * epicsShareAPI
1692+LIBCOM_API const char * LIBCOMSTD_API
1693 envGetConfigParamPtr(const ENV_PARAM *pParam);
1694-epicsShareFunc long epicsShareAPI
1695+LIBCOM_API long LIBCOMSTD_API
1696 envPrtConfigParam(const ENV_PARAM *pParam);
1697-epicsShareFunc long epicsShareAPI
1698+LIBCOM_API long LIBCOMSTD_API
1699 envGetInetAddrConfigParam(const ENV_PARAM *pParam, struct in_addr *pAddr);
1700-epicsShareFunc long epicsShareAPI
1701+LIBCOM_API long LIBCOMSTD_API
1702 envGetDoubleConfigParam(const ENV_PARAM *pParam, double *pDouble);
1703-epicsShareFunc long epicsShareAPI
1704+LIBCOM_API long LIBCOMSTD_API
1705 envGetLongConfigParam(const ENV_PARAM *pParam, long *pLong);
1706-epicsShareFunc unsigned short epicsShareAPI envGetInetPortConfigParam
1707+LIBCOM_API unsigned short LIBCOMSTD_API envGetInetPortConfigParam
1708 (const ENV_PARAM *pEnv, unsigned short defaultPort);
1709-epicsShareFunc long epicsShareAPI
1710+LIBCOM_API long LIBCOMSTD_API
1711 envGetBoolConfigParam(const ENV_PARAM *pParam, int *pBool);
1712-epicsShareFunc long epicsShareAPI epicsPrtEnvParams(void);
1713-epicsShareFunc void epicsShareAPI epicsEnvSet (const char *name, const char *value);
1714-epicsShareFunc void epicsShareAPI epicsEnvUnset (const char *name);
1715-epicsShareFunc void epicsShareAPI epicsEnvShow (const char *name);
1716+LIBCOM_API long LIBCOMSTD_API epicsPrtEnvParams(void);
1717+LIBCOM_API void LIBCOMSTD_API epicsEnvSet (const char *name, const char *value);
1718+LIBCOM_API void LIBCOMSTD_API epicsEnvUnset (const char *name);
1719+LIBCOM_API void LIBCOMSTD_API epicsEnvShow (const char *name);
1720
1721 #ifdef __cplusplus
1722 }
1723diff --git a/modules/libcom/src/env/envSubr.c b/modules/libcom/src/env/envSubr.c
1724index 283b132..e036138 100644
1725--- a/modules/libcom/src/env/envSubr.c
1726+++ b/modules/libcom/src/env/envSubr.c
1727@@ -40,7 +40,6 @@
1728 #include <string.h>
1729 #include <limits.h>
1730
1731-#define epicsExportSharedSymbols
1732 #include "epicsStdlib.h"
1733 #include "epicsStdio.h"
1734 #include "epicsString.h"
1735@@ -79,7 +78,7 @@
1736 * }
1737 *
1738 *-*/
1739-const char * epicsShareAPI envGetConfigParamPtr(
1740+const char * LIBCOMSTD_API envGetConfigParamPtr(
1741 const ENV_PARAM *pParam /* I pointer to config param structure */
1742 )
1743 {
1744@@ -137,7 +136,7 @@ const ENV_PARAM *pParam /* I pointer to config param structure */
1745 * printf("DISPLAY is %s\n", temp);
1746 *
1747 *-*/
1748-char * epicsShareAPI envGetConfigParam(
1749+char * LIBCOMSTD_API envGetConfigParam(
1750 const ENV_PARAM *pParam,/* I pointer to config param structure */
1751 int bufDim, /* I dimension of parameter buffer */
1752 char *pBuf /* I pointer to parameter buffer */
1753@@ -189,7 +188,7 @@ char *pBuf /* I pointer to parameter buffer */
1754 * }
1755 *
1756 *-*/
1757-long epicsShareAPI envGetDoubleConfigParam(
1758+long LIBCOMSTD_API envGetDoubleConfigParam(
1759 const ENV_PARAM *pParam,/* I pointer to config param structure */
1760 double *pDouble /* O pointer to place to store value */
1761 )
1762@@ -244,7 +243,7 @@ double *pDouble /* O pointer to place to store value */
1763 * }
1764 *
1765 *-*/
1766-long epicsShareAPI envGetInetAddrConfigParam(
1767+long LIBCOMSTD_API envGetInetAddrConfigParam(
1768 const ENV_PARAM *pParam,/* I pointer to config param structure */
1769 struct in_addr *pAddr /* O pointer to struct to receive inet addr */
1770 )
1771@@ -301,7 +300,7 @@ struct in_addr *pAddr /* O pointer to struct to receive inet addr */
1772 * }
1773 *
1774 *-*/
1775-long epicsShareAPI envGetLongConfigParam(
1776+long LIBCOMSTD_API envGetLongConfigParam(
1777 const ENV_PARAM *pParam,/* I pointer to config param structure */
1778 long *pLong /* O pointer to place to store value */
1779 )
1780@@ -322,7 +321,7 @@ long *pLong /* O pointer to place to store value */
1781 }
1782
1783
1784-long epicsShareAPI
1785+long LIBCOMSTD_API
1786 envGetBoolConfigParam(const ENV_PARAM *pParam, int *pBool)
1787 {
1788 char text[20];
1789@@ -351,7 +350,7 @@ envGetBoolConfigParam(const ENV_PARAM *pParam, int *pBool)
1790 * envPrtConfigParam(&EPICS_TS_NTP_INET);
1791 *
1792 *-*/
1793-long epicsShareAPI envPrtConfigParam(
1794+long LIBCOMSTD_API envPrtConfigParam(
1795 const ENV_PARAM *pParam) /* pointer to config param structure */
1796 {
1797 const char *pVal;
1798@@ -381,7 +380,7 @@ const ENV_PARAM *pParam) /* pointer to config param structure */
1799 * epicsPrtEnvParams();
1800 *
1801 *-*/
1802-long epicsShareAPI
1803+long LIBCOMSTD_API
1804 epicsPrtEnvParams(void)
1805 {
1806 const ENV_PARAM **ppParam = env_param_list;
1807@@ -395,7 +394,7 @@ epicsPrtEnvParams(void)
1808 /*
1809 * envGetInetPortConfigParam ()
1810 */
1811-epicsShareFunc unsigned short epicsShareAPI envGetInetPortConfigParam
1812+LIBCOM_API unsigned short LIBCOMSTD_API envGetInetPortConfigParam
1813 (const ENV_PARAM *pEnv, unsigned short defaultPort)
1814 {
1815 long longStatus;
1816diff --git a/modules/libcom/src/error/errSymLib.c b/modules/libcom/src/error/errSymLib.c
1817index 8f59718..33fe2e5 100644
1818--- a/modules/libcom/src/error/errSymLib.c
1819+++ b/modules/libcom/src/error/errSymLib.c
1820@@ -19,7 +19,6 @@
1821 #include <math.h>
1822 #include <limits.h>
1823
1824-#define epicsExportSharedSymbols
1825 #include "cantProceed.h"
1826 #include "epicsAssert.h"
1827 #include "epicsStdio.h"
1828diff --git a/modules/libcom/src/error/errSymTbl.h b/modules/libcom/src/error/errSymTbl.h
1829index 7fc25f7..c3c0c49 100644
1830--- a/modules/libcom/src/error/errSymTbl.h
1831+++ b/modules/libcom/src/error/errSymTbl.h
1832@@ -12,7 +12,7 @@
1833
1834 #include <stddef.h>
1835
1836-#include "shareLib.h"
1837+#include "libComAPI.h"
1838 #include "epicsTypes.h"
1839
1840 /* ERRSYMBOL - entry in symbol table */
1841@@ -34,14 +34,14 @@ typedef ERRSYMTAB *ERRSYMTAB_ID;
1842 extern "C" {
1843 #endif
1844
1845-epicsShareFunc void errSymLookup(long status, char *pBuf, size_t bufLength);
1846-epicsShareFunc const char* errSymMsg(long status);
1847-epicsShareFunc void errSymTest(epicsUInt16 modnum, epicsUInt16 begErrNum,
1848+LIBCOM_API void errSymLookup(long status, char *pBuf, size_t bufLength);
1849+LIBCOM_API const char* errSymMsg(long status);
1850+LIBCOM_API void errSymTest(epicsUInt16 modnum, epicsUInt16 begErrNum,
1851 epicsUInt16 endErrNum);
1852-epicsShareFunc void errSymTestPrint(long errNum);
1853-epicsShareFunc int errSymBld(void);
1854-epicsShareFunc int errSymbolAdd(long errNum, const char *name);
1855-epicsShareFunc void errSymDump(void);
1856+LIBCOM_API void errSymTestPrint(long errNum);
1857+LIBCOM_API int errSymBld(void);
1858+LIBCOM_API int errSymbolAdd(long errNum, const char *name);
1859+LIBCOM_API void errSymDump(void);
1860
1861 #ifdef __cplusplus
1862 }
1863diff --git a/modules/libcom/src/error/errlog.c b/modules/libcom/src/error/errlog.c
1864index 8445a5a..702a157 100644
1865--- a/modules/libcom/src/error/errlog.c
1866+++ b/modules/libcom/src/error/errlog.c
1867@@ -18,7 +18,6 @@
1868 #include <string.h>
1869 #include <errno.h>
1870
1871-#define epicsExportSharedSymbols
1872 #define ERRLOG_INIT
1873 #include "adjustment.h"
1874 #include "dbDefs.h"
1875@@ -39,7 +38,7 @@
1876 #define MAX_MESSAGE_SIZE 256
1877
1878 /*Declare storage for errVerbose */
1879-epicsShareDef int errVerbose = 0;
1880+int errVerbose = 0;
1881
1882 static void errlogExitHandler(void *);
1883 static void errlogThread(void);
1884diff --git a/modules/libcom/src/error/errlog.h b/modules/libcom/src/error/errlog.h
1885index e8a4fb5..d705163 100644
1886--- a/modules/libcom/src/error/errlog.h
1887+++ b/modules/libcom/src/error/errlog.h
1888@@ -14,7 +14,7 @@
1889 #include <stddef.h>
1890 #include <stdio.h>
1891
1892-#include "shareLib.h"
1893+#include "libComAPI.h"
1894 #include "compilerDependencies.h"
1895
1896 #ifdef __cplusplus
1897@@ -30,18 +30,18 @@ typedef enum {
1898 errlogFatal
1899 } errlogSevEnum;
1900
1901-epicsShareExtern int errVerbose;
1902+LIBCOM_API extern int errVerbose;
1903
1904
1905 #ifdef ERRLOG_INIT
1906- epicsShareDef const char *errlogSevEnumString[] = {
1907+ const char *errlogSevEnumString[] = {
1908 "info",
1909 "minor",
1910 "major",
1911 "fatal"
1912 };
1913 #else
1914- epicsShareExtern const char * errlogSevEnumString[];
1915+ LIBCOM_API extern const char * errlogSevEnumString[];
1916 #endif
1917
1918 /* errMessage is a macro so it can get the file and line number */
1919@@ -51,38 +51,38 @@ epicsShareExtern int errVerbose;
1920 #define epicsPrintf errlogPrintf
1921 #define epicsVprintf errlogVprintf
1922
1923-epicsShareFunc int errlogPrintf(const char *pformat, ...)
1924+LIBCOM_API int errlogPrintf(const char *pformat, ...)
1925 EPICS_PRINTF_STYLE(1,2);
1926-epicsShareFunc int errlogVprintf(const char *pformat, va_list pvar);
1927-epicsShareFunc int errlogSevPrintf(const errlogSevEnum severity,
1928+LIBCOM_API int errlogVprintf(const char *pformat, va_list pvar);
1929+LIBCOM_API int errlogSevPrintf(const errlogSevEnum severity,
1930 const char *pformat, ...) EPICS_PRINTF_STYLE(2,3);
1931-epicsShareFunc int errlogSevVprintf(const errlogSevEnum severity,
1932+LIBCOM_API int errlogSevVprintf(const errlogSevEnum severity,
1933 const char *pformat, va_list pvar);
1934-epicsShareFunc int errlogMessage(const char *message);
1935+LIBCOM_API int errlogMessage(const char *message);
1936
1937-epicsShareFunc const char * errlogGetSevEnumString(errlogSevEnum severity);
1938-epicsShareFunc void errlogSetSevToLog(errlogSevEnum severity);
1939-epicsShareFunc errlogSevEnum errlogGetSevToLog(void);
1940+LIBCOM_API const char * errlogGetSevEnumString(errlogSevEnum severity);
1941+LIBCOM_API void errlogSetSevToLog(errlogSevEnum severity);
1942+LIBCOM_API errlogSevEnum errlogGetSevToLog(void);
1943
1944-epicsShareFunc void errlogAddListener(errlogListener listener, void *pPrivate);
1945-epicsShareFunc int errlogRemoveListeners(errlogListener listener,
1946+LIBCOM_API void errlogAddListener(errlogListener listener, void *pPrivate);
1947+LIBCOM_API int errlogRemoveListeners(errlogListener listener,
1948 void *pPrivate);
1949
1950-epicsShareFunc int eltc(int yesno);
1951-epicsShareFunc int errlogSetConsole(FILE *stream);
1952+LIBCOM_API int eltc(int yesno);
1953+LIBCOM_API int errlogSetConsole(FILE *stream);
1954
1955-epicsShareFunc int errlogInit(int bufsize);
1956-epicsShareFunc int errlogInit2(int bufsize, int maxMsgSize);
1957-epicsShareFunc void errlogFlush(void);
1958+LIBCOM_API int errlogInit(int bufsize);
1959+LIBCOM_API int errlogInit2(int bufsize, int maxMsgSize);
1960+LIBCOM_API void errlogFlush(void);
1961
1962-epicsShareFunc void errPrintf(long status, const char *pFileName, int lineno,
1963+LIBCOM_API void errPrintf(long status, const char *pFileName, int lineno,
1964 const char *pformat, ...) EPICS_PRINTF_STYLE(4,5);
1965
1966-epicsShareFunc int errlogPrintfNoConsole(const char *pformat, ...)
1967+LIBCOM_API int errlogPrintfNoConsole(const char *pformat, ...)
1968 EPICS_PRINTF_STYLE(1,2);
1969-epicsShareFunc int errlogVprintfNoConsole(const char *pformat,va_list pvar);
1970+LIBCOM_API int errlogVprintfNoConsole(const char *pformat,va_list pvar);
1971
1972-epicsShareFunc void errSymLookup(long status, char *pBuf, size_t bufLength);
1973+LIBCOM_API void errSymLookup(long status, char *pBuf, size_t bufLength);
1974
1975 #ifdef __cplusplus
1976 }
1977diff --git a/modules/libcom/src/fdmgr/fdManager.cpp b/modules/libcom/src/fdmgr/fdManager.cpp
1978index 3bbc648..2c30333 100644
1979--- a/modules/libcom/src/fdmgr/fdManager.cpp
1980+++ b/modules/libcom/src/fdmgr/fdManager.cpp
1981@@ -22,7 +22,6 @@
1982 #include <algorithm>
1983
1984 #define instantiateRecourceLib
1985-#define epicsExportSharedSymbols
1986 #include "epicsAssert.h"
1987 #include "epicsThread.h"
1988 #include "fdManager.h"
1989@@ -30,7 +29,7 @@
1990
1991 using std :: max;
1992
1993-epicsShareDef fdManager fileDescriptorManager;
1994+fdManager fileDescriptorManager;
1995
1996 const unsigned mSecPerSec = 1000u;
1997 const unsigned uSecPerSec = 1000u * mSecPerSec;
1998@@ -41,7 +40,7 @@ const unsigned uSecPerSec = 1000u * mSecPerSec;
1999 // hopefully its a reasonable guess that select() and epicsThreadSleep()
2000 // will have the same sleep quantum
2001 //
2002-epicsShareFunc fdManager::fdManager () :
2003+LIBCOM_API fdManager::fdManager () :
2004 sleepQuantum ( epicsThreadSleepQuantum () ),
2005 fdSetsPtr ( new fd_set [fdrNEnums] ),
2006 pTimerQueue ( 0 ), maxFD ( 0 ), processInProg ( false ),
2007@@ -58,7 +57,7 @@ epicsShareFunc fdManager::fdManager () :
2008 //
2009 // fdManager::~fdManager()
2010 //
2011-epicsShareFunc fdManager::~fdManager()
2012+LIBCOM_API fdManager::~fdManager()
2013 {
2014 fdReg *pReg;
2015
2016@@ -78,7 +77,7 @@ epicsShareFunc fdManager::~fdManager()
2017 //
2018 // fdManager::process()
2019 //
2020-epicsShareFunc void fdManager::process (double delay)
2021+LIBCOM_API void fdManager::process (double delay)
2022 {
2023 this->lazyInitTimerQueue ();
2024
2025@@ -331,7 +330,7 @@ double fdManager::quantum ()
2026 //
2027 // lookUpFD()
2028 //
2029-epicsShareFunc fdReg *fdManager::lookUpFD (const SOCKET fd, const fdRegType type)
2030+LIBCOM_API fdReg *fdManager::lookUpFD (const SOCKET fd, const fdRegType type)
2031 {
2032 if (fd<0) {
2033 return NULL;
2034diff --git a/modules/libcom/src/fdmgr/fdManager.h b/modules/libcom/src/fdmgr/fdManager.h
2035index 59a2f35..585c2ef 100644
2036--- a/modules/libcom/src/fdmgr/fdManager.h
2037+++ b/modules/libcom/src/fdmgr/fdManager.h
2038@@ -19,7 +19,7 @@
2039 #ifndef fdManagerH_included
2040 #define fdManagerH_included
2041
2042-#include "shareLib.h" // reset share lib defines
2043+#include "libComAPI.h" // reset share lib defines
2044 #include "tsDLList.h"
2045 #include "resourceLib.h"
2046 #include "epicsTime.h"
2047@@ -33,7 +33,7 @@ enum fdRegType {fdrRead, fdrWrite, fdrException, fdrNEnums};
2048 //
2049 // file descriptor interest id
2050 //
2051-class epicsShareClass fdRegId
2052+class LIBCOM_API fdRegId
2053 {
2054 public:
2055
2056@@ -77,12 +77,12 @@ public:
2057 //
2058 class fdInterestSubscriptionAlreadyExits {};
2059
2060- epicsShareFunc fdManager ();
2061- epicsShareFunc virtual ~fdManager ();
2062- epicsShareFunc void process ( double delay ); // delay parameter is in seconds
2063+ LIBCOM_API fdManager ();
2064+ LIBCOM_API virtual ~fdManager ();
2065+ LIBCOM_API void process ( double delay ); // delay parameter is in seconds
2066
2067 // returns NULL if the fd is unknown
2068- epicsShareFunc class fdReg *lookUpFD (const SOCKET fd, const fdRegType type);
2069+ LIBCOM_API class fdReg *lookUpFD (const SOCKET fd, const fdRegType type);
2070
2071 epicsTimer & createTimer ();
2072
2073@@ -113,14 +113,14 @@ private:
2074 //
2075 // default file descriptor manager
2076 //
2077-epicsShareExtern fdManager fileDescriptorManager;
2078+LIBCOM_API extern fdManager fileDescriptorManager;
2079
2080 //
2081 // fdReg
2082 //
2083 // file descriptor registration
2084 //
2085-class epicsShareClass fdReg :
2086+class LIBCOM_API fdReg :
2087 public fdRegId, public tsDLNode<fdReg>, public tsSLNode<fdReg> {
2088 friend class fdManager;
2089
2090diff --git a/modules/libcom/src/fdmgr/fdmgr.cpp b/modules/libcom/src/fdmgr/fdmgr.cpp
2091index 342bae8..86d21bd 100644
2092--- a/modules/libcom/src/fdmgr/fdmgr.cpp
2093+++ b/modules/libcom/src/fdmgr/fdmgr.cpp
2094@@ -22,7 +22,6 @@
2095 //
2096
2097 #include <stddef.h>
2098-#define epicsExportSharedSymbols
2099 #include "locationException.h"
2100 #include "epicsAssert.h"
2101 #include "fdManager.h"
2102@@ -41,14 +40,14 @@ public:
2103 class noFunctionSpecified {};
2104 class doubleDelete {};
2105
2106- epicsShareFunc fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType type,
2107+ LIBCOM_API fdRegForOldFdmgr (const SOCKET fdIn, const fdRegType type,
2108 const bool onceOnly, fdManager &manager, pCallBackFDMgr pFunc, void *pParam);
2109- epicsShareFunc ~fdRegForOldFdmgr ();
2110+ LIBCOM_API ~fdRegForOldFdmgr ();
2111
2112 private:
2113 pCallBackFDMgr pFunc;
2114 void *pParam;
2115- epicsShareFunc virtual void callBack ();
2116+ LIBCOM_API virtual void callBack ();
2117 fdRegForOldFdmgr ( const fdRegForOldFdmgr & );
2118 fdRegForOldFdmgr & operator = ( const fdRegForOldFdmgr & );
2119 };
2120@@ -60,8 +59,8 @@ class oldFdmgr;
2121 //
2122 class timerForOldFdmgr : public epicsTimerNotify, public chronIntIdRes<timerForOldFdmgr> {
2123 public:
2124- epicsShareFunc timerForOldFdmgr (oldFdmgr &fdmgr, double delay, pCallBackFDMgr pFunc, void *pParam);
2125- epicsShareFunc virtual ~timerForOldFdmgr ();
2126+ LIBCOM_API timerForOldFdmgr (oldFdmgr &fdmgr, double delay, pCallBackFDMgr pFunc, void *pParam);
2127+ LIBCOM_API virtual ~timerForOldFdmgr ();
2128
2129 //
2130 // exceptions
2131@@ -74,14 +73,14 @@ private:
2132 pCallBackFDMgr pFunc;
2133 void *pParam;
2134 unsigned id;
2135- epicsShareFunc expireStatus expire ( const epicsTime & currentTime );
2136+ LIBCOM_API expireStatus expire ( const epicsTime & currentTime );
2137 timerForOldFdmgr ( const timerForOldFdmgr & );
2138 timerForOldFdmgr & operator = ( const timerForOldFdmgr & );
2139 };
2140
2141 class oldFdmgr : public fdManager {
2142 friend class timerForOldFdmgr;
2143- friend epicsShareFunc int epicsShareAPI fdmgr_clear_timeout (fdctx *pfdctx, fdmgrAlarmId id);
2144+ friend LIBCOM_API int LIBCOMSTD_API fdmgr_clear_timeout (fdctx *pfdctx, fdmgrAlarmId id);
2145
2146 public:
2147 oldFdmgr ();
2148@@ -104,7 +103,7 @@ template class resTable<timerForOldFdmgr, chronIntId>;
2149 # pragma warning ( pop )
2150 #endif
2151
2152-epicsShareFunc fdRegForOldFdmgr::fdRegForOldFdmgr
2153+LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
2154 (const SOCKET fdIn, const fdRegType typeIn,
2155 const bool onceOnlyIn, fdManager &managerIn,
2156 pCallBackFDMgr pFuncIn, void *pParamIn) :
2157@@ -116,14 +115,14 @@ epicsShareFunc fdRegForOldFdmgr::fdRegForOldFdmgr
2158 }
2159 }
2160
2161-epicsShareFunc fdRegForOldFdmgr::~fdRegForOldFdmgr ()
2162+LIBCOM_API fdRegForOldFdmgr::~fdRegForOldFdmgr ()
2163 {
2164 if (this->pFunc==NULL) {
2165 throwWithLocation ( doubleDelete () );
2166 }
2167 }
2168
2169-epicsShareFunc void fdRegForOldFdmgr::callBack ()
2170+LIBCOM_API void fdRegForOldFdmgr::callBack ()
2171 {
2172 (*this->pFunc) (this->pParam);
2173 }
2174@@ -154,7 +153,7 @@ epicsTimerNotify::expireStatus timerForOldFdmgr::expire ( const epicsTime & )
2175
2176 oldFdmgr::oldFdmgr () {}
2177
2178-extern "C" epicsShareFunc fdctx * epicsShareAPI fdmgr_init (void)
2179+extern "C" LIBCOM_API fdctx * LIBCOMSTD_API fdmgr_init (void)
2180 {
2181 oldFdmgr *pfdm;
2182
2183@@ -169,7 +168,7 @@ extern "C" epicsShareFunc fdctx * epicsShareAPI fdmgr_init (void)
2184 return (fdctx *) pfdm;
2185 }
2186
2187-extern "C" epicsShareFunc fdmgrAlarmId epicsShareAPI fdmgr_add_timeout (
2188+extern "C" LIBCOM_API fdmgrAlarmId LIBCOMSTD_API fdmgr_add_timeout (
2189 fdctx *pfdctx, struct timeval *ptimeout, pCallBackFDMgr pFunc, void *pParam)
2190 {
2191 double delay = ptimeout->tv_sec + ptimeout->tv_usec / static_cast <const double> (uSecPerSec);
2192@@ -207,7 +206,7 @@ extern "C" epicsShareFunc fdmgrAlarmId epicsShareAPI fdmgr_add_timeout (
2193 return id;
2194 }
2195
2196-extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_timeout (fdctx *pfdctx, fdmgrAlarmId id)
2197+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_clear_timeout (fdctx *pfdctx, fdmgrAlarmId id)
2198 {
2199 oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
2200 timerForOldFdmgr *pTimer;
2201@@ -227,7 +226,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_timeout (fdctx *pfdctx,
2202 return 0;
2203 }
2204
2205-extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback (
2206+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_add_callback (
2207 fdctx *pfdctx, SOCKET fd, enum fdi_type fdi, pCallBackFDMgr pFunc, void *pParam)
2208 {
2209 oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
2210@@ -269,7 +268,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_callback (
2211 }
2212 }
2213
2214-extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_callback (
2215+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_clear_callback (
2216 fdctx *pfdctx, SOCKET fd, enum fdi_type fdi)
2217 {
2218 oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
2219@@ -296,7 +295,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_callback (
2220 }
2221 }
2222
2223-extern "C" epicsShareFunc int epicsShareAPI fdmgr_pend_event (fdctx *pfdctx, struct timeval *ptimeout)
2224+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_pend_event (fdctx *pfdctx, struct timeval *ptimeout)
2225 {
2226 oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
2227 double delay = ptimeout->tv_sec + ptimeout->tv_usec / static_cast <const double> (uSecPerSec);
2228@@ -311,7 +310,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_pend_event (fdctx *pfdctx, str
2229 return 0;
2230 }
2231
2232-extern "C" epicsShareFunc int epicsShareAPI fdmgr_delete (fdctx *pfdctx)
2233+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_delete (fdctx *pfdctx)
2234 {
2235 oldFdmgr *pfdm = static_cast <oldFdmgr *> (pfdctx);
2236 delete pfdm;
2237@@ -321,7 +320,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_delete (fdctx *pfdctx)
2238 /*
2239 * depricated interface
2240 */
2241-extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_fd (fdctx *pfdctx, SOCKET fd)
2242+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_clear_fd (fdctx *pfdctx, SOCKET fd)
2243 {
2244 return fdmgr_clear_callback(pfdctx, fd, fdi_read);
2245 }
2246@@ -329,7 +328,7 @@ extern "C" epicsShareFunc int epicsShareAPI fdmgr_clear_fd (fdctx *pfdctx, SOCKE
2247 /*
2248 * depricated interface
2249 */
2250-extern "C" epicsShareFunc int epicsShareAPI fdmgr_add_fd (
2251+extern "C" LIBCOM_API int LIBCOMSTD_API fdmgr_add_fd (
2252 fdctx *pfdctx, SOCKET fd, void (*pfunc)(void *pParam), void *param)
2253 {
2254 return fdmgr_add_callback (pfdctx, fd, fdi_read, pfunc, param);
2255diff --git a/modules/libcom/src/fdmgr/fdmgr.h b/modules/libcom/src/fdmgr/fdmgr.h
2256index a227335..318120e 100644
2257--- a/modules/libcom/src/fdmgr/fdmgr.h
2258+++ b/modules/libcom/src/fdmgr/fdmgr.h
2259@@ -24,7 +24,7 @@
2260 #include "bucketLib.h"
2261 #include "osiSock.h"
2262 #include "epicsThread.h"
2263-#include "shareLib.h"
2264+#include "libComAPI.h"
2265
2266 #ifdef __cplusplus
2267 extern "C" {
2268@@ -65,7 +65,7 @@ typedef unsigned fdmgrAlarmId;
2269 * Initialize a file descriptor manager session
2270 *
2271 */
2272-epicsShareFunc fdctx * epicsShareAPI fdmgr_init(void);
2273+LIBCOM_API fdctx * LIBCOMSTD_API fdmgr_init(void);
2274
2275 /*
2276 * Specify a function to be called with a specified parameter
2277@@ -74,7 +74,7 @@ epicsShareFunc fdctx * epicsShareAPI fdmgr_init(void);
2278 * Returns fdmgrNoAlarm (zero) if alarm cant be created
2279 */
2280 #define fdmgrNoAlarm 0
2281-epicsShareFunc fdmgrAlarmId epicsShareAPI fdmgr_add_timeout(
2282+LIBCOM_API fdmgrAlarmId LIBCOMSTD_API fdmgr_add_timeout(
2283 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2284 struct timeval *ptimeout, /* relative delay from current time */
2285 pCallBackFDMgr pfunc, /* function (handler) to call */
2286@@ -85,7 +85,7 @@ void *param /* first parameter passed to the func */
2287 * Clear a timeout which has not executed its function (handler)
2288 * yet.
2289 */
2290-epicsShareFunc int epicsShareAPI fdmgr_clear_timeout(
2291+LIBCOM_API int LIBCOMSTD_API fdmgr_clear_timeout(
2292 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2293 fdmgrAlarmId id /* alarm to delete */
2294 );
2295@@ -107,7 +107,7 @@ fdmgrAlarmId id /* alarm to delete */
2296 * fdmgr_add_callback()
2297 *
2298 */
2299-epicsShareFunc int epicsShareAPI fdmgr_add_callback(
2300+LIBCOM_API int LIBCOMSTD_API fdmgr_add_callback(
2301 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2302 SOCKET fd, /* file descriptor */
2303 enum fdi_type fdi, /* file descriptor interest type */
2304@@ -120,7 +120,7 @@ void *param /* first parameter passed to the func */
2305 * Clear nterest in a type of file descriptor activity (IO).
2306 *
2307 */
2308-epicsShareFunc int epicsShareAPI fdmgr_clear_callback(
2309+LIBCOM_API int LIBCOMSTD_API fdmgr_clear_callback(
2310 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2311 SOCKET fd, /* file descriptor */
2312 enum fdi_type fdi /* file descriptor interest type */
2313@@ -135,7 +135,7 @@ enum fdi_type fdi /* file descriptor interest type */
2314 * enough.
2315 *
2316 */
2317-epicsShareFunc int epicsShareAPI fdmgr_pend_event(
2318+LIBCOM_API int LIBCOMSTD_API fdmgr_pend_event(
2319 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2320 struct timeval *ptimeout
2321 );
2322@@ -144,7 +144,7 @@ struct timeval *ptimeout
2323 /*
2324 * obsolete interface
2325 */
2326-epicsShareFunc int epicsShareAPI fdmgr_clear_fd(
2327+LIBCOM_API int LIBCOMSTD_API fdmgr_clear_fd(
2328 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2329 SOCKET fd
2330 );
2331@@ -152,14 +152,14 @@ SOCKET fd
2332 /*
2333 * obsolete interface
2334 */
2335-epicsShareFunc int epicsShareAPI fdmgr_add_fd(
2336+LIBCOM_API int LIBCOMSTD_API fdmgr_add_fd(
2337 fdctx *pfdctx, /* fd mgr ctx from fdmgr_init() */
2338 SOCKET fd,
2339 pCallBackFDMgr pfunc, /* function (handler) to call */
2340 void *param
2341 );
2342
2343-epicsShareFunc int epicsShareAPI fdmgr_delete(fdctx *pfdctx);
2344+LIBCOM_API int LIBCOMSTD_API fdmgr_delete(fdctx *pfdctx);
2345
2346 #ifdef __cplusplus
2347 }
2348diff --git a/modules/libcom/src/flex/Makefile b/modules/libcom/src/flex/Makefile
2349index 20cce5d..617c1c9 100644
2350--- a/modules/libcom/src/flex/Makefile
2351+++ b/modules/libcom/src/flex/Makefile
2352@@ -29,7 +29,7 @@ e_flex_SRCS += nfa.c
2353 e_flex_SRCS += sym.c
2354 e_flex_SRCS += tblcmp.c
2355 e_flex_SRCS += parse.c
2356-e_flex_OBJS += epicsTempFile$(OBJ)
2357+e_flex_OBJS += epicsTempFilex$(OBJ)
2358
2359 PROD_HOST += e_flex
2360
2361diff --git a/modules/libcom/src/flex/flex.c b/modules/libcom/src/flex/flex.c
2362index 008e5e6..faf61ed 100644
2363--- a/modules/libcom/src/flex/flex.c
2364+++ b/modules/libcom/src/flex/flex.c
2365@@ -43,7 +43,6 @@ char copyright[] =
2366 #endif /* not lint */
2367
2368
2369-#define epicsExportSharedSymbols
2370 #include "epicsTempFile.h"
2371 #undef epicsExportSharedSymbols
2372
2373diff --git a/modules/libcom/src/freeList/freeList.h b/modules/libcom/src/freeList/freeList.h
2374index 77ebfb8..7fced89 100644
2375--- a/modules/libcom/src/freeList/freeList.h
2376+++ b/modules/libcom/src/freeList/freeList.h
2377@@ -13,18 +13,18 @@
2378 #define INCfreeListh
2379
2380 #include <stddef.h>
2381-#include "shareLib.h"
2382+#include "libComAPI.h"
2383
2384 #ifdef __cplusplus
2385 extern "C" {
2386 #endif
2387
2388-epicsShareFunc void epicsShareAPI freeListInitPvt(void **ppvt,int size,int nmalloc);
2389-epicsShareFunc void * epicsShareAPI freeListCalloc(void *pvt);
2390-epicsShareFunc void * epicsShareAPI freeListMalloc(void *pvt);
2391-epicsShareFunc void epicsShareAPI freeListFree(void *pvt,void*pmem);
2392-epicsShareFunc void epicsShareAPI freeListCleanup(void *pvt);
2393-epicsShareFunc size_t epicsShareAPI freeListItemsAvail(void *pvt);
2394+LIBCOM_API void LIBCOMSTD_API freeListInitPvt(void **ppvt,int size,int nmalloc);
2395+LIBCOM_API void * LIBCOMSTD_API freeListCalloc(void *pvt);
2396+LIBCOM_API void * LIBCOMSTD_API freeListMalloc(void *pvt);
2397+LIBCOM_API void LIBCOMSTD_API freeListFree(void *pvt,void*pmem);
2398+LIBCOM_API void LIBCOMSTD_API freeListCleanup(void *pvt);
2399+LIBCOM_API size_t LIBCOMSTD_API freeListItemsAvail(void *pvt);
2400
2401 #ifdef __cplusplus
2402 }
2403diff --git a/modules/libcom/src/freeList/freeListLib.c b/modules/libcom/src/freeList/freeListLib.c
2404index b489a47..9038947 100755
2405--- a/modules/libcom/src/freeList/freeListLib.c
2406+++ b/modules/libcom/src/freeList/freeListLib.c
2407@@ -22,7 +22,6 @@
2408 #define REDZONE 0
2409 #endif
2410
2411-#define epicsExportSharedSymbols
2412 #include "cantProceed.h"
2413 #include "epicsMutex.h"
2414 #include "freeList.h"
2415@@ -41,7 +40,7 @@ typedef struct {
2416 epicsMutexId lock;
2417 }FREELISTPVT;
2418
2419-epicsShareFunc void epicsShareAPI
2420+LIBCOM_API void LIBCOMSTD_API
2421 freeListInitPvt(void **ppvt,int size,int nmalloc)
2422 {
2423 FREELISTPVT *pfl;
2424@@ -58,7 +57,7 @@ epicsShareFunc void epicsShareAPI
2425 return;
2426 }
2427
2428-epicsShareFunc void * epicsShareAPI freeListCalloc(void *pvt)
2429+LIBCOM_API void * LIBCOMSTD_API freeListCalloc(void *pvt)
2430 {
2431 FREELISTPVT *pfl = pvt;
2432 # ifdef EPICS_FREELIST_DEBUG
2433@@ -72,7 +71,7 @@ epicsShareFunc void * epicsShareAPI freeListCalloc(void *pvt)
2434 # endif
2435 }
2436
2437
2438-epicsShareFunc void * epicsShareAPI freeListMalloc(void *pvt)
2439+LIBCOM_API void * LIBCOMSTD_API freeListMalloc(void *pvt)
2440 {
2441 FREELISTPVT *pfl = pvt;
2442 # ifdef EPICS_FREELIST_DEBUG
2443@@ -129,7 +128,7 @@ epicsShareFunc void * epicsShareAPI freeListMalloc(void *pvt)
2444 # endif
2445 }
2446
2447-epicsShareFunc void epicsShareAPI freeListFree(void *pvt,void*pmem)
2448+LIBCOM_API void LIBCOMSTD_API freeListFree(void *pvt,void*pmem)
2449 {
2450 FREELISTPVT *pfl = pvt;
2451 # ifdef EPICS_FREELIST_DEBUG
2452@@ -150,7 +149,7 @@ epicsShareFunc void epicsShareAPI freeListFree(void *pvt,void*pmem)
2453 # endif
2454 }
2455
2456-epicsShareFunc void epicsShareAPI freeListCleanup(void *pvt)
2457+LIBCOM_API void LIBCOMSTD_API freeListCleanup(void *pvt)
2458 {
2459 FREELISTPVT *pfl = pvt;
2460 allocMem *phead;
2461@@ -169,7 +168,7 @@ epicsShareFunc void epicsShareAPI freeListCleanup(void *pvt)
2462 free(pvt);
2463 }
2464
2465-epicsShareFunc size_t epicsShareAPI freeListItemsAvail(void *pvt)
2466+LIBCOM_API size_t LIBCOMSTD_API freeListItemsAvail(void *pvt)
2467 {
2468 FREELISTPVT *pfl = pvt;
2469 size_t nBlocksAvailable;
2470diff --git a/modules/libcom/src/gpHash/gpHash.h b/modules/libcom/src/gpHash/gpHash.h
2471index d9c0dd2..43c57f1 100644
2472--- a/modules/libcom/src/gpHash/gpHash.h
2473+++ b/modules/libcom/src/gpHash/gpHash.h
2474@@ -14,7 +14,7 @@
2475 #ifndef INC_gpHash_H
2476 #define INC_gpHash_H
2477
2478-#include "shareLib.h"
2479+#include "libComAPI.h"
2480
2481 #include "ellLib.h"
2482
2483@@ -32,19 +32,19 @@ extern "C" {
2484 #endif
2485
2486 /*tableSize must be power of 2 in range 256 to 65536*/
2487-epicsShareFunc void epicsShareAPI
2488+LIBCOM_API void LIBCOMSTD_API
2489 gphInitPvt(struct gphPvt **ppvt, int tableSize);
2490-epicsShareFunc GPHENTRY * epicsShareAPI
2491+LIBCOM_API GPHENTRY * LIBCOMSTD_API
2492 gphFind(struct gphPvt *pvt, const char *name, void *pvtid);
2493-epicsShareFunc GPHENTRY * epicsShareAPI
2494+LIBCOM_API GPHENTRY * LIBCOMSTD_API
2495 gphFindParse(struct gphPvt *pvt, const char *name, size_t len, void *pvtid);
2496-epicsShareFunc GPHENTRY * epicsShareAPI
2497+LIBCOM_API GPHENTRY * LIBCOMSTD_API
2498 gphAdd(struct gphPvt *pvt, const char *name, void *pvtid);
2499-epicsShareFunc void epicsShareAPI
2500+LIBCOM_API void LIBCOMSTD_API
2501 gphDelete(struct gphPvt *pvt, const char *name, void *pvtid);
2502-epicsShareFunc void epicsShareAPI gphFreeMem(struct gphPvt *pvt);
2503-epicsShareFunc void epicsShareAPI gphDump(struct gphPvt *pvt);
2504-epicsShareFunc void epicsShareAPI gphDumpFP(FILE *fp, struct gphPvt *pvt);
2505+LIBCOM_API void LIBCOMSTD_API gphFreeMem(struct gphPvt *pvt);
2506+LIBCOM_API void LIBCOMSTD_API gphDump(struct gphPvt *pvt);
2507+LIBCOM_API void LIBCOMSTD_API gphDumpFP(FILE *fp, struct gphPvt *pvt);
2508
2509 #ifdef __cplusplus
2510 }
2511diff --git a/modules/libcom/src/gpHash/gpHashLib.c b/modules/libcom/src/gpHash/gpHashLib.c
2512index a56f00a..d111e9e 100644
2513--- a/modules/libcom/src/gpHash/gpHashLib.c
2514+++ b/modules/libcom/src/gpHash/gpHashLib.c
2515@@ -13,7 +13,6 @@
2516 #include <stdlib.h>
2517 #include <stddef.h>
2518
2519-#define epicsExportSharedSymbols
2520 #include "cantProceed.h"
2521 #include "epicsMutex.h"
2522 #include "epicsStdioRedirect.h"
2523@@ -35,7 +34,7 @@ typedef struct gphPvt {
2524 #define MAX_SIZE 65536
2525
2526
2527-void epicsShareAPI gphInitPvt(gphPvt **ppvt, int size)
2528+void LIBCOMSTD_API gphInitPvt(gphPvt **ppvt, int size)
2529 {
2530 gphPvt *pgphPvt;
2531
2532@@ -59,7 +58,7 @@ void epicsShareAPI gphInitPvt(gphPvt **ppvt, int size)
2533 return;
2534 }
2535
2536-GPHENTRY * epicsShareAPI gphFindParse(gphPvt *pgphPvt, const char *name, size_t len, void *pvtid)
2537+GPHENTRY * LIBCOMSTD_API gphFindParse(gphPvt *pgphPvt, const char *name, size_t len, void *pvtid)
2538 {
2539 ELLLIST **paplist;
2540 ELLLIST *gphlist;
2541@@ -90,12 +89,12 @@ GPHENTRY * epicsShareAPI gphFindParse(gphPvt *pgphPvt, const char *name, size_t
2542 return pgphNode;
2543 }
2544
2545-GPHENTRY * epicsShareAPI gphFind(gphPvt *pgphPvt, const char *name, void *pvtid)
2546+GPHENTRY * LIBCOMSTD_API gphFind(gphPvt *pgphPvt, const char *name, void *pvtid)
2547 {
2548 return gphFindParse(pgphPvt, name, strlen(name), pvtid);
2549 }
2550
2551-GPHENTRY * epicsShareAPI gphAdd(gphPvt *pgphPvt, const char *name, void *pvtid)
2552+GPHENTRY * LIBCOMSTD_API gphAdd(gphPvt *pgphPvt, const char *name, void *pvtid)
2553 {
2554 ELLLIST **paplist;
2555 ELLLIST *plist;
2556@@ -140,7 +139,7 @@ GPHENTRY * epicsShareAPI gphAdd(gphPvt *pgphPvt, const char *name, void *pvtid)
2557 return (pgphNode);
2558 }
2559
2560-void epicsShareAPI gphDelete(gphPvt *pgphPvt, const char *name, void *pvtid)
2561+void LIBCOMSTD_API gphDelete(gphPvt *pgphPvt, const char *name, void *pvtid)
2562 {
2563 ELLLIST **paplist;
2564 ELLLIST *plist = NULL;
2565@@ -174,7 +173,7 @@ void epicsShareAPI gphDelete(gphPvt *pgphPvt, const char *name, void *pvtid)
2566 return;
2567 }
2568
2569-void epicsShareAPI gphFreeMem(gphPvt *pgphPvt)
2570+void LIBCOMSTD_API gphFreeMem(gphPvt *pgphPvt)
2571 {
2572 ELLLIST **paplist;
2573 int h;
2574@@ -204,12 +203,12 @@ void epicsShareAPI gphFreeMem(gphPvt *pgphPvt)
2575 free(pgphPvt);
2576 }
2577
2578-void epicsShareAPI gphDump(gphPvt *pgphPvt)
2579+void LIBCOMSTD_API gphDump(gphPvt *pgphPvt)
2580 {
2581 gphDumpFP(stdout, pgphPvt);
2582 }
2583
2584-void epicsShareAPI gphDumpFP(FILE *fp, gphPvt *pgphPvt)
2585+void LIBCOMSTD_API gphDumpFP(FILE *fp, gphPvt *pgphPvt)
2586 {
2587 unsigned int empty = 0;
2588 ELLLIST **paplist;
2589diff --git a/modules/libcom/src/iocsh/initHooks.c b/modules/libcom/src/iocsh/initHooks.c
2590index 0884bdd..4c955af 100644
2591--- a/modules/libcom/src/iocsh/initHooks.c
2592+++ b/modules/libcom/src/iocsh/initHooks.c
2593@@ -16,7 +16,6 @@
2594 #include <stddef.h>
2595 #include <stdio.h>
2596
2597-#define epicsExportSharedSymbols
2598 #include "dbDefs.h"
2599 #include "ellLib.h"
2600 #include "epicsMutex.h"
2601diff --git a/modules/libcom/src/iocsh/initHooks.h b/modules/libcom/src/iocsh/initHooks.h
2602index 429a768..cedfafb 100644
2603--- a/modules/libcom/src/iocsh/initHooks.h
2604+++ b/modules/libcom/src/iocsh/initHooks.h
2605@@ -15,7 +15,7 @@
2606 #ifndef INC_initHooks_H
2607 #define INC_initHooks_H
2608
2609-#include "shareLib.h"
2610+#include "libComAPI.h"
2611
2612 #ifdef __cplusplus
2613 extern "C" {
2614@@ -56,10 +56,10 @@ typedef enum {
2615 } initHookState;
2616
2617 typedef void (*initHookFunction)(initHookState state);
2618-epicsShareFunc int initHookRegister(initHookFunction func);
2619-epicsShareFunc void initHookAnnounce(initHookState state);
2620-epicsShareFunc const char *initHookName(int state);
2621-epicsShareFunc void initHookFree(void);
2622+LIBCOM_API int initHookRegister(initHookFunction func);
2623+LIBCOM_API void initHookAnnounce(initHookState state);
2624+LIBCOM_API const char *initHookName(int state);
2625+LIBCOM_API void initHookFree(void);
2626
2627 #ifdef __cplusplus
2628 }
2629diff --git a/modules/libcom/src/iocsh/iocsh.cpp b/modules/libcom/src/iocsh/iocsh.cpp
2630index 8e4d365..2d2f053 100644
2631--- a/modules/libcom/src/iocsh/iocsh.cpp
2632+++ b/modules/libcom/src/iocsh/iocsh.cpp
2633@@ -19,7 +19,6 @@
2634 #include <ctype.h>
2635 #include <errno.h>
2636
2637-#define epicsExportSharedSymbols
2638 #include "epicsMath.h"
2639 #include "errlog.h"
2640 #include "macLib.h"
2641@@ -39,7 +38,7 @@ extern "C" {
2642 /*
2643 * Global link to pdbbase
2644 */
2645-epicsShareDef struct dbBase **iocshPpdbbase;
2646+struct dbBase **iocshPpdbbase;
2647
2648 /*
2649 * File-local information
2650@@ -109,7 +108,7 @@ iocshTableUnlock (void)
2651 /*
2652 * Register a command
2653 */
2654-void epicsShareAPI iocshRegister (const iocshFuncDef *piocshFuncDef,
2655+void LIBCOMSTD_API iocshRegister (const iocshFuncDef *piocshFuncDef,
2656 iocshCallFunc func)
2657 {
2658 struct iocshCommand *l, *p, *n;
2659@@ -152,7 +151,7 @@ void epicsShareAPI iocshRegister (const iocshFuncDef *piocshFuncDef,
2660 /*
2661 * Retrieves a previously registered function with the given name.
2662 */
2663-const iocshCmdDef * epicsShareAPI iocshFindCommand(const char *name)
2664+const iocshCmdDef * LIBCOMSTD_API iocshFindCommand(const char *name)
2665 {
2666 return (iocshCmdDef *) registryFind(iocshCmdID, name);
2667 }
2668@@ -165,7 +164,7 @@ static const iocshArg varCmdArg1 = { "[value]]", iocshArgString};
2669 static const iocshArg *varCmdArgs[2] = {&varCmdArg0, &varCmdArg1};
2670 static const iocshFuncDef varFuncDef = {"var", 2, varCmdArgs};
2671
2672-void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
2673+void LIBCOMSTD_API iocshRegisterVariable (const iocshVarDef *piocshVarDef)
2674 {
2675 struct iocshVariable *l, *p, *n;
2676 int i;
2677@@ -220,7 +219,7 @@ void epicsShareAPI iocshRegisterVariable (const iocshVarDef *piocshVarDef)
2678 /*
2679 * Retrieves a previously registered variable with the given name.
2680 */
2681-const iocshVarDef * epicsShareAPI iocshFindVariable(const char *name)
2682+const iocshVarDef * LIBCOMSTD_API iocshFindVariable(const char *name)
2683 {
2684 struct iocshVariable *temp = (iocshVariable *) registryFind(iocshVarID, name);
2685 return temp ? temp->pVarDef : 0;
2686@@ -229,7 +228,7 @@ const iocshVarDef * epicsShareAPI iocshFindVariable(const char *name)
2687 /*
2688 * Free storage created by iocshRegister/iocshRegisterVariable
2689 */
2690-void epicsShareAPI iocshFree(void)
2691+void LIBCOMSTD_API iocshFree(void)
2692 {
2693 struct iocshCommand *pc;
2694 struct iocshVariable *pv;
2695@@ -995,19 +994,19 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros)
2696 /*
2697 * External access to the command interpreter
2698 */
2699-int epicsShareAPI
2700+int LIBCOMSTD_API
2701 iocsh (const char *pathname)
2702 {
2703 return iocshLoad(pathname, NULL);
2704 }
2705
2706-int epicsShareAPI
2707+int LIBCOMSTD_API
2708 iocshCmd (const char *cmd)
2709 {
2710 return iocshRun(cmd, NULL);
2711 }
2712
2713-int epicsShareAPI
2714+int LIBCOMSTD_API
2715 iocshLoad(const char *pathname, const char *macros)
2716 {
2717 if (pathname)
2718@@ -1015,7 +1014,7 @@ iocshLoad(const char *pathname, const char *macros)
2719 return iocshBody(pathname, NULL, macros);
2720 }
2721
2722-int epicsShareAPI
2723+int LIBCOMSTD_API
2724 iocshRun(const char *cmd, const char *macros)
2725 {
2726 if (cmd == NULL)
2727@@ -1038,7 +1037,7 @@ iocshRun(const char *cmd, const char *macros)
2728 * and update the shared MAC_HANDLE that the iocsh uses. Which is
2729 * what this function is provided for.
2730 */
2731-void epicsShareAPI
2732+void LIBCOMSTD_API
2733 iocshEnvClear(const char *name)
2734 {
2735 iocshContext *context;
2736diff --git a/modules/libcom/src/iocsh/iocsh.h b/modules/libcom/src/iocsh/iocsh.h
2737index a63af64..fdb7f7c 100644
2738--- a/modules/libcom/src/iocsh/iocsh.h
2739+++ b/modules/libcom/src/iocsh/iocsh.h
2740@@ -15,7 +15,7 @@
2741
2742 #include <stdio.h>
2743 #include "compilerDependencies.h"
2744-#include "shareLib.h"
2745+#include "libComAPI.h"
2746
2747 #if defined(vxWorks) || defined(__rtems__)
2748 #define IOCSH_STATIC_FUNC
2749@@ -71,48 +71,48 @@ typedef struct iocshCmdDef {
2750 iocshCallFunc func;
2751 }iocshCmdDef;
2752
2753-epicsShareFunc void epicsShareAPI iocshRegister(
2754+LIBCOM_API void LIBCOMSTD_API iocshRegister(
2755 const iocshFuncDef *piocshFuncDef, iocshCallFunc func);
2756-epicsShareFunc void epicsShareAPI iocshRegisterVariable (
2757+LIBCOM_API void LIBCOMSTD_API iocshRegisterVariable (
2758 const iocshVarDef *piocshVarDef);
2759-epicsShareFunc const iocshCmdDef * epicsShareAPI iocshFindCommand(
2760+LIBCOM_API const iocshCmdDef * LIBCOMSTD_API iocshFindCommand(
2761 const char* name) EPICS_DEPRECATED;
2762-epicsShareFunc const iocshVarDef * epicsShareAPI iocshFindVariable(
2763+LIBCOM_API const iocshVarDef * LIBCOMSTD_API iocshFindVariable(
2764 const char* name);
2765
2766 /* iocshFree frees storage used by iocshRegister*/
2767 /* This should only be called when iocsh is no longer needed*/
2768-epicsShareFunc void epicsShareAPI iocshFree(void);
2769+LIBCOM_API void LIBCOMSTD_API iocshFree(void);
2770
2771 /** shorthand for @code iocshLoad(pathname, NULL) @endcode */
2772-epicsShareFunc int epicsShareAPI iocsh(const char *pathname);
2773+LIBCOM_API int LIBCOMSTD_API iocsh(const char *pathname);
2774 /** shorthand for @code iocshRun(cmd, NULL) @endcode */
2775-epicsShareFunc int epicsShareAPI iocshCmd(const char *cmd);
2776+LIBCOM_API int LIBCOMSTD_API iocshCmd(const char *cmd);
2777 /** Read and evaluate IOC shell commands from the given file.
2778 * @param pathname Path to script file
2779 * @param macros NULL or a comma seperated list of macro definitions. eg. "VAR1=x,VAR2=y"
2780 * @return 0 on success, non-zero on error
2781 */
2782-epicsShareFunc int epicsShareAPI iocshLoad(const char *pathname, const char* macros);
2783+LIBCOM_API int LIBCOMSTD_API iocshLoad(const char *pathname, const char* macros);
2784 /** Evaluate a single IOC shell command
2785 * @param cmd Command string. eg. "echo \"something or other\""
2786 * @param macros NULL or a comma seperated list of macro definitions. eg. "VAR1=x,VAR2=y"
2787 * @return 0 on success, non-zero on error
2788 */
2789-epicsShareFunc int epicsShareAPI iocshRun(const char *cmd, const char* macros);
2790+LIBCOM_API int LIBCOMSTD_API iocshRun(const char *cmd, const char* macros);
2791
2792 /** @brief Signal error from an IOC shell function.
2793 *
2794 * @param err 0 - success (no op), !=0 - error
2795 * @return The err argument value.
2796 */
2797-epicsShareFunc int iocshSetError(int err);
2798+LIBCOM_API int iocshSetError(int err);
2799
2800 /* Makes macros that shadow environment variables work correctly with epicsEnvSet */
2801-epicsShareFunc void epicsShareAPI iocshEnvClear(const char *name);
2802+LIBCOM_API void LIBCOMSTD_API iocshEnvClear(const char *name);
2803
2804 /* 'weak' link to pdbbase */
2805-epicsShareExtern struct dbBase **iocshPpdbbase;
2806+LIBCOM_API extern struct dbBase **iocshPpdbbase;
2807
2808 #ifdef __cplusplus
2809 }
2810diff --git a/modules/libcom/src/iocsh/libComRegister.c b/modules/libcom/src/iocsh/libComRegister.c
2811index c67804a..e58feb4 100644
2812--- a/modules/libcom/src/iocsh/libComRegister.c
2813+++ b/modules/libcom/src/iocsh/libComRegister.c
2814@@ -10,7 +10,6 @@
2815
2816 #include <stdlib.h>
2817
2818-#define epicsExportSharedSymbols
2819 #include "iocsh.h"
2820 #include "asLib.h"
2821 #include "epicsStdioRedirect.h"
2822@@ -396,7 +395,7 @@ static void installLastResortEventProviderCallFunc(const iocshArgBuf *args)
2823
2824 static iocshVarDef asCheckClientIPDef[] = { { "asCheckClientIP", iocshArgInt, 0 }, { NULL, iocshArgInt, NULL } };
2825
2826-void epicsShareAPI libComRegister(void)
2827+void LIBCOMSTD_API libComRegister(void)
2828 {
2829 iocshRegister(&dateFuncDef, dateCallFunc);
2830 iocshRegister(&echoFuncDef, echoCallFunc);
2831diff --git a/modules/libcom/src/iocsh/libComRegister.h b/modules/libcom/src/iocsh/libComRegister.h
2832index ef93f4a..faf2801 100644
2833--- a/modules/libcom/src/iocsh/libComRegister.h
2834+++ b/modules/libcom/src/iocsh/libComRegister.h
2835@@ -8,13 +8,13 @@
2836 #ifndef INC_libComRegister_H
2837 #define INC_libComRegister_H
2838
2839-#include "shareLib.h"
2840+#include "libComAPI.h"
2841
2842 #ifdef __cplusplus
2843 extern "C" {
2844 #endif
2845
2846-epicsShareFunc void epicsShareAPI libComRegister(void);
2847+LIBCOM_API void LIBCOMSTD_API libComRegister(void);
2848
2849 #ifdef __cplusplus
2850 }
2851diff --git a/modules/libcom/src/iocsh/registry.c b/modules/libcom/src/iocsh/registry.c
2852index 0b2e312..dfc8c2c 100644
2853--- a/modules/libcom/src/iocsh/registry.c
2854+++ b/modules/libcom/src/iocsh/registry.c
2855@@ -16,7 +16,6 @@
2856 #include <string.h>
2857 #include <stdio.h>
2858
2859-#define epicsExportSharedSymbols
2860 #include "dbDefs.h"
2861 #include "cantProceed.h"
2862 #include "epicsFindSymbol.h"
2863@@ -32,7 +31,7 @@ static void registryInit(int tableSize)
2864 if(!gphPvt) cantProceed("registry why did gphInitPvt fail\n");
2865 }
2866
2867-epicsShareFunc int epicsShareAPI registrySetTableSize(int size)
2868+LIBCOM_API int LIBCOMSTD_API registrySetTableSize(int size)
2869 {
2870 if(gphPvt) {
2871 printf("registryInit already called\n");
2872@@ -43,7 +42,7 @@ epicsShareFunc int epicsShareAPI registrySetTableSize(int size)
2873 }
2874
2875
2876-epicsShareFunc int epicsShareAPI registryAdd(
2877+LIBCOM_API int LIBCOMSTD_API registryAdd(
2878 void *registryID,const char *name,void *data)
2879 {
2880 GPHENTRY *pentry;
2881@@ -54,7 +53,7 @@ epicsShareFunc int epicsShareAPI registryAdd(
2882 return(TRUE);
2883 }
2884
2885-epicsShareFunc int epicsShareAPI registryChange(
2886+LIBCOM_API int LIBCOMSTD_API registryChange(
2887 void *registryID,const char *name,void *data)
2888 {
2889 GPHENTRY *pentry;
2890@@ -65,7 +64,7 @@ epicsShareFunc int epicsShareAPI registryChange(
2891 return(TRUE);
2892 }
2893
2894-epicsShareFunc void * epicsShareAPI registryFind(
2895+LIBCOM_API void * LIBCOMSTD_API registryFind(
2896 void *registryID,const char *name)
2897 {
2898 GPHENTRY *pentry;
2899@@ -77,14 +76,14 @@ epicsShareFunc void * epicsShareAPI registryFind(
2900 return(pentry->userPvt);
2901 }
2902
2903-epicsShareFunc void epicsShareAPI registryFree(void)
2904+LIBCOM_API void LIBCOMSTD_API registryFree(void)
2905 {
2906 if(!gphPvt) return;
2907 gphFreeMem(gphPvt);
2908 gphPvt = 0;
2909 }
2910
2911-epicsShareFunc int epicsShareAPI registryDump(void)
2912+LIBCOM_API int LIBCOMSTD_API registryDump(void)
2913 {
2914 if(!gphPvt) return(0);
2915 gphDump(gphPvt);
2916diff --git a/modules/libcom/src/iocsh/registry.h b/modules/libcom/src/iocsh/registry.h
2917index ea1bb7c..0739783 100644
2918--- a/modules/libcom/src/iocsh/registry.h
2919+++ b/modules/libcom/src/iocsh/registry.h
2920@@ -10,23 +10,23 @@
2921 #ifndef INCregistryh
2922 #define INCregistryh
2923
2924-#include "shareLib.h"
2925+#include "libComAPI.h"
2926 #ifdef __cplusplus
2927 extern "C" {
2928 #endif
2929
2930 #define DEFAULT_TABLE_SIZE 1024
2931
2932-epicsShareFunc int epicsShareAPI registryAdd(
2933+LIBCOM_API int LIBCOMSTD_API registryAdd(
2934 void *registryID,const char *name,void *data);
2935-epicsShareFunc void *epicsShareAPI registryFind(
2936+LIBCOM_API void *LIBCOMSTD_API registryFind(
2937 void *registryID,const char *name);
2938-epicsShareFunc int epicsShareAPI registryChange(
2939+LIBCOM_API int LIBCOMSTD_API registryChange(
2940 void *registryID,const char *name,void *data);
2941
2942-epicsShareFunc int epicsShareAPI registrySetTableSize(int size);
2943-epicsShareFunc void epicsShareAPI registryFree(void);
2944-epicsShareFunc int epicsShareAPI registryDump(void);
2945+LIBCOM_API int LIBCOMSTD_API registrySetTableSize(int size);
2946+LIBCOM_API void LIBCOMSTD_API registryFree(void);
2947+LIBCOM_API int LIBCOMSTD_API registryDump(void);
2948
2949 #ifdef __cplusplus
2950 }
2951diff --git a/modules/libcom/src/libComAPI.h b/modules/libcom/src/libComAPI.h
2952new file mode 100644
2953index 0000000..949fd17
2954--- /dev/null
2955+++ b/modules/libcom/src/libComAPI.h
2956@@ -0,0 +1,32 @@
2957+#ifndef LIBCOMAPI_H
2958+#define LIBCOMAPI_H
2959+
2960+#if defined(_WIN32) || defined(__CYGWIN__)
2961+# define LIBCOMSTD_API __stdcall
2962+
2963+# if defined(LIBCOM_API_BUILDING) && defined(EPICS_BUILD_DLL)
2964+/* building library as dll */
2965+# define LIBCOM_API __declspec(dllexport)
2966+# elif !defined(LIBCOM_API_BUILDING) && defined(EPICS_CALL_DLL)
2967+/* calling library in dll form */
2968+# define LIBCOM_API __declspec(dllimport)
2969+# endif
2970+
2971+#elif __GNUC__ >= 4
2972+# define LIBCOM_API __attribute__ ((visibility("default")))
2973+#endif
2974+
2975+#if !defined(LIBCOM_API)
2976+# define LIBCOM_API
2977+#endif
2978+
2979+#if !defined(LIBCOMSTD_API)
2980+# define LIBCOMSTD_API
2981+#endif
2982+
2983+/* workaround for unfortunately ubiquitous example
2984+ * to workaround ordering issues...
2985+ */
2986+#include <shareLib.h>
2987+
2988+#endif /* LIBCOMAPI_H */
2989diff --git a/modules/libcom/src/libComVersion.h b/modules/libcom/src/libComVersion.h
2990index 60537f9..02a124d 100644
2991--- a/modules/libcom/src/libComVersion.h
2992+++ b/modules/libcom/src/libComVersion.h
2993@@ -9,7 +9,7 @@
2994 #define LIBCOMVERSION_H
2995
2996 #include <epicsVersion.h>
2997-#include <shareLib.h>
2998+#include <libComAPI.h>
2999
3000 #ifndef VERSION_INT
3001 # define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
3002diff --git a/modules/libcom/src/log/iocLog.c b/modules/libcom/src/log/iocLog.c
3003index ba78041..34a0f94 100644
3004--- a/modules/libcom/src/log/iocLog.c
3005+++ b/modules/libcom/src/log/iocLog.c
3006@@ -16,7 +16,6 @@
3007 #include <stdio.h>
3008 #include <limits.h>
3009
3010-#define epicsExportSharedSymbols
3011 #include "envDefs.h"
3012 #include "errlog.h"
3013 #include "logClient.h"
3014@@ -69,7 +68,7 @@ static int getConfig (struct in_addr *pserver_addr, unsigned short *pserver_port
3015 /*
3016 * iocLogFlush ()
3017 */
3018-void epicsShareAPI epicsShareAPI iocLogFlush (void)
3019+void LIBCOMSTD_API LIBCOMSTD_API iocLogFlush (void)
3020 {
3021 if (iocLogClient!=NULL) {
3022 logClientFlush (iocLogClient);
3023@@ -119,7 +118,7 @@ static logClientId iocLogClientInit (void)
3024 /*
3025 * iocLogInit()
3026 */
3027-int epicsShareAPI iocLogInit (void)
3028+int LIBCOMSTD_API iocLogInit (void)
3029 {
3030 /*
3031 * check for global disable
3032@@ -145,7 +144,7 @@ int epicsShareAPI iocLogInit (void)
3033 /*
3034 * iocLogShow ()
3035 */
3036-void epicsShareAPI iocLogShow (unsigned level)
3037+void LIBCOMSTD_API iocLogShow (unsigned level)
3038 {
3039 if (iocLogClient!=NULL) {
3040 logClientShow (iocLogClient, level);
3041@@ -155,7 +154,7 @@ void epicsShareAPI iocLogShow (unsigned level)
3042 /*
3043 * logClientInit(); deprecated
3044 */
3045-logClientId epicsShareAPI logClientInit (void)
3046+logClientId LIBCOMSTD_API logClientInit (void)
3047 {
3048 return iocLogClientInit ();
3049 }
3050diff --git a/modules/libcom/src/log/iocLog.h b/modules/libcom/src/log/iocLog.h
3051index b6f7ddf..4a59c2b 100644
3052--- a/modules/libcom/src/log/iocLog.h
3053+++ b/modules/libcom/src/log/iocLog.h
3054@@ -17,7 +17,7 @@
3055
3056 #ifndef INCiocLogh
3057 #define INCiocLogh 1
3058-#include "shareLib.h"
3059+#include "libComAPI.h"
3060
3061 #ifdef __cplusplus
3062 extern "C" {
3063@@ -26,10 +26,10 @@ extern "C" {
3064 /*
3065 * ioc log client interface
3066 */
3067-epicsShareExtern int iocLogDisable;
3068-epicsShareFunc int epicsShareAPI iocLogInit (void);
3069-epicsShareFunc void epicsShareAPI iocLogShow (unsigned level);
3070-epicsShareFunc void epicsShareAPI iocLogFlush (void);
3071+LIBCOM_API extern int iocLogDisable;
3072+LIBCOM_API int LIBCOMSTD_API iocLogInit (void);
3073+LIBCOM_API void LIBCOMSTD_API iocLogShow (unsigned level);
3074+LIBCOM_API void LIBCOMSTD_API iocLogFlush (void);
3075
3076 #ifdef __cplusplus
3077 }
3078diff --git a/modules/libcom/src/log/iocLogServer.c b/modules/libcom/src/log/iocLogServer.c
3079index e707185..7da450a 100644
3080--- a/modules/libcom/src/log/iocLogServer.c
3081+++ b/modules/libcom/src/log/iocLogServer.c
3082@@ -16,6 +16,9 @@
3083 * Date: 080791
3084 */
3085
3086+#undef LIBCOM_API_BUILDING
3087+#undef EPICS_BUILD_DLL
3088+
3089 #include <stdlib.h>
3090 #include <string.h>
3091 #include <errno.h>
3092diff --git a/modules/libcom/src/log/logClient.c b/modules/libcom/src/log/logClient.c
3093index 44883e3..0209550 100644
3094--- a/modules/libcom/src/log/logClient.c
3095+++ b/modules/libcom/src/log/logClient.c
3096@@ -22,7 +22,6 @@
3097 #include <stdio.h>
3098
3099 #define EPICS_PRIVATE_API
3100-#define epicsExportSharedSymbols
3101 #include "dbDefs.h"
3102 #include "epicsEvent.h"
3103 #include "iocLog.h"
3104@@ -200,7 +199,7 @@ static void sendMessageChunk(logClient * pClient, const char * message) {
3105 /*
3106 * logClientSend ()
3107 */
3108-void epicsShareAPI logClientSend ( logClientId id, const char * message )
3109+void LIBCOMSTD_API logClientSend ( logClientId id, const char * message )
3110 {
3111 logClient * pClient = ( logClient * ) id;
3112
3113@@ -219,7 +218,7 @@ void epicsShareAPI logClientSend ( logClientId id, const char * message )
3114 }
3115
3116
3117-void epicsShareAPI logClientFlush ( logClientId id )
3118+void LIBCOMSTD_API logClientFlush ( logClientId id )
3119 {
3120 unsigned nSent;
3121 int status = 0;
3122@@ -448,7 +447,7 @@ static void logClientRestart ( logClientId id )
3123 /*
3124 * logClientCreate()
3125 */
3126-logClientId epicsShareAPI logClientCreate (
3127+logClientId LIBCOMSTD_API logClientCreate (
3128 struct in_addr server_addr, unsigned short server_port)
3129 {
3130 logClient *pClient;
3131@@ -511,7 +510,7 @@ logClientId epicsShareAPI logClientCreate (
3132 /*
3133 * logClientShow ()
3134 */
3135-void epicsShareAPI logClientShow (logClientId id, unsigned level)
3136+void LIBCOMSTD_API logClientShow (logClientId id, unsigned level)
3137 {
3138 logClient *pClient = (logClient *) id;
3139
3140@@ -543,7 +542,7 @@ void epicsShareAPI logClientShow (logClientId id, unsigned level)
3141 /*
3142 * iocLogPrefix()
3143 */
3144-void epicsShareAPI iocLogPrefix(const char * prefix)
3145+void LIBCOMSTD_API iocLogPrefix(const char * prefix)
3146 {
3147
3148 /* If we have already established a log prefix, don't let the user change
3149diff --git a/modules/libcom/src/log/logClient.h b/modules/libcom/src/log/logClient.h
3150index 3b3f63a..4315af7 100644
3151--- a/modules/libcom/src/log/logClient.h
3152+++ b/modules/libcom/src/log/logClient.h
3153@@ -17,7 +17,7 @@
3154
3155 #ifndef INClogClienth
3156 #define INClogClienth 1
3157-#include "shareLib.h"
3158+#include "libComAPI.h"
3159 #include "osiSock.h" /* for 'struct in_addr' */
3160
3161 /* include default log client interface for backward compatibility */
3162@@ -28,16 +28,16 @@ extern "C" {
3163 #endif
3164
3165 typedef void *logClientId;
3166-epicsShareFunc logClientId epicsShareAPI logClientCreate (
3167+LIBCOM_API logClientId LIBCOMSTD_API logClientCreate (
3168 struct in_addr server_addr, unsigned short server_port);
3169-epicsShareFunc void epicsShareAPI logClientSend (logClientId id, const char *message);
3170-epicsShareFunc void epicsShareAPI logClientShow (logClientId id, unsigned level);
3171-epicsShareFunc void epicsShareAPI logClientFlush (logClientId id);
3172-epicsShareFunc void epicsShareAPI iocLogPrefix(const char* prefix);
3173+LIBCOM_API void LIBCOMSTD_API logClientSend (logClientId id, const char *message);
3174+LIBCOM_API void LIBCOMSTD_API logClientShow (logClientId id, unsigned level);
3175+LIBCOM_API void LIBCOMSTD_API logClientFlush (logClientId id);
3176+LIBCOM_API void LIBCOMSTD_API iocLogPrefix(const char* prefix);
3177
3178 /* deprecated interface; retained for backward compatibility */
3179 /* note: implementations are in iocLog.c, not logClient.c */
3180-epicsShareFunc logClientId epicsShareAPI logClientInit (void);
3181+LIBCOM_API logClientId LIBCOMSTD_API logClientInit (void);
3182
3183 #ifdef __cplusplus
3184 }
3185diff --git a/modules/libcom/src/macLib/macCore.c b/modules/libcom/src/macLib/macCore.c
3186index 6f84d6b..9e7ea57 100644
3187--- a/modules/libcom/src/macLib/macCore.c
3188+++ b/modules/libcom/src/macLib/macCore.c
3189@@ -25,7 +25,6 @@
3190 #include <stdlib.h>
3191 #include <string.h>
3192
3193-#define epicsExportSharedSymbols
3194 #include "dbDefs.h"
3195 #include "errlog.h"
3196 #include "dbmf.h"
3197@@ -98,7 +97,7 @@ static char *Strdup( const char *string );
3198 * of macro definitions
3199 */
3200 long /* 0 = OK; <0 = ERROR */
3201-epicsShareAPI macCreateHandle(
3202+LIBCOMSTD_API macCreateHandle(
3203 MAC_HANDLE **pHandle, /* address of variable to receive pointer */
3204 /* to new macro substitution context */
3205
3206@@ -152,7 +151,7 @@ epicsShareAPI macCreateHandle(
3207 * for the given handle
3208 */
3209 void
3210-epicsShareAPI macSuppressWarning(
3211+LIBCOMSTD_API macSuppressWarning(
3212 MAC_HANDLE *handle, /* opaque handle */
3213 int suppress /* 0 means issue, 1 means suppress */
3214 )
3215@@ -172,7 +171,7 @@ epicsShareAPI macSuppressWarning(
3216 */
3217 long /* strlen(dest), <0 if any macros are */
3218 /* undefined */
3219-epicsShareAPI macExpandString(
3220+LIBCOMSTD_API macExpandString(
3221 MAC_HANDLE *handle, /* opaque handle */
3222
3223 const char *src, /* source string */
3224@@ -231,7 +230,7 @@ epicsShareAPI macExpandString(
3225 * already existed
3226 */
3227 long /* strlen(value) */
3228-epicsShareAPI macPutValue(
3229+LIBCOMSTD_API macPutValue(
3230 MAC_HANDLE *handle, /* opaque handle */
3231
3232 const char *name, /* macro name */
3233@@ -299,7 +298,7 @@ epicsShareAPI macPutValue(
3234 * Return the value of a macro
3235 */
3236 long /* strlen(value), <0 if undefined */
3237-epicsShareAPI macGetValue(
3238+LIBCOMSTD_API macGetValue(
3239 MAC_HANDLE *handle, /* opaque handle */
3240
3241 const char *name, /* macro name or reference */
3242@@ -358,7 +357,7 @@ epicsShareAPI macGetValue(
3243 * context
3244 */
3245 long /* 0 = OK; <0 = ERROR */
3246-epicsShareAPI macDeleteHandle(
3247+LIBCOMSTD_API macDeleteHandle(
3248 MAC_HANDLE *handle ) /* opaque handle */
3249 {
3250 MAC_ENTRY *entry, *nextEntry;
3251@@ -390,7 +389,7 @@ epicsShareAPI macDeleteHandle(
3252 * Mark the start of a new scoping level
3253 */
3254 long /* 0 = OK; <0 = ERROR */
3255-epicsShareAPI macPushScope(
3256+LIBCOMSTD_API macPushScope(
3257 MAC_HANDLE *handle ) /* opaque handle */
3258 {
3259 MAC_ENTRY *entry;
3260@@ -425,7 +424,7 @@ epicsShareAPI macPushScope(
3261 * Pop all macros defined since the last call to macPushScope()
3262 */
3263 long /* 0 = OK; <0 = ERROR */
3264-epicsShareAPI macPopScope(
3265+LIBCOMSTD_API macPopScope(
3266 MAC_HANDLE *handle ) /* opaque handle */
3267 {
3268 MAC_ENTRY *entry, *nextEntry;
3269@@ -469,7 +468,7 @@ epicsShareAPI macPopScope(
3270 * Report macro details to standard output
3271 */
3272 long /* 0 = OK; <0 = ERROR */
3273-epicsShareAPI macReportMacros(
3274+LIBCOMSTD_API macReportMacros(
3275 MAC_HANDLE *handle ) /* opaque handle */
3276 {
3277 const char *format = "%-1s %-16s %-16s %s\n";
3278diff --git a/modules/libcom/src/macLib/macEnv.c b/modules/libcom/src/macLib/macEnv.c
3279index f102748..3678911 100644
3280--- a/modules/libcom/src/macLib/macEnv.c
3281+++ b/modules/libcom/src/macLib/macEnv.c
3282@@ -12,18 +12,17 @@
3283 #include <stdlib.h>
3284 #include <string.h>
3285
3286-#define epicsExportSharedSymbols
3287 #include "errlog.h"
3288 #include "epicsString.h"
3289 #include "macLib.h"
3290
3291-char * epicsShareAPI
3292+char * LIBCOMSTD_API
3293 macEnvExpand(const char *str)
3294 {
3295 return macDefExpand(str, NULL);
3296 }
3297
3298-char * epicsShareAPI
3299+char * LIBCOMSTD_API
3300 macDefExpand(const char *str, MAC_HANDLE *macros)
3301 {
3302 MAC_HANDLE *handle;
3303diff --git a/modules/libcom/src/macLib/macLib.h b/modules/libcom/src/macLib/macLib.h
3304index 14ecdaa..4a762bc 100644
3305--- a/modules/libcom/src/macLib/macLib.h
3306+++ b/modules/libcom/src/macLib/macLib.h
3307@@ -19,7 +19,7 @@
3308 * EPICS include files needed by this file
3309 */
3310 #include "ellLib.h"
3311-#include "shareLib.h"
3312+#include "libComAPI.h"
3313
3314 #ifdef __cplusplus
3315 extern "C" {
3316@@ -46,8 +46,8 @@ typedef struct {
3317 /*
3318 * Function prototypes (core library)
3319 */
3320-epicsShareFunc long /* 0 = OK; <0 = ERROR */
3321-epicsShareAPI macCreateHandle(
3322+LIBCOM_API long /* 0 = OK; <0 = ERROR */
3323+LIBCOMSTD_API macCreateHandle(
3324 MAC_HANDLE **handle, /* address of variable to receive pointer */
3325 /* to new macro substitution context */
3326
3327@@ -57,16 +57,16 @@ epicsShareAPI macCreateHandle(
3328 /* argument implies no macros */
3329 );
3330
3331-epicsShareFunc void
3332-epicsShareAPI macSuppressWarning(
3333+LIBCOM_API void
3334+LIBCOMSTD_API macSuppressWarning(
3335 MAC_HANDLE *handle, /* opaque handle */
3336
3337 int falseTrue /*0 means issue, 1 means suppress*/
3338 );
3339
3340-epicsShareFunc long /* strlen(dest), <0 if any macros are */
3341+LIBCOM_API long /* strlen(dest), <0 if any macros are */
3342 /* undefined */
3343-epicsShareAPI macExpandString(
3344+LIBCOMSTD_API macExpandString(
3345 MAC_HANDLE *handle, /* opaque handle */
3346
3347 const char *src, /* source string */
3348@@ -77,8 +77,8 @@ epicsShareAPI macExpandString(
3349 );
3350
3351
3352-epicsShareFunc long /* strlen(value) */
3353-epicsShareAPI macPutValue(
3354+LIBCOM_API long /* strlen(value) */
3355+LIBCOMSTD_API macPutValue(
3356 MAC_HANDLE *handle, /* opaque handle */
3357
3358 const char *name, /* macro name */
3359@@ -86,8 +86,8 @@ epicsShareAPI macPutValue(
3360 const char *value /* macro value */
3361 );
3362
3363-epicsShareFunc long /* strlen(value), <0 if undefined */
3364-epicsShareAPI macGetValue(
3365+LIBCOM_API long /* strlen(value), <0 if undefined */
3366+LIBCOMSTD_API macGetValue(
3367 MAC_HANDLE *handle, /* opaque handle */
3368
3369 const char *name, /* macro name or reference */
3370@@ -98,31 +98,31 @@ epicsShareAPI macGetValue(
3371 long capacity /* capacity of destination buffer (value) */
3372 );
3373
3374-epicsShareFunc long /* 0 = OK; <0 = ERROR */
3375-epicsShareAPI macDeleteHandle(
3376+LIBCOM_API long /* 0 = OK; <0 = ERROR */
3377+LIBCOMSTD_API macDeleteHandle(
3378 MAC_HANDLE *handle /* opaque handle */
3379 );
3380
3381-epicsShareFunc long /* 0 = OK; <0 = ERROR */
3382-epicsShareAPI macPushScope(
3383+LIBCOM_API long /* 0 = OK; <0 = ERROR */
3384+LIBCOMSTD_API macPushScope(
3385 MAC_HANDLE *handle /* opaque handle */
3386 );
3387
3388-epicsShareFunc long /* 0 = OK; <0 = ERROR */
3389-epicsShareAPI macPopScope(
3390+LIBCOM_API long /* 0 = OK; <0 = ERROR */
3391+LIBCOMSTD_API macPopScope(
3392 MAC_HANDLE *handle /* opaque handle */
3393 );
3394
3395-epicsShareFunc long /* 0 = OK; <0 = ERROR */
3396-epicsShareAPI macReportMacros(
3397+LIBCOM_API long /* 0 = OK; <0 = ERROR */
3398+LIBCOMSTD_API macReportMacros(
3399 MAC_HANDLE *handle /* opaque handle */
3400 );
3401
3402 /*
3403 * Function prototypes (utility library)
3404 */
3405-epicsShareFunc long /* #defns encountered; <0 = ERROR */
3406-epicsShareAPI macParseDefns(
3407+LIBCOM_API long /* #defns encountered; <0 = ERROR */
3408+LIBCOMSTD_API macParseDefns(
3409 MAC_HANDLE *handle, /* opaque handle; can be NULL if default */
3410 /* special characters are to be used */
3411
3412@@ -135,8 +135,8 @@ epicsShareAPI macParseDefns(
3413 /* allocated contiguously */
3414 );
3415
3416-epicsShareFunc long /* #macros defined; <0 = ERROR */
3417-epicsShareAPI macInstallMacros(
3418+LIBCOM_API long /* #macros defined; <0 = ERROR */
3419+LIBCOMSTD_API macInstallMacros(
3420 MAC_HANDLE *handle, /* opaque handle */
3421
3422 char *pairs[] /* pointer to NULL-terminated array of */
3423@@ -145,13 +145,13 @@ epicsShareAPI macInstallMacros(
3424 /* argument implies no macros */
3425 );
3426
3427-epicsShareFunc char * /* expanded string; NULL if any undefined macros */
3428-epicsShareAPI macEnvExpand(
3429+LIBCOM_API char * /* expanded string; NULL if any undefined macros */
3430+LIBCOMSTD_API macEnvExpand(
3431 const char *str /* string to be expanded */
3432 );
3433
3434-epicsShareFunc char * /* expanded string; NULL if any undefined macros */
3435-epicsShareAPI macDefExpand(
3436+LIBCOM_API char * /* expanded string; NULL if any undefined macros */
3437+LIBCOMSTD_API macDefExpand(
3438 const char *str, /* string to be expanded */
3439 MAC_HANDLE *macros /* opaque handle; can be NULL if default */
3440 /* special characters are to be used */
3441diff --git a/modules/libcom/src/macLib/macUtil.c b/modules/libcom/src/macLib/macUtil.c
3442index 7bf7354..c226198 100644
3443--- a/modules/libcom/src/macLib/macUtil.c
3444+++ b/modules/libcom/src/macLib/macUtil.c
3445@@ -17,7 +17,6 @@
3446 #include <stdlib.h>
3447 #include <string.h>
3448
3449-#define epicsExportSharedSymbols
3450 #include "dbDefs.h"
3451 #include "errlog.h"
3452 #include "macLib.h"
3453@@ -30,7 +29,7 @@
3454 * values)
3455 */
3456 long /* #defns encountered; <0 = ERROR */
3457-epicsShareAPI macParseDefns(
3458+LIBCOMSTD_API macParseDefns(
3459 MAC_HANDLE *handle, /* opaque handle; can be NULL if default */
3460 /* special characters are to be used */
3461
3462@@ -251,7 +250,7 @@ error:
3463 * one (preferably two) NULL pointers
3464 */
3465 long /* #macros defined; <0 = ERROR */
3466-epicsShareAPI macInstallMacros(
3467+LIBCOMSTD_API macInstallMacros(
3468 MAC_HANDLE *handle, /* opaque handle */
3469
3470 char *pairs[] ) /* pointer to NULL-terminated array of */
3471diff --git a/modules/libcom/src/misc/aToIPAddr.c b/modules/libcom/src/misc/aToIPAddr.c
3472index c21b574..ffcbb5f 100644
3473--- a/modules/libcom/src/misc/aToIPAddr.c
3474+++ b/modules/libcom/src/misc/aToIPAddr.c
3475@@ -14,7 +14,6 @@
3476 #include <stdio.h>
3477 #include <string.h>
3478
3479-#define epicsExportSharedSymbols
3480 #include "epicsTypes.h"
3481 #include "osiSock.h"
3482
3483@@ -75,7 +74,7 @@ static int initIPAddr ( struct in_addr ipAddr, unsigned port,
3484 * "pAddrString" does not contain an address of the form
3485 * "n.n.n.n:p or host:p"
3486 */
3487-epicsShareFunc int epicsShareAPI
3488+LIBCOM_API int LIBCOMSTD_API
3489 aToIPAddr( const char *pAddrString, unsigned short defaultPort,
3490 struct sockaddr_in *pIP )
3491 {
3492diff --git a/modules/libcom/src/misc/adjustment.c b/modules/libcom/src/misc/adjustment.c
3493index ac10e28..ec24881 100644
3494--- a/modules/libcom/src/misc/adjustment.c
3495+++ b/modules/libcom/src/misc/adjustment.c
3496@@ -20,10 +20,9 @@
3497 * After setting the following they will be declared as exports
3498 * (Appropriate for what we implenment)
3499 */
3500-#define epicsExportSharedSymbols
3501 #include "adjustment.h"
3502
3503-epicsShareFunc size_t adjustToWorstCaseAlignment(size_t size)
3504+LIBCOM_API size_t adjustToWorstCaseAlignment(size_t size)
3505 {
3506 int align_size, adjust;
3507 struct test_long_word { char c; long lw; };
3508diff --git a/modules/libcom/src/misc/adjustment.h b/modules/libcom/src/misc/adjustment.h
3509index 3f15203..76d333f 100644
3510--- a/modules/libcom/src/misc/adjustment.h
3511+++ b/modules/libcom/src/misc/adjustment.h
3512@@ -11,13 +11,13 @@
3513
3514 #ifndef INCadjustmenth
3515 #define INCadjustmenth
3516-#include "shareLib.h"
3517+#include "libComAPI.h"
3518
3519 #ifdef __cplusplus
3520 extern "C" {
3521 #endif
3522
3523-epicsShareFunc size_t adjustToWorstCaseAlignment(size_t size);
3524+LIBCOM_API size_t adjustToWorstCaseAlignment(size_t size);
3525
3526 #ifdef __cplusplus
3527 }
3528diff --git a/modules/libcom/src/misc/alarm.h b/modules/libcom/src/misc/alarm.h
3529index 58e2b73..7fb1eed 100644
3530--- a/modules/libcom/src/misc/alarm.h
3531+++ b/modules/libcom/src/misc/alarm.h
3532@@ -16,7 +16,7 @@
3533 #ifndef INC_alarm_H
3534 #define INC_alarm_H
3535
3536-#include "shareLib.h"
3537+#include "libComAPI.h"
3538
3539 #ifdef __cplusplus
3540 extern "C" {
3541@@ -97,8 +97,8 @@ typedef enum {
3542
3543 /* Name string arrays */
3544
3545-epicsShareExtern const char *epicsAlarmSeverityStrings [ALARM_NSEV];
3546-epicsShareExtern const char *epicsAlarmConditionStrings [ALARM_NSTATUS];
3547+LIBCOM_API extern const char *epicsAlarmSeverityStrings [ALARM_NSEV];
3548+LIBCOM_API extern const char *epicsAlarmConditionStrings [ALARM_NSTATUS];
3549
3550
3551 #ifdef __cplusplus
3552diff --git a/modules/libcom/src/misc/alarmString.c b/modules/libcom/src/misc/alarmString.c
3553index 4db179d..b09f74b 100644
3554--- a/modules/libcom/src/misc/alarmString.c
3555+++ b/modules/libcom/src/misc/alarmString.c
3556@@ -9,12 +9,11 @@
3557
3558 /* String names for alarm status and severity values */
3559
3560-#define epicsExportSharedSymbols
3561 #include "alarm.h"
3562
3563 /* ALARM SEVERITIES - must match menuAlarmSevr.dbd and alarm.h */
3564
3565-epicsShareDef const char * epicsAlarmSeverityStrings[ALARM_NSEV] = {
3566+const char * epicsAlarmSeverityStrings[ALARM_NSEV] = {
3567 "NO_ALARM",
3568 "MINOR",
3569 "MAJOR",
3570@@ -24,7 +23,7 @@ epicsShareDef const char * epicsAlarmSeverityStrings[ALARM_NSEV] = {
3571
3572 /* ALARM STATUS - must match menuAlarmStat.dbd and alarm.h */
3573
3574-epicsShareDef const char * epicsAlarmConditionStrings[ALARM_NSTATUS] = {
3575+const char * epicsAlarmConditionStrings[ALARM_NSTATUS] = {
3576 "NO_ALARM",
3577 "READ",
3578 "WRITE",
3579diff --git a/modules/libcom/src/misc/cantProceed.c b/modules/libcom/src/misc/cantProceed.c
3580index 6c35796..d5ac257 100644
3581--- a/modules/libcom/src/misc/cantProceed.c
3582+++ b/modules/libcom/src/misc/cantProceed.c
3583@@ -14,13 +14,12 @@
3584 #include <stdlib.h>
3585 #include <stdarg.h>
3586
3587-#define epicsExportSharedSymbols
3588 #include "errlog.h"
3589 #include "cantProceed.h"
3590 #include "epicsThread.h"
3591 #include "epicsStackTrace.h"
3592
3593-epicsShareFunc void * callocMustSucceed(size_t count, size_t size, const char *msg)
3594+LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *msg)
3595 {
3596 void * mem = NULL;
3597 if (count > 0 && size > 0) {
3598@@ -36,7 +35,7 @@ epicsShareFunc void * callocMustSucceed(size_t count, size_t size, const char *m
3599 return mem;
3600 }
3601
3602-epicsShareFunc void * mallocMustSucceed(size_t size, const char *msg)
3603+LIBCOM_API void * mallocMustSucceed(size_t size, const char *msg)
3604 {
3605 void * mem = NULL;
3606 if (size > 0) {
3607@@ -52,7 +51,7 @@ epicsShareFunc void * mallocMustSucceed(size_t size, const char *msg)
3608 return mem;
3609 }
3610
3611-epicsShareFunc void cantProceed(const char *msg, ...)
3612+LIBCOM_API void cantProceed(const char *msg, ...)
3613 {
3614 va_list pvar;
3615 va_start(pvar, msg);
3616diff --git a/modules/libcom/src/misc/cantProceed.h b/modules/libcom/src/misc/cantProceed.h
3617index 437f968..168f936 100644
3618--- a/modules/libcom/src/misc/cantProceed.h
3619+++ b/modules/libcom/src/misc/cantProceed.h
3620@@ -12,15 +12,15 @@
3621 #include <stdlib.h>
3622
3623 #include "compilerDependencies.h"
3624-#include "shareLib.h"
3625+#include "libComAPI.h"
3626
3627 #ifdef __cplusplus
3628 extern "C" {
3629 #endif
3630
3631-epicsShareFunc void cantProceed(const char *errorMessage, ...) EPICS_PRINTF_STYLE(1,2);
3632-epicsShareFunc void * callocMustSucceed(size_t count, size_t size, const char *errorMessage);
3633-epicsShareFunc void * mallocMustSucceed(size_t size, const char *errorMessage);
3634+LIBCOM_API void cantProceed(const char *errorMessage, ...) EPICS_PRINTF_STYLE(1,2);
3635+LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *errorMessage);
3636+LIBCOM_API void * mallocMustSucceed(size_t size, const char *errorMessage);
3637
3638 #ifdef __cplusplus
3639 }
3640diff --git a/modules/libcom/src/misc/epicsConvert.c b/modules/libcom/src/misc/epicsConvert.c
3641index 9318ceb..bbc29aa 100644
3642--- a/modules/libcom/src/misc/epicsConvert.c
3643+++ b/modules/libcom/src/misc/epicsConvert.c
3644@@ -11,12 +11,11 @@
3645 #include <float.h>
3646 #include <limits.h>
3647
3648-#define epicsExportSharedSymbols
3649 #include "epicsMath.h"
3650 #include "epicsConvert.h"
3651 #include "cantProceed.h"
3652
3653-epicsShareFunc float epicsConvertDoubleToFloat(double value)
3654+LIBCOM_API float epicsConvertDoubleToFloat(double value)
3655 {
3656 double abs;
3657
3658diff --git a/modules/libcom/src/misc/epicsConvert.h b/modules/libcom/src/misc/epicsConvert.h
3659index 1c38bc3..29cdbab 100644
3660--- a/modules/libcom/src/misc/epicsConvert.h
3661+++ b/modules/libcom/src/misc/epicsConvert.h
3662@@ -11,13 +11,13 @@
3663 #ifndef INC_epicsConvert_H
3664 #define INC_epicsConvert_H
3665
3666-#include <shareLib.h>
3667+#include <libComAPI.h>
3668
3669 #ifdef __cplusplus
3670 extern "C" {
3671 #endif
3672
3673-epicsShareFunc float epicsConvertDoubleToFloat(double value);
3674+LIBCOM_API float epicsConvertDoubleToFloat(double value);
3675
3676 #ifdef __cplusplus
3677 }
3678diff --git a/modules/libcom/src/misc/epicsExit.c b/modules/libcom/src/misc/epicsExit.c
3679index 266835e..af36bce 100644
3680--- a/modules/libcom/src/misc/epicsExit.c
3681+++ b/modules/libcom/src/misc/epicsExit.c
3682@@ -27,7 +27,6 @@
3683 #include <errno.h>
3684 #include <string.h>
3685
3686-#define epicsExportSharedSymbols
3687 #include "ellLib.h"
3688 #include "errlog.h"
3689 #include "epicsThread.h"
3690@@ -100,7 +99,7 @@ static void epicsExitCallAtExitsPvt(exitPvt *pep)
3691 }
3692 }
3693
3694-epicsShareFunc void epicsExitCallAtExits(void)
3695+LIBCOM_API void epicsExitCallAtExits(void)
3696 {
3697 exitPvt * pep = 0;
3698
3699@@ -119,7 +118,7 @@ epicsShareFunc void epicsExitCallAtExits(void)
3700 epicsMutexCleanup();
3701 }
3702
3703-epicsShareFunc void epicsExitCallAtThreadExits(void)
3704+LIBCOM_API void epicsExitCallAtThreadExits(void)
3705 {
3706 exitPvt * pep;
3707
3708@@ -148,7 +147,7 @@ static int epicsAtExitPvt(exitPvt *pep, epicsExitFunc func, void *arg, const cha
3709 return status;
3710 }
3711
3712-epicsShareFunc int epicsAtThreadExit(epicsExitFunc func, void *arg)
3713+LIBCOM_API int epicsAtThreadExit(epicsExitFunc func, void *arg)
3714 {
3715 exitPvt * pep;
3716
3717@@ -164,7 +163,7 @@ epicsShareFunc int epicsAtThreadExit(epicsExitFunc func, void *arg)
3718 return epicsAtExitPvt ( pep, func, arg, NULL );
3719 }
3720
3721-epicsShareFunc int epicsAtExit3(epicsExitFunc func, void *arg, const char* name)
3722+LIBCOM_API int epicsAtExit3(epicsExitFunc func, void *arg, const char* name)
3723 {
3724 int status = -1;
3725
3726@@ -180,7 +179,7 @@ epicsShareFunc int epicsAtExit3(epicsExitFunc func, void *arg, const char* name)
3727 return status;
3728 }
3729
3730-epicsShareFunc void epicsExit(int status)
3731+LIBCOM_API void epicsExit(int status)
3732 {
3733 epicsExitCallAtExits();
3734 epicsThreadSleep(0.1);
3735@@ -202,7 +201,7 @@ static void exitLaterOnceFunc(void *raw)
3736 &exitNow, NULL);
3737 }
3738
3739-epicsShareFunc void epicsExitLater(int status)
3740+LIBCOM_API void epicsExitLater(int status)
3741 {
3742 epicsThreadOnce(&exitLaterOnce, &exitLaterOnceFunc, &status);
3743 }
3744diff --git a/modules/libcom/src/misc/epicsExit.h b/modules/libcom/src/misc/epicsExit.h
3745index 3e961cb..53abb81 100644
3746--- a/modules/libcom/src/misc/epicsExit.h
3747+++ b/modules/libcom/src/misc/epicsExit.h
3748@@ -9,7 +9,7 @@
3749 /*epicsExit.h*/
3750 #ifndef epicsExith
3751 #define epicsExith
3752-#include <shareLib.h>
3753+#include <libComAPI.h>
3754
3755 #ifdef __cplusplus
3756 extern "C" {
3757@@ -17,14 +17,14 @@ extern "C" {
3758
3759 typedef void (*epicsExitFunc)(void *arg);
3760
3761-epicsShareFunc void epicsExit(int status);
3762-epicsShareFunc void epicsExitLater(int status);
3763-epicsShareFunc void epicsExitCallAtExits(void);
3764-epicsShareFunc int epicsAtExit3(epicsExitFunc func, void *arg, const char* name);
3765+LIBCOM_API void epicsExit(int status);
3766+LIBCOM_API void epicsExitLater(int status);
3767+LIBCOM_API void epicsExitCallAtExits(void);
3768+LIBCOM_API int epicsAtExit3(epicsExitFunc func, void *arg, const char* name);
3769 #define epicsAtExit(F,A) epicsAtExit3(F,A,#F)
3770
3771-epicsShareFunc void epicsExitCallAtThreadExits(void);
3772-epicsShareFunc int epicsAtThreadExit(epicsExitFunc func, void *arg);
3773+LIBCOM_API void epicsExitCallAtThreadExits(void);
3774+LIBCOM_API int epicsAtThreadExit(epicsExitFunc func, void *arg);
3775
3776
3777 #ifdef __cplusplus
3778diff --git a/modules/libcom/src/misc/epicsStdlib.c b/modules/libcom/src/misc/epicsStdlib.c
3779index f434898..328f519 100644
3780--- a/modules/libcom/src/misc/epicsStdlib.c
3781+++ b/modules/libcom/src/misc/epicsStdlib.c
3782@@ -13,7 +13,6 @@
3783 #include <errno.h>
3784 #include <float.h>
3785
3786-#define epicsExportSharedSymbols
3787 #include "epicsMath.h"
3788 #include "epicsStdlib.h"
3789 #include "epicsString.h"
3790@@ -22,7 +21,7 @@
3791
3792 /* These are the conversion primitives */
3793
3794-epicsShareFunc int
3795+LIBCOM_API int
3796 epicsParseLong(const char *str, long *to, int base, char **units)
3797 {
3798 int c;
3799@@ -53,7 +52,7 @@ epicsParseLong(const char *str, long *to, int base, char **units)
3800 return 0;
3801 }
3802
3803-epicsShareFunc int
3804+LIBCOM_API int
3805 epicsParseULong(const char *str, unsigned long *to, int base, char **units)
3806 {
3807 int c;
3808@@ -84,7 +83,7 @@ epicsParseULong(const char *str, unsigned long *to, int base, char **units)
3809 return 0;
3810 }
3811
3812-epicsShareFunc int
3813+LIBCOM_API int
3814 epicsParseLLong(const char *str, long long *to, int base, char **units)
3815 {
3816 int c;
3817@@ -115,7 +114,7 @@ epicsParseLLong(const char *str, long long *to, int base, char **units)
3818 return 0;
3819 }
3820
3821-epicsShareFunc int
3822+LIBCOM_API int
3823 epicsParseULLong(const char *str, unsigned long long *to, int base, char **units)
3824 {
3825 int c;
3826@@ -146,7 +145,7 @@ epicsParseULLong(const char *str, unsigned long long *to, int base, char **units
3827 return 0;
3828 }
3829
3830-epicsShareFunc int
3831+LIBCOM_API int
3832 epicsParseDouble(const char *str, double *to, char **units)
3833 {
3834 int c;
3835@@ -178,7 +177,7 @@ epicsParseDouble(const char *str, double *to, char **units)
3836
3837 /* These call the primitives */
3838
3839-epicsShareFunc int
3840+LIBCOM_API int
3841 epicsParseInt8(const char *str, epicsInt8 *to, int base, char **units)
3842 {
3843 long value;
3844@@ -194,7 +193,7 @@ epicsParseInt8(const char *str, epicsInt8 *to, int base, char **units)
3845 return 0;
3846 }
3847
3848-epicsShareFunc int
3849+LIBCOM_API int
3850 epicsParseUInt8(const char *str, epicsUInt8 *to, int base, char **units)
3851 {
3852 unsigned long value;
3853@@ -210,7 +209,7 @@ epicsParseUInt8(const char *str, epicsUInt8 *to, int base, char **units)
3854 return 0;
3855 }
3856
3857-epicsShareFunc int
3858+LIBCOM_API int
3859 epicsParseInt16(const char *str, epicsInt16 *to, int base, char **units)
3860 {
3861 long value;
3862@@ -226,7 +225,7 @@ epicsParseInt16(const char *str, epicsInt16 *to, int base, char **units)
3863 return 0;
3864 }
3865
3866-epicsShareFunc int
3867+LIBCOM_API int
3868 epicsParseUInt16(const char *str, epicsUInt16 *to, int base, char **units)
3869 {
3870 unsigned long value;
3871@@ -242,7 +241,7 @@ epicsParseUInt16(const char *str, epicsUInt16 *to, int base, char **units)
3872 return 0;
3873 }
3874
3875-epicsShareFunc int
3876+LIBCOM_API int
3877 epicsParseInt32(const char *str, epicsInt32 *to, int base, char **units)
3878 {
3879 long value;
3880@@ -260,7 +259,7 @@ epicsParseInt32(const char *str, epicsInt32 *to, int base, char **units)
3881 return 0;
3882 }
3883
3884-epicsShareFunc int
3885+LIBCOM_API int
3886 epicsParseUInt32(const char *str, epicsUInt32 *to, int base, char **units)
3887 {
3888 unsigned long value;
3889@@ -278,7 +277,7 @@ epicsParseUInt32(const char *str, epicsUInt32 *to, int base, char **units)
3890 return 0;
3891 }
3892
3893-epicsShareFunc int
3894+LIBCOM_API int
3895 epicsParseInt64(const char *str, epicsInt64 *to, int base, char **units)
3896 {
3897 #if (LONG_MAX == 0x7fffffffffffffffLL)
3898@@ -296,7 +295,7 @@ epicsParseInt64(const char *str, epicsInt64 *to, int base, char **units)
3899 return 0;
3900 }
3901
3902-epicsShareFunc int
3903+LIBCOM_API int
3904 epicsParseUInt64(const char *str, epicsUInt64 *to, int base, char **units)
3905 {
3906 #if (ULONG_MAX == 0xffffffffffffffffULL)
3907@@ -315,7 +314,7 @@ epicsParseUInt64(const char *str, epicsUInt64 *to, int base, char **units)
3908 }
3909
3910
3911-epicsShareFunc int
3912+LIBCOM_API int
3913 epicsParseFloat(const char *str, float *to, char **units)
3914 {
3915 double value, abs;
3916@@ -339,11 +338,11 @@ epicsParseFloat(const char *str, float *to, char **units)
3917 * #define epicsStrtod strtod
3918 *
3919 * If strtod() is broken, osdStrtod.h defines this prototype:
3920- * epicsShareFunc double epicsStrtod(const char *str, char **endp);
3921+ * LIBCOM_API double epicsStrtod(const char *str, char **endp);
3922 */
3923
3924 #ifndef epicsStrtod
3925-epicsShareFunc double
3926+LIBCOM_API double
3927 epicsStrtod(const char *str, char **endp)
3928 {
3929 const char *cp = str;
3930diff --git a/modules/libcom/src/misc/epicsStdlib.h b/modules/libcom/src/misc/epicsStdlib.h
3931index 20b7cd2..7d4c293 100644
3932--- a/modules/libcom/src/misc/epicsStdlib.h
3933+++ b/modules/libcom/src/misc/epicsStdlib.h
3934@@ -15,7 +15,7 @@
3935 #include <stdlib.h>
3936 #include <limits.h>
3937
3938-#include "shareLib.h"
3939+#include "libComAPI.h"
3940 #include "osdStrtod.h"
3941 #include "epicsTypes.h"
3942 #include "errMdef.h"
3943@@ -31,37 +31,37 @@ extern "C" {
3944 #define S_stdlib_badBase (M_stdlib | 5) /* Number base not supported */
3945
3946
3947-epicsShareFunc int
3948+LIBCOM_API int
3949 epicsParseLong(const char *str, long *to, int base, char **units);
3950-epicsShareFunc int
3951+LIBCOM_API int
3952 epicsParseULong(const char *str, unsigned long *to, int base, char **units);
3953-epicsShareFunc int
3954+LIBCOM_API int
3955 epicsParseLLong(const char *str, long long *to, int base, char **units);
3956-epicsShareFunc int
3957+LIBCOM_API int
3958 epicsParseULLong(const char *str, unsigned long long *to, int base, char **units);
3959-epicsShareFunc int
3960+LIBCOM_API int
3961 epicsParseDouble(const char *str, double *to, char **units);
3962
3963-epicsShareFunc int
3964+LIBCOM_API int
3965 epicsParseFloat(const char *str, float *to, char **units);
3966
3967-epicsShareFunc int
3968+LIBCOM_API int
3969 epicsParseInt8(const char *str, epicsInt8 *to, int base, char **units);
3970-epicsShareFunc int
3971+LIBCOM_API int
3972 epicsParseUInt8(const char *str, epicsUInt8 *to, int base, char **units);
3973-epicsShareFunc int
3974+LIBCOM_API int
3975 epicsParseInt16(const char *str, epicsInt16 *to, int base, char **units);
3976-epicsShareFunc int
3977+LIBCOM_API int
3978 epicsParseUInt16(const char *str, epicsUInt16 *to, int base, char **units);
3979
3980-epicsShareFunc int
3981+LIBCOM_API int
3982 epicsParseInt32(const char *str, epicsInt32 *to, int base, char **units);
3983-epicsShareFunc int
3984+LIBCOM_API int
3985 epicsParseUInt32(const char *str, epicsUInt32 *to, int base, char **units);
3986
3987-epicsShareFunc int
3988+LIBCOM_API int
3989 epicsParseInt64(const char *str, epicsInt64 *to, int base, char **units);
3990-epicsShareFunc int
3991+LIBCOM_API int
3992 epicsParseUInt64(const char *str, epicsUInt64 *to, int base, char **units);
3993
3994 #define epicsParseFloat32(str, to, units) epicsParseFloat(str, to, units)
3995diff --git a/modules/libcom/src/misc/epicsString.c b/modules/libcom/src/misc/epicsString.c
3996index e41e21b..3f537b4 100644
3997--- a/modules/libcom/src/misc/epicsString.c
3998+++ b/modules/libcom/src/misc/epicsString.c
3999@@ -22,7 +22,6 @@
4000 #include <errno.h>
4001 #include <ctype.h>
4002
4003-#define epicsExportSharedSymbols
4004 #include "epicsStdio.h"
4005 #include "cantProceed.h"
4006 #include "epicsString.h"
4007diff --git a/modules/libcom/src/misc/epicsString.h b/modules/libcom/src/misc/epicsString.h
4008index 093c73d..79e5f49 100644
4009--- a/modules/libcom/src/misc/epicsString.h
4010+++ b/modules/libcom/src/misc/epicsString.h
4011@@ -17,32 +17,32 @@
4012
4013 #include <stdio.h>
4014 #include "epicsTypes.h"
4015-#include "shareLib.h"
4016+#include "libComAPI.h"
4017
4018 #ifdef __cplusplus
4019 extern "C" {
4020 #endif
4021
4022-epicsShareFunc int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
4023+LIBCOM_API int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
4024 const char *inbuf, size_t inlen);
4025-epicsShareFunc int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize,
4026+LIBCOM_API int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize,
4027 const char *inbuf, size_t inlen);
4028-epicsShareFunc size_t epicsStrnEscapedFromRawSize(const char *buf, size_t len);
4029-epicsShareFunc int epicsStrCaseCmp(const char *s1, const char *s2);
4030-epicsShareFunc int epicsStrnCaseCmp(const char *s1, const char *s2, size_t len);
4031-epicsShareFunc char * epicsStrDup(const char *s);
4032-epicsShareFunc char * epicsStrnDup(const char *s, size_t len);
4033-epicsShareFunc int epicsStrPrintEscaped(FILE *fp, const char *s, size_t n);
4034+LIBCOM_API size_t epicsStrnEscapedFromRawSize(const char *buf, size_t len);
4035+LIBCOM_API int epicsStrCaseCmp(const char *s1, const char *s2);
4036+LIBCOM_API int epicsStrnCaseCmp(const char *s1, const char *s2, size_t len);
4037+LIBCOM_API char * epicsStrDup(const char *s);
4038+LIBCOM_API char * epicsStrnDup(const char *s, size_t len);
4039+LIBCOM_API int epicsStrPrintEscaped(FILE *fp, const char *s, size_t n);
4040 #define epicsStrSnPrintEscaped epicsStrnEscapedFromRaw
4041-epicsShareFunc size_t epicsStrnLen(const char *s, size_t maxlen);
4042-epicsShareFunc int epicsStrGlobMatch(const char *str, const char *pattern);
4043-epicsShareFunc char * epicsStrtok_r(char *s, const char *delim, char **lasts);
4044-epicsShareFunc unsigned int epicsStrHash(const char *str, unsigned int seed);
4045-epicsShareFunc unsigned int epicsMemHash(const char *str, size_t length,
4046+LIBCOM_API size_t epicsStrnLen(const char *s, size_t maxlen);
4047+LIBCOM_API int epicsStrGlobMatch(const char *str, const char *pattern);
4048+LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
4049+LIBCOM_API unsigned int epicsStrHash(const char *str, unsigned int seed);
4050+LIBCOM_API unsigned int epicsMemHash(const char *str, size_t length,
4051 unsigned int seed);
4052
4053 /* dbTranslateEscape is deprecated, use epicsStrnRawFromEscaped instead */
4054-epicsShareFunc int dbTranslateEscape(char *s, const char *ct);
4055+LIBCOM_API int dbTranslateEscape(char *s, const char *ct);
4056
4057 #ifdef __cplusplus
4058 }
4059diff --git a/modules/libcom/src/misc/epicsTypes.h b/modules/libcom/src/misc/epicsTypes.h
4060index efc6a91..399cb96 100644
4061--- a/modules/libcom/src/misc/epicsTypes.h
4062+++ b/modules/libcom/src/misc/epicsTypes.h
4063@@ -15,7 +15,7 @@
4064 #ifndef INC_epicsTypes_H
4065 #define INC_epicsTypes_H
4066
4067-#include "shareLib.h"
4068+#include "libComAPI.h"
4069 #include "compilerDependencies.h"
4070
4071 #ifndef stringOf
4072@@ -120,7 +120,7 @@ typedef enum {
4073 * of type name strings.
4074 */
4075 #ifdef epicsTypesGLOBAL
4076-epicsShareDef const char *epicsTypeNames [lastEpicsType+1] = {
4077+const char *epicsTypeNames [lastEpicsType+1] = {
4078 "epicsInt8",
4079 "epicsUInt8",
4080 "epicsInt16",
4081@@ -134,7 +134,7 @@ epicsShareDef const char *epicsTypeNames [lastEpicsType+1] = {
4082 "epicsOldString",
4083 };
4084 #else /* epicsTypesGLOBAL */
4085-epicsShareExtern const char *epicsTypeNames [lastEpicsType+1];
4086+LIBCOM_API extern const char *epicsTypeNames [lastEpicsType+1];
4087 #endif /* epicsTypesGLOBAL */
4088
4089 /*
4090@@ -142,7 +142,7 @@ epicsShareExtern const char *epicsTypeNames [lastEpicsType+1];
4091 * of type code name strings.
4092 */
4093 #ifdef epicsTypesGLOBAL
4094-epicsShareDef const char *epicsTypeCodeNames [lastEpicsType+1] = {
4095+const char *epicsTypeCodeNames [lastEpicsType+1] = {
4096 "epicsInt8T",
4097 "epicsUInt8T",
4098 "epicsInt16T",
4099@@ -156,11 +156,11 @@ epicsShareDef const char *epicsTypeCodeNames [lastEpicsType+1] = {
4100 "epicsOldStringT",
4101 };
4102 #else /* epicsTypesGLOBAL */
4103-epicsShareExtern const char *epicsTypeCodeNames [lastEpicsType+1];
4104+LIBCOM_API extern const char *epicsTypeCodeNames [lastEpicsType+1];
4105 #endif /* epicsTypesGLOBAL */
4106
4107 #ifdef epicsTypesGLOBAL
4108-epicsShareDef const unsigned epicsTypeSizes [lastEpicsType+1] = {
4109+const unsigned epicsTypeSizes [lastEpicsType+1] = {
4110 sizeof (epicsInt8),
4111 sizeof (epicsUInt8),
4112 sizeof (epicsInt16),
4113@@ -174,7 +174,7 @@ epicsShareDef const unsigned epicsTypeSizes [lastEpicsType+1] = {
4114 sizeof (epicsOldString),
4115 };
4116 #else /* epicsTypesGLOBAL */
4117-epicsShareExtern const unsigned epicsTypeSizes [lastEpicsType+1];
4118+LIBCOM_API extern const unsigned epicsTypeSizes [lastEpicsType+1];
4119 #endif /* epicsTypesGLOBAL */
4120
4121 /*
4122@@ -191,7 +191,7 @@ typedef enum {
4123 } epicsTypeClass;
4124
4125 #ifdef epicsTypesGLOBAL
4126-epicsShareDef const epicsTypeClass epicsTypeClasses [lastEpicsType+1] = {
4127+const epicsTypeClass epicsTypeClasses [lastEpicsType+1] = {
4128 epicsIntC,
4129 epicsUIntC,
4130 epicsIntC,
4131@@ -205,12 +205,12 @@ epicsShareDef const epicsTypeClass epicsTypeClasses [lastEpicsType+1] = {
4132 epicsOldStringC
4133 };
4134 #else /* epicsTypesGLOBAL */
4135-epicsShareExtern const epicsTypeClass epicsTypeClasses [lastEpicsType+1];
4136+LIBCOM_API extern const epicsTypeClass epicsTypeClasses [lastEpicsType+1];
4137 #endif /* epicsTypesGLOBAL */
4138
4139
4140 #ifdef epicsTypesGLOBAL
4141-epicsShareDef const char *epicsTypeAnyFieldName [lastEpicsType+1] = {
4142+const char *epicsTypeAnyFieldName [lastEpicsType+1] = {
4143 "int8",
4144 "uInt8",
4145 "int16",
4146@@ -224,7 +224,7 @@ epicsShareDef const char *epicsTypeAnyFieldName [lastEpicsType+1] = {
4147 "", /* Old Style Strings will not be in epicsAny type */
4148 };
4149 #else /* epicsTypesGLOBAL */
4150-epicsShareExtern const char *epicsTypeAnyFieldName [lastEpicsType+1];
4151+LIBCOM_API extern const char *epicsTypeAnyFieldName [lastEpicsType+1];
4152 #endif /* epicsTypesGLOBAL */
4153
4154 #endif /* INC_epicsTypes_H */
4155diff --git a/modules/libcom/src/misc/epicsUnitTest.c b/modules/libcom/src/misc/epicsUnitTest.c
4156index dce0598..2478989 100644
4157--- a/modules/libcom/src/misc/epicsUnitTest.c
4158+++ b/modules/libcom/src/misc/epicsUnitTest.c
4159@@ -20,7 +20,6 @@
4160 # include <crtdbg.h>
4161 #endif
4162
4163-#define epicsExportSharedSymbols
4164 #include "epicsThread.h"
4165 #include "epicsMutex.h"
4166 #include "epicsUnitTest.h"
4167diff --git a/modules/libcom/src/misc/epicsUnitTest.h b/modules/libcom/src/misc/epicsUnitTest.h
4168index 9a119ad..88555e0 100644
4169--- a/modules/libcom/src/misc/epicsUnitTest.h
4170+++ b/modules/libcom/src/misc/epicsUnitTest.h
4171@@ -15,36 +15,36 @@
4172 #include <stdarg.h>
4173
4174 #include "compilerDependencies.h"
4175-#include "shareLib.h"
4176+#include "libComAPI.h"
4177
4178 #ifdef __cplusplus
4179 extern "C" {
4180 #endif
4181
4182-epicsShareFunc void testPlan(int tests);
4183-epicsShareFunc int testOkV(int pass, const char *fmt, va_list pvar);
4184-epicsShareFunc int testOk(int pass, const char *fmt, ...)
4185+LIBCOM_API void testPlan(int tests);
4186+LIBCOM_API int testOkV(int pass, const char *fmt, va_list pvar);
4187+LIBCOM_API int testOk(int pass, const char *fmt, ...)
4188 EPICS_PRINTF_STYLE(2, 3);
4189-epicsShareFunc void testPass(const char *fmt, ...)
4190+LIBCOM_API void testPass(const char *fmt, ...)
4191 EPICS_PRINTF_STYLE(1, 2);
4192-epicsShareFunc void testFail(const char *fmt, ...)
4193+LIBCOM_API void testFail(const char *fmt, ...)
4194 EPICS_PRINTF_STYLE(1, 2);
4195-epicsShareFunc void testSkip(int skip, const char *why);
4196-epicsShareFunc void testTodoBegin(const char *why);
4197-epicsShareFunc void testTodoEnd(void);
4198-epicsShareFunc int testDiag(const char *fmt, ...)
4199+LIBCOM_API void testSkip(int skip, const char *why);
4200+LIBCOM_API void testTodoBegin(const char *why);
4201+LIBCOM_API void testTodoEnd(void);
4202+LIBCOM_API int testDiag(const char *fmt, ...)
4203 EPICS_PRINTF_STYLE(1, 2);
4204-epicsShareFunc void testAbort(const char *fmt, ...)
4205+LIBCOM_API void testAbort(const char *fmt, ...)
4206 EPICS_PRINTF_STYLE(1, 2);
4207-epicsShareFunc int testDone(void);
4208+LIBCOM_API int testDone(void);
4209
4210 #define testOk1(cond) testOk(cond, "%s", #cond)
4211
4212
4213 typedef int (*TESTFUNC)(void);
4214-epicsShareFunc void testHarness(void);
4215-epicsShareFunc void testHarnessExit(void *dummy);
4216-epicsShareFunc void runTestFunc(const char *name, TESTFUNC func);
4217+LIBCOM_API void testHarness(void);
4218+LIBCOM_API void testHarnessExit(void *dummy);
4219+LIBCOM_API void runTestFunc(const char *name, TESTFUNC func);
4220
4221 #define runTest(func) runTestFunc(#func, func)
4222 #define testHarnessDone() testHarnessExit(0)
4223diff --git a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp
4224index ec2c16d..4698a7a 100644
4225--- a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp
4226+++ b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.cpp
4227@@ -21,7 +21,6 @@
4228 //#define EPICS_FREELIST_DEBUG
4229 #define EPICS_PRIVATE_API
4230
4231-#define epicsExportSharedSymbols
4232 #include "ipAddrToAsciiAsynchronous.h"
4233 #include "epicsThread.h"
4234 #include "epicsMutex.h"
4235diff --git a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h
4236index 9aefca4..64a0efa 100644
4237--- a/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h
4238+++ b/modules/libcom/src/misc/ipAddrToAsciiAsynchronous.h
4239@@ -17,16 +17,16 @@
4240 #define ipAddrToAsciiAsynchronous_h
4241
4242 #include "osiSock.h"
4243-#include "shareLib.h"
4244+#include "libComAPI.h"
4245
4246-class epicsShareClass ipAddrToAsciiCallBack {
4247+class LIBCOM_API ipAddrToAsciiCallBack {
4248 public:
4249 virtual void transactionComplete ( const char * pHostName ) = 0;
4250 virtual void show ( unsigned level ) const;
4251 virtual ~ipAddrToAsciiCallBack () = 0;
4252 };
4253
4254-class epicsShareClass ipAddrToAsciiTransaction {
4255+class LIBCOM_API ipAddrToAsciiTransaction {
4256 public:
4257 virtual void release () = 0;
4258 virtual void ipAddrToAscii ( const osiSockAddr &, ipAddrToAsciiCallBack & ) = 0;
4259@@ -36,7 +36,7 @@ protected:
4260 virtual ~ipAddrToAsciiTransaction () = 0;
4261 };
4262
4263-class epicsShareClass ipAddrToAsciiEngine {
4264+class LIBCOM_API ipAddrToAsciiEngine {
4265 public:
4266 virtual void release () = 0;
4267 virtual ipAddrToAsciiTransaction & createTransaction () = 0;
4268diff --git a/modules/libcom/src/misc/shareLib.h b/modules/libcom/src/misc/shareLib.h
4269index 0d376d6..6935cdc 100644
4270--- a/modules/libcom/src/misc/shareLib.h
4271+++ b/modules/libcom/src/misc/shareLib.h
4272@@ -87,8 +87,8 @@
4273 *
4274 * #ifdef interfacePDQ_epicsExportSharedSymbols
4275 * # define epicsExportSharedSymbols
4276- * # include "shareLib.h"
4277 * #endif
4278+ * #include "shareLib.h"
4279 *
4280 * epicsShareFunc int myExtFunc ( int arg );
4281 * epicsShareExtern int myExtVar;
4282diff --git a/modules/libcom/src/misc/truncateFile.c b/modules/libcom/src/misc/truncateFile.c
4283index dc074d9..4271867 100644
4284--- a/modules/libcom/src/misc/truncateFile.c
4285+++ b/modules/libcom/src/misc/truncateFile.c
4286@@ -14,7 +14,6 @@
4287 #include <string.h>
4288 #include <limits.h>
4289
4290-#define epicsExportSharedSymbols
4291 #include "epicsStdio.h"
4292
4293 #ifndef SEEK_END
4294@@ -25,7 +24,7 @@
4295 * truncate to specified size (we dont use truncate()
4296 * because it is not portable)
4297 */
4298-epicsShareFunc enum TF_RETURN truncateFile (const char *pFileName, unsigned long size)
4299+LIBCOM_API enum TF_RETURN truncateFile (const char *pFileName, unsigned long size)
4300 {
4301 long filePos;
4302 FILE *pFile;
4303diff --git a/modules/libcom/src/misc/unixFileName.h b/modules/libcom/src/misc/unixFileName.h
4304index 9d7af25..0abfae3 100644
4305--- a/modules/libcom/src/misc/unixFileName.h
4306+++ b/modules/libcom/src/misc/unixFileName.h
4307@@ -14,7 +14,7 @@
4308 #ifndef unixFileNameH
4309 #define unixFileNameH
4310
4311-#include <shareLib.h>
4312+#include <libComAPI.h>
4313
4314 #ifdef __cplusplus
4315 extern "C" {
4316@@ -26,13 +26,13 @@ extern "C" {
4317 /** Return the absolute path of the current executable.
4318 @returns NULL or the path. Caller must free()
4319 */
4320-epicsShareFunc
4321+LIBCOM_API
4322 char *epicsGetExecName(void);
4323
4324 /** Return the absolute path of the directory containing the current executable.
4325 @returns NULL or the path. Caller must free()
4326 */
4327-epicsShareFunc
4328+LIBCOM_API
4329 char *epicsGetExecDir(void);
4330
4331 #ifdef __cplusplus
4332diff --git a/modules/libcom/src/osi/devLibVME.c b/modules/libcom/src/osi/devLibVME.c
4333index 6c7d93f..72e29d6 100644
4334--- a/modules/libcom/src/osi/devLibVME.c
4335+++ b/modules/libcom/src/osi/devLibVME.c
4336@@ -23,7 +23,6 @@
4337 #include <stdio.h>
4338 #include <stdlib.h>
4339
4340-#define epicsExportSharedSymbols
4341 #include "dbDefs.h"
4342 #include "epicsMutex.h"
4343 #include "errlog.h"
4344diff --git a/modules/libcom/src/osi/devLibVME.h b/modules/libcom/src/osi/devLibVME.h
4345index 4fb17f0..2603770 100644
4346--- a/modules/libcom/src/osi/devLibVME.h
4347+++ b/modules/libcom/src/osi/devLibVME.h
4348@@ -20,7 +20,7 @@
4349 #include "dbDefs.h"
4350 #include "osdVME.h"
4351 #include "errMdef.h"
4352-#include "shareLib.h"
4353+#include "libComAPI.h"
4354 #include "devLib.h"
4355
4356 #ifdef __cplusplus
4357@@ -44,7 +44,7 @@ typedef enum {
4358 * pointer to an array of strings for each of
4359 * the above address types
4360 */
4361-epicsShareExtern const char *epicsAddressTypeName[];
4362+LIBCOM_API extern const char *epicsAddressTypeName[];
4363
4364 #ifdef __cplusplus
4365 }
4366@@ -67,14 +67,14 @@ extern "C" {
4367 * This section applies to all bus types
4368 */
4369
4370-epicsShareFunc long devAddressMap(void); /* print an address map */
4371+LIBCOM_API long devAddressMap(void); /* print an address map */
4372
4373 /*
4374 * devBusToLocalAddr()
4375 *
4376 * OSI routine to translate bus addresses their local CPU address mapping
4377 */
4378-epicsShareFunc long devBusToLocalAddr (
4379+LIBCOM_API long devBusToLocalAddr (
4380 epicsAddressType addrType,
4381 size_t busAddr,
4382 volatile void **ppLocalAddr);
4383@@ -84,7 +84,7 @@ epicsShareFunc long devBusToLocalAddr (
4384 * a bus error safe "wordSize" read at the specified address which returns
4385 * unsuccessful status if the device isnt present
4386 */
4387-epicsShareFunc long devReadProbe (
4388+LIBCOM_API long devReadProbe (
4389 unsigned wordSize, volatile const void *ptr, void *pValueRead);
4390
4391 /*
4392@@ -97,7 +97,7 @@ epicsShareFunc long devReadProbe (
4393 * Checks all naturally aligned word sizes between char and long for
4394 * the entire specified range of bytes.
4395 */
4396-epicsShareFunc long devNoResponseProbe(
4397+LIBCOM_API long devNoResponseProbe(
4398 epicsAddressType addrType,
4399 size_t base,
4400 size_t size
4401@@ -109,17 +109,17 @@ epicsShareFunc long devNoResponseProbe(
4402 * a bus error safe "wordSize" write at the specified address which returns
4403 * unsuccessful status if the device isnt present
4404 */
4405-epicsShareFunc long devWriteProbe (
4406+LIBCOM_API long devWriteProbe (
4407 unsigned wordSize, volatile void *ptr, const void *pValueWritten);
4408
4409-epicsShareFunc long devRegisterAddress(
4410+LIBCOM_API long devRegisterAddress(
4411 const char *pOwnerName,
4412 epicsAddressType addrType,
4413 size_t logicalBaseAddress,
4414 size_t size, /* bytes */
4415 volatile void **pPhysicalAddress);
4416
4417-epicsShareFunc long devUnregisterAddress(
4418+LIBCOM_API long devUnregisterAddress(
4419 epicsAddressType addrType,
4420 size_t logicalBaseAddress,
4421 const char *pOwnerName);
4422@@ -127,7 +127,7 @@ epicsShareFunc long devUnregisterAddress(
4423 /*
4424 * allocate and register an unoccupied address block
4425 */
4426-epicsShareFunc long devAllocAddress(
4427+LIBCOM_API long devAllocAddress(
4428 const char *pOwnerName,
4429 epicsAddressType addrType,
4430 size_t size,
4431@@ -143,7 +143,7 @@ epicsShareFunc long devAllocAddress(
4432 /*
4433 * connect ISR to a VME interrupt vector
4434 */
4435-epicsShareFunc long devConnectInterruptVME(
4436+LIBCOM_API long devConnectInterruptVME(
4437 unsigned vectorNumber,
4438 void (*pFunction)(void *),
4439 void *parameter);
4440@@ -155,7 +155,7 @@ epicsShareFunc long devConnectInterruptVME(
4441 * was connected. It is used as a key to prevent a driver from inadvertently
4442 * removing an interrupt handler that it didn't install
4443 */
4444-epicsShareFunc long devDisconnectInterruptVME(
4445+LIBCOM_API long devDisconnectInterruptVME(
4446 unsigned vectorNumber,
4447 void (*pFunction)(void *));
4448
4449@@ -164,25 +164,25 @@ epicsShareFunc long devDisconnectInterruptVME(
4450 *
4451 * returns boolean
4452 */
4453-epicsShareFunc int devInterruptInUseVME (unsigned vectorNumber);
4454+LIBCOM_API int devInterruptInUseVME (unsigned vectorNumber);
4455
4456 /*
4457 * enable VME interrupt level
4458 */
4459-epicsShareFunc long devEnableInterruptLevelVME (unsigned level);
4460+LIBCOM_API long devEnableInterruptLevelVME (unsigned level);
4461
4462 /*
4463 * disable VME interrupt level
4464 */
4465-epicsShareFunc long devDisableInterruptLevelVME (unsigned level);
4466+LIBCOM_API long devDisableInterruptLevelVME (unsigned level);
4467
4468 /*
4469 * Routines to allocate and free memory in the A24 memory region.
4470 *
4471 */
4472-epicsShareFunc void *devLibA24Malloc(size_t);
4473-epicsShareFunc void *devLibA24Calloc(size_t);
4474-epicsShareFunc void devLibA24Free(void *pBlock);
4475+LIBCOM_API void *devLibA24Malloc(size_t);
4476+LIBCOM_API void *devLibA24Calloc(size_t);
4477+LIBCOM_API void devLibA24Free(void *pBlock);
4478
4479 /*
4480 * ISA API
4481@@ -195,7 +195,7 @@ epicsShareFunc void devLibA24Free(void *pBlock);
4482 * (not implemented)
4483 * (API should be reviewed)
4484 */
4485-epicsShareFunc long devConnectInterruptISA(
4486+LIBCOM_API long devConnectInterruptISA(
4487 unsigned interruptLevel,
4488 void (*pFunction)(void *),
4489 void *parameter);
4490@@ -209,7 +209,7 @@ epicsShareFunc long devConnectInterruptISA(
4491 * was connected. It is used as a key to prevent a driver from inadvertently
4492 * removing an interrupt handler that it didn't install
4493 */
4494-epicsShareFunc long devDisconnectInterruptISA(
4495+LIBCOM_API long devDisconnectInterruptISA(
4496 unsigned interruptLevel,
4497 void (*pFunction)(void *));
4498
4499@@ -219,17 +219,17 @@ epicsShareFunc long devDisconnectInterruptISA(
4500 *
4501 * returns boolean
4502 */
4503-epicsShareFunc int devInterruptLevelInUseISA (unsigned interruptLevel);
4504+LIBCOM_API int devInterruptLevelInUseISA (unsigned interruptLevel);
4505
4506 /*
4507 * enable ISA interrupt level
4508 */
4509-epicsShareFunc long devEnableInterruptLevelISA (unsigned level);
4510+LIBCOM_API long devEnableInterruptLevelISA (unsigned level);
4511
4512 /*
4513 * disable ISA interrupt level
4514 */
4515-epicsShareFunc long devDisableInterruptLevelISA (unsigned level);
4516+LIBCOM_API long devDisableInterruptLevelISA (unsigned level);
4517
4518 /*
4519 * Deprecated interface
4520@@ -247,7 +247,7 @@ typedef enum {intVME, intVXI, intISA} epicsInterruptType;
4521 * devConnectInterruptISA etc. devConnectInterrupt will be removed
4522 * in a future release.
4523 */
4524-epicsShareFunc long devConnectInterrupt(
4525+LIBCOM_API long devConnectInterrupt(
4526 epicsInterruptType intType,
4527 unsigned vectorNumber,
4528 void (*pFunction)(void *),
4529@@ -261,7 +261,7 @@ epicsShareFunc long devConnectInterrupt(
4530 * devDisconnectInterruptISA etc. devDisconnectInterrupt will be removed
4531 * in a future release.
4532 */
4533-epicsShareFunc long devDisconnectInterrupt(
4534+LIBCOM_API long devDisconnectInterrupt(
4535 epicsInterruptType intType,
4536 unsigned vectorNumber,
4537 void (*pFunction)(void *));
4538@@ -274,7 +274,7 @@ epicsShareFunc long devDisconnectInterrupt(
4539 * devEnableInterruptLevelISA etc. devEnableInterruptLevel will be removed
4540 * in a future release.
4541 */
4542-epicsShareFunc long devEnableInterruptLevel(
4543+LIBCOM_API long devEnableInterruptLevel(
4544 epicsInterruptType intType, unsigned level);
4545
4546 /*
4547@@ -285,7 +285,7 @@ epicsShareFunc long devEnableInterruptLevel(
4548 * devDisableInterruptLevelPCI etc. devDisableInterruptLevel will be removed
4549 * in a future release.
4550 */
4551-epicsShareFunc long devDisableInterruptLevel (
4552+LIBCOM_API long devDisableInterruptLevel (
4553 epicsInterruptType intType, unsigned level);
4554
4555 /*
4556@@ -295,7 +295,7 @@ epicsShareFunc long devDisableInterruptLevel (
4557 * Please use devNoResponseProbe(). locationProbe() will be removed
4558 * in a future release.
4559 */
4560-epicsShareFunc long locationProbe (epicsAddressType addrType, char *pLocation);
4561+LIBCOM_API long locationProbe (epicsAddressType addrType, char *pLocation);
4562
4563 #endif /* NO_DEVLIB_OLD_INTERFACE */
4564
4565diff --git a/modules/libcom/src/osi/devLibVMEImpl.h b/modules/libcom/src/osi/devLibVMEImpl.h
4566index e479d86..e8312ea 100644
4567--- a/modules/libcom/src/osi/devLibVMEImpl.h
4568+++ b/modules/libcom/src/osi/devLibVMEImpl.h
4569@@ -20,7 +20,7 @@
4570 #define INCdevLibImplh 1
4571
4572 #include "dbDefs.h"
4573-#include "shareLib.h"
4574+#include "libComAPI.h"
4575 #include "devLib.h"
4576
4577 #ifdef __cplusplus
4578@@ -89,7 +89,7 @@ typedef struct devLibVME {
4579 int (*pDevInterruptInUseVME) (unsigned vectorNumber);
4580 }devLibVME;
4581
4582-epicsShareExtern devLibVME *pdevLibVME;
4583+LIBCOM_API extern devLibVME *pdevLibVME;
4584
4585 #ifndef NO_DEVLIB_COMPAT
4586 # define pdevLibVirtualOS pdevLibVME
4587diff --git a/modules/libcom/src/osi/epicsAssert.h b/modules/libcom/src/osi/epicsAssert.h
4588index 6f83d3a..2c88de0 100644
4589--- a/modules/libcom/src/osi/epicsAssert.h
4590+++ b/modules/libcom/src/osi/epicsAssert.h
4591@@ -16,7 +16,7 @@
4592 #ifndef INC_epicsAssert_H
4593 #define INC_epicsAssert_H
4594
4595-#include "shareLib.h"
4596+#include "libComAPI.h"
4597 #include "compilerDependencies.h"
4598
4599 #ifdef __cplusplus
4600@@ -34,7 +34,7 @@ extern "C" {
4601 # define assert(ignore) ((void) 0)
4602 #else /* NDEBUG */
4603
4604-epicsShareFunc void epicsAssert (const char *pFile, const unsigned line,
4605+LIBCOM_API void epicsAssert (const char *pFile, const unsigned line,
4606 const char *pExp, const char *pAuthorName);
4607
4608 # define assert(exp) ((exp) ? (void)0 : \
4609diff --git a/modules/libcom/src/osi/epicsAtomicDefault.h b/modules/libcom/src/osi/epicsAtomicDefault.h
4610index 26115ce..9ae98ef 100644
4611--- a/modules/libcom/src/osi/epicsAtomicDefault.h
4612+++ b/modules/libcom/src/osi/epicsAtomicDefault.h
4613@@ -22,10 +22,10 @@ extern "C" {
4614
4615 /*
4616 * struct EpicsAtomicLockKey;
4617- * epicsShareFunc void epicsAtomicReadMemoryBarrier ();
4618- * epicsShareFunc void epicsAtomicWriteMemoryBarrier ();
4619- * epicsShareFunc void epicsAtomicLock ( struct EpicsAtomicLockKey * );
4620- * epicsShareFunc void epicsAtomicUnock ( struct EpicsAtomicLockKey * );
4621+ * LIBCOM_API void epicsAtomicReadMemoryBarrier ();
4622+ * LIBCOM_API void epicsAtomicWriteMemoryBarrier ();
4623+ * LIBCOM_API void epicsAtomicLock ( struct EpicsAtomicLockKey * );
4624+ * LIBCOM_API void epicsAtomicUnock ( struct EpicsAtomicLockKey * );
4625 */
4626
4627 /*
4628diff --git a/modules/libcom/src/osi/epicsEvent.cpp b/modules/libcom/src/osi/epicsEvent.cpp
4629index 237f7d2..7baec77 100644
4630--- a/modules/libcom/src/osi/epicsEvent.cpp
4631+++ b/modules/libcom/src/osi/epicsEvent.cpp
4632@@ -13,7 +13,6 @@
4633 #include <new>
4634 #include <exception>
4635
4636-#define epicsExportSharedSymbols
4637 #include "epicsEvent.h"
4638 #include "epicsStdio.h"
4639 #include "cantProceed.h"
4640@@ -104,7 +103,7 @@ void epicsEvent::show ( unsigned level ) const
4641
4642 extern "C" {
4643
4644-epicsShareFunc epicsEventId epicsEventMustCreate (
4645+LIBCOM_API epicsEventId epicsEventMustCreate (
4646 epicsEventInitialState initialState)
4647 {
4648 epicsEventId id = epicsEventCreate (initialState);
4649@@ -114,14 +113,14 @@ epicsShareFunc epicsEventId epicsEventMustCreate (
4650 return id;
4651 }
4652
4653-epicsShareFunc void epicsEventMustTrigger (epicsEventId id) {
4654+LIBCOM_API void epicsEventMustTrigger (epicsEventId id) {
4655 epicsEventStatus status = epicsEventTrigger (id);
4656
4657 if (status != epicsEventOK)
4658 cantProceed ("epicsEventMustTrigger");
4659 }
4660
4661-epicsShareFunc void epicsEventMustWait (epicsEventId id) {
4662+LIBCOM_API void epicsEventMustWait (epicsEventId id) {
4663 epicsEventStatus status = epicsEventWait (id);
4664
4665 if (status != epicsEventOK)
4666diff --git a/modules/libcom/src/osi/epicsEvent.h b/modules/libcom/src/osi/epicsEvent.h
4667index e77d9a5..8a5eef2 100644
4668--- a/modules/libcom/src/osi/epicsEvent.h
4669+++ b/modules/libcom/src/osi/epicsEvent.h
4670@@ -9,7 +9,7 @@
4671 #ifndef epicsEventh
4672 #define epicsEventh
4673
4674-#include "shareLib.h"
4675+#include "libComAPI.h"
4676
4677 typedef struct epicsEventOSD *epicsEventId;
4678
4679@@ -31,7 +31,7 @@ typedef enum {
4680
4681 #ifdef __cplusplus
4682
4683-class epicsShareClass epicsEvent {
4684+class LIBCOM_API epicsEvent {
4685 public:
4686 epicsEvent ( epicsEventInitialState initial = epicsEventEmpty );
4687 ~epicsEvent ();
4688@@ -52,23 +52,23 @@ private:
4689 extern "C" {
4690 #endif /*__cplusplus */
4691
4692-epicsShareFunc epicsEventId epicsEventCreate(
4693+LIBCOM_API epicsEventId epicsEventCreate(
4694 epicsEventInitialState initialState);
4695-epicsShareFunc epicsEventId epicsEventMustCreate (
4696+LIBCOM_API epicsEventId epicsEventMustCreate (
4697 epicsEventInitialState initialState);
4698-epicsShareFunc void epicsEventDestroy(epicsEventId id);
4699-epicsShareFunc epicsEventStatus epicsEventTrigger(
4700+LIBCOM_API void epicsEventDestroy(epicsEventId id);
4701+LIBCOM_API epicsEventStatus epicsEventTrigger(
4702 epicsEventId id);
4703-epicsShareFunc void epicsEventMustTrigger(epicsEventId id);
4704+LIBCOM_API void epicsEventMustTrigger(epicsEventId id);
4705 #define epicsEventSignal(ID) epicsEventMustTrigger(ID)
4706-epicsShareFunc epicsEventStatus epicsEventWait(
4707+LIBCOM_API epicsEventStatus epicsEventWait(
4708 epicsEventId id);
4709-epicsShareFunc void epicsEventMustWait(epicsEventId id);
4710-epicsShareFunc epicsEventStatus epicsEventWaitWithTimeout(
4711+LIBCOM_API void epicsEventMustWait(epicsEventId id);
4712+LIBCOM_API epicsEventStatus epicsEventWaitWithTimeout(
4713 epicsEventId id, double timeOut);
4714-epicsShareFunc epicsEventStatus epicsEventTryWait(
4715+LIBCOM_API epicsEventStatus epicsEventTryWait(
4716 epicsEventId id);
4717-epicsShareFunc void epicsEventShow(
4718+LIBCOM_API void epicsEventShow(
4719 epicsEventId id, unsigned int level);
4720
4721 #ifdef __cplusplus
4722diff --git a/modules/libcom/src/osi/epicsFindSymbol.h b/modules/libcom/src/osi/epicsFindSymbol.h
4723index 9935834..e457004 100644
4724--- a/modules/libcom/src/osi/epicsFindSymbol.h
4725+++ b/modules/libcom/src/osi/epicsFindSymbol.h
4726@@ -13,11 +13,11 @@
4727 extern "C" {
4728 #endif
4729
4730-#include "shareLib.h"
4731+#include "libComAPI.h"
4732
4733-epicsShareFunc void * epicsLoadLibrary(const char *name);
4734-epicsShareFunc const char *epicsLoadError(void);
4735-epicsShareFunc void * epicsShareAPI epicsFindSymbol(const char *name);
4736+LIBCOM_API void * epicsLoadLibrary(const char *name);
4737+LIBCOM_API const char *epicsLoadError(void);
4738+LIBCOM_API void * LIBCOMSTD_API epicsFindSymbol(const char *name);
4739
4740 #ifdef __cplusplus
4741 }
4742diff --git a/modules/libcom/src/osi/epicsGeneralTime.c b/modules/libcom/src/osi/epicsGeneralTime.c
4743index 87158d9..9735307 100644
4744--- a/modules/libcom/src/osi/epicsGeneralTime.c
4745+++ b/modules/libcom/src/osi/epicsGeneralTime.c
4746@@ -12,7 +12,6 @@
4747 #include <string.h>
4748 #include <stdlib.h>
4749
4750-#define epicsExportSharedSymbols
4751 #include "epicsTypes.h"
4752 #include "epicsEvent.h"
4753 #include "epicsMutex.h"
4754@@ -150,7 +149,7 @@ int generalTimeGetExceptPriority(epicsTimeStamp *pDest, int *pPrio, int ignore)
4755 return status;
4756 }
4757
4758-int epicsShareAPI epicsTimeGetCurrent(epicsTimeStamp *pDest)
4759+int LIBCOMSTD_API epicsTimeGetCurrent(epicsTimeStamp *pDest)
4760 {
4761 gtProvider *ptp;
4762 int status = S_time_noProvider;
4763@@ -339,7 +338,7 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
4764 return status;
4765 }
4766
4767-int epicsShareAPI epicsTimeGetEvent(epicsTimeStamp *pDest, int eventNumber)
4768+int LIBCOMSTD_API epicsTimeGetEvent(epicsTimeStamp *pDest, int eventNumber)
4769 {
4770 if (eventNumber == epicsTimeEventCurrentTime) {
4771 return epicsTimeGetCurrent(pDest);
4772diff --git a/modules/libcom/src/osi/epicsGeneralTime.h b/modules/libcom/src/osi/epicsGeneralTime.h
4773index 6bbb0b2..c6eda8c 100644
4774--- a/modules/libcom/src/osi/epicsGeneralTime.h
4775+++ b/modules/libcom/src/osi/epicsGeneralTime.h
4776@@ -10,7 +10,7 @@
4777 #ifndef INC_epicsGeneralTime_H
4778 #define INC_epicsGeneralTime_H
4779
4780-#include "shareLib.h"
4781+#include "libComAPI.h"
4782
4783 #ifdef __cplusplus
4784 extern "C" {
4785@@ -23,22 +23,22 @@ extern "C" {
4786 /* NUM_TIME_EVENTS are now allowed if supported by a custom time provider */
4787 /* which should provide its own advancing timestamp validation. */
4788
4789-epicsShareFunc void generalTime_Init(void);
4790+LIBCOM_API void generalTime_Init(void);
4791
4792-epicsShareFunc int installLastResortEventProvider(void);
4793+LIBCOM_API int installLastResortEventProvider(void);
4794
4795-epicsShareFunc void generalTimeResetErrorCounts(void);
4796-epicsShareFunc int generalTimeGetErrorCounts(void);
4797+LIBCOM_API void generalTimeResetErrorCounts(void);
4798+LIBCOM_API int generalTimeGetErrorCounts(void);
4799
4800-epicsShareFunc const char * generalTimeCurrentProviderName(void);
4801-epicsShareFunc const char * generalTimeEventProviderName(void);
4802-epicsShareFunc const char * generalTimeHighestCurrentName(void);
4803+LIBCOM_API const char * generalTimeCurrentProviderName(void);
4804+LIBCOM_API const char * generalTimeEventProviderName(void);
4805+LIBCOM_API const char * generalTimeHighestCurrentName(void);
4806
4807 /* Original names, for compatibility */
4808 #define generalTimeCurrentTpName generalTimeCurrentProviderName
4809 #define generalTimeEventTpName generalTimeEventProviderName
4810
4811-epicsShareFunc long generalTimeReport(int interest);
4812+LIBCOM_API long generalTimeReport(int interest);
4813
4814 #ifdef __cplusplus
4815 }
4816diff --git a/modules/libcom/src/osi/epicsInterrupt.h b/modules/libcom/src/osi/epicsInterrupt.h
4817index 93b4438..b536f0a 100644
4818--- a/modules/libcom/src/osi/epicsInterrupt.h
4819+++ b/modules/libcom/src/osi/epicsInterrupt.h
4820@@ -13,12 +13,12 @@
4821 extern "C" {
4822 #endif
4823
4824-#include "shareLib.h"
4825+#include "libComAPI.h"
4826
4827-epicsShareFunc int epicsInterruptLock(void);
4828-epicsShareFunc void epicsInterruptUnlock(int key);
4829-epicsShareFunc int epicsInterruptIsInterruptContext(void);
4830-epicsShareFunc void epicsInterruptContextMessage(const char *message);
4831+LIBCOM_API int epicsInterruptLock(void);
4832+LIBCOM_API void epicsInterruptUnlock(int key);
4833+LIBCOM_API int epicsInterruptIsInterruptContext(void);
4834+LIBCOM_API void epicsInterruptContextMessage(const char *message);
4835
4836 #ifdef __cplusplus
4837 }
4838diff --git a/modules/libcom/src/osi/epicsMath.cpp b/modules/libcom/src/osi/epicsMath.cpp
4839index 1388e65..3cfca0a 100644
4840--- a/modules/libcom/src/osi/epicsMath.cpp
4841+++ b/modules/libcom/src/osi/epicsMath.cpp
4842@@ -6,7 +6,6 @@
4843 \*************************************************************************/
4844 /* epicsMath.cpp */
4845
4846-#define epicsExportSharedSymbols
4847 #include <epicsMath.h>
4848
4849 #ifdef _MSC_VER
4850@@ -33,8 +32,8 @@ static float makeINF ( void )
4851 #endif
4852
4853 extern "C" {
4854-epicsShareDef float epicsNAN = NAN;
4855-epicsShareDef float epicsINF = INFINITY;
4856+float epicsNAN = NAN;
4857+float epicsINF = INFINITY;
4858 }
4859
4860 #ifdef _MSC_VER
4861diff --git a/modules/libcom/src/osi/epicsMessageQueue.cpp b/modules/libcom/src/osi/epicsMessageQueue.cpp
4862index 1527b3d..b5c1ad9 100644
4863--- a/modules/libcom/src/osi/epicsMessageQueue.cpp
4864+++ b/modules/libcom/src/osi/epicsMessageQueue.cpp
4865@@ -15,7 +15,6 @@
4866
4867 #include <new>
4868
4869-#define epicsExportSharedSymbols
4870 #include "epicsMessageQueue.h"
4871 #include "epicsStdio.h"
4872
4873diff --git a/modules/libcom/src/osi/epicsMessageQueue.h b/modules/libcom/src/osi/epicsMessageQueue.h
4874index c6a98fd..9bd7fbd 100644
4875--- a/modules/libcom/src/osi/epicsMessageQueue.h
4876+++ b/modules/libcom/src/osi/epicsMessageQueue.h
4877@@ -20,13 +20,13 @@
4878 #define epicsMessageQueueh
4879
4880 #include "epicsAssert.h"
4881-#include "shareLib.h"
4882+#include "libComAPI.h"
4883
4884 typedef struct epicsMessageQueueOSD *epicsMessageQueueId;
4885
4886 #ifdef __cplusplus
4887
4888-class epicsShareClass epicsMessageQueue {
4889+class LIBCOM_API epicsMessageQueue {
4890 public:
4891 epicsMessageQueue ( unsigned int capacity,
4892 unsigned int maximumMessageSize );
4893@@ -52,40 +52,40 @@ private: /* Prevent compiler-generated member functions */
4894 extern "C" {
4895 #endif /*__cplusplus */
4896
4897-epicsShareFunc epicsMessageQueueId epicsShareAPI epicsMessageQueueCreate(
4898+LIBCOM_API epicsMessageQueueId LIBCOMSTD_API epicsMessageQueueCreate(
4899 unsigned int capacity,
4900 unsigned int maximumMessageSize);
4901-epicsShareFunc void epicsShareAPI epicsMessageQueueDestroy(
4902+LIBCOM_API void LIBCOMSTD_API epicsMessageQueueDestroy(
4903 epicsMessageQueueId id);
4904-epicsShareFunc int epicsShareAPI epicsMessageQueueTrySend(
4905+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueTrySend(
4906 epicsMessageQueueId id,
4907 void *message,
4908 unsigned int messageSize);
4909-epicsShareFunc int epicsShareAPI epicsMessageQueueSend(
4910+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueSend(
4911 epicsMessageQueueId id,
4912 void *message,
4913 unsigned int messageSize);
4914-epicsShareFunc int epicsShareAPI epicsMessageQueueSendWithTimeout(
4915+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueSendWithTimeout(
4916 epicsMessageQueueId id,
4917 void *message,
4918 unsigned int messageSize,
4919 double timeout);
4920-epicsShareFunc int epicsShareAPI epicsMessageQueueTryReceive(
4921+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueTryReceive(
4922 epicsMessageQueueId id,
4923 void *message,
4924 unsigned int size);
4925-epicsShareFunc int epicsShareAPI epicsMessageQueueReceive(
4926+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueReceive(
4927 epicsMessageQueueId id,
4928 void *message,
4929 unsigned int size);
4930-epicsShareFunc int epicsShareAPI epicsMessageQueueReceiveWithTimeout(
4931+LIBCOM_API int LIBCOMSTD_API epicsMessageQueueReceiveWithTimeout(
4932 epicsMessageQueueId id,
4933 void *message,
4934 unsigned int size,
4935 double timeout);
4936-epicsShareFunc int epicsShareAPI epicsMessageQueuePending(
4937+LIBCOM_API int LIBCOMSTD_API epicsMessageQueuePending(
4938 epicsMessageQueueId id);
4939-epicsShareFunc void epicsShareAPI epicsMessageQueueShow(
4940+LIBCOM_API void LIBCOMSTD_API epicsMessageQueueShow(
4941 epicsMessageQueueId id,
4942 int level);
4943
4944diff --git a/modules/libcom/src/osi/epicsMutex.cpp b/modules/libcom/src/osi/epicsMutex.cpp
4945index 0354311..6d20536 100644
4946--- a/modules/libcom/src/osi/epicsMutex.cpp
4947+++ b/modules/libcom/src/osi/epicsMutex.cpp
4948@@ -25,7 +25,6 @@
4949 #include <stdio.h>
4950 #include <string.h>
4951
4952-#define epicsExportSharedSymbols
4953 #include "epicsStdio.h"
4954 #include "epicsThread.h"
4955 #include "valgrind/valgrind.h"
4956@@ -83,7 +82,7 @@ static void epicsMutexOsiInit(void *) {
4957 epicsMutexGlobalLock = epicsMutexOsdCreate();
4958 }
4959
4960-epicsMutexId epicsShareAPI epicsMutexOsiCreate(
4961+epicsMutexId LIBCOMSTD_API epicsMutexOsiCreate(
4962 const char *pFileName,int lineno)
4963 {
4964 epicsMutexOSD * id;
4965@@ -117,7 +116,7 @@ epicsMutexId epicsShareAPI epicsMutexOsiCreate(
4966 return(pmutexNode);
4967 }
4968
4969-epicsMutexId epicsShareAPI epicsMutexOsiMustCreate(
4970+epicsMutexId LIBCOMSTD_API epicsMutexOsiMustCreate(
4971 const char *pFileName,int lineno)
4972 {
4973 epicsMutexId id = epicsMutexOsiCreate(pFileName,lineno);
4974@@ -125,7 +124,7 @@ epicsMutexId epicsShareAPI epicsMutexOsiMustCreate(
4975 return(id );
4976 }
4977
4978-void epicsShareAPI epicsMutexDestroy(epicsMutexId pmutexNode)
4979+void LIBCOMSTD_API epicsMutexDestroy(epicsMutexId pmutexNode)
4980 {
4981 epicsMutexLockStatus lockStat =
4982 epicsMutexOsdLock(epicsMutexGlobalLock);
4983@@ -138,12 +137,12 @@ void epicsShareAPI epicsMutexDestroy(epicsMutexId pmutexNode)
4984 epicsMutexOsdUnlock(epicsMutexGlobalLock);
4985 }
4986
4987-void epicsShareAPI epicsMutexUnlock(epicsMutexId pmutexNode)
4988+void LIBCOMSTD_API epicsMutexUnlock(epicsMutexId pmutexNode)
4989 {
4990 epicsMutexOsdUnlock(pmutexNode->id);
4991 }
4992
4993-epicsMutexLockStatus epicsShareAPI epicsMutexLock(
4994+epicsMutexLockStatus LIBCOMSTD_API epicsMutexLock(
4995 epicsMutexId pmutexNode)
4996 {
4997 epicsMutexLockStatus status =
4998@@ -156,7 +155,7 @@ epicsMutexLockStatus epicsShareAPI epicsMutexLock(
4999 return status;
5000 }
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches