diff --git a/src/libCom/adjustment.c b/src/libCom/adjustment.c index 559aefbed..2ddcfadc4 100644 --- a/src/libCom/adjustment.c +++ b/src/libCom/adjustment.c @@ -29,11 +29,15 @@ of this distribution. #include #include +/* Up to now epicsShareThings have been declared as imports + * (Appropriate for other stuff) + * After setting the following they will be declared as exports + * (Appropriate for what we implenment) + */ +#define epicsExportSharedSymbols #include "shareLib.h" #include "adjustment.h" -#define epicsExportSharedSymbols - epicsShareFunc size_t epicsShareAPI adjustToWorstCaseAlignment(size_t size) { int align_size, adjust; diff --git a/src/libCom/errlogUNIX.c b/src/libCom/errlogUNIX.c index e5850e3f8..469d06761 100644 --- a/src/libCom/errlogUNIX.c +++ b/src/libCom/errlogUNIX.c @@ -42,15 +42,29 @@ #include #include "epicsAssert.h" +/* errlog.h is included in errMdef.h for historical reasons + * We want to include errMdef.h here but not errlog.h + * (If we include it here, the epicsShareThings will be declared as import) + * Define INCerrlog to keep it from being included + */ +#define INCerrlogh +#include "errMdef.h" +#include "error.h" +/* Up to now epicsShareThings have been declared as imports + * (Appropriate for other stuff) + * After setting the following they will be declared as exports + * (Appropriate for what we implenment) + */ #define epicsExportSharedSymbols +#include +/* Include errlog.h here (by undefining INCerrlogh) to: + * (1) Make the declarations be export + * (2) Allocate storage (Controlled by ERRLOG_INIT) + */ +#undef INCerrlogh #define ERRLOG_INIT #include "errlog.h" #undef ERRLOG_INIT -#undef epicsExportSharedSymbols - -#include "errMdef.h" -#include "error.h" - static int sevToLog=0; diff --git a/src/libCom/misc/adjustment.c b/src/libCom/misc/adjustment.c index 559aefbed..2ddcfadc4 100644 --- a/src/libCom/misc/adjustment.c +++ b/src/libCom/misc/adjustment.c @@ -29,11 +29,15 @@ of this distribution. #include #include +/* Up to now epicsShareThings have been declared as imports + * (Appropriate for other stuff) + * After setting the following they will be declared as exports + * (Appropriate for what we implenment) + */ +#define epicsExportSharedSymbols #include "shareLib.h" #include "adjustment.h" -#define epicsExportSharedSymbols - epicsShareFunc size_t epicsShareAPI adjustToWorstCaseAlignment(size_t size) { int align_size, adjust;