From 27c4d0574fb09f526fe3727cd8ac743383f29eb1 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 27 Feb 1998 01:34:15 +0000 Subject: [PATCH] cleaned up the DLL symbol export --- src/libCom/adjustment.c | 1 - src/libCom/assertUNIX.c | 5 ++++- src/libCom/assertVX.c | 8 ++++++-- src/libCom/bucketLib.c | 11 +++++++---- src/libCom/bucketLib.h | 16 +++++----------- src/libCom/bucketLib/bucketLib.c | 11 +++++++---- src/libCom/bucketLib/bucketLib.h | 16 +++++----------- src/libCom/calc/calcPerform.c | 3 +-- src/libCom/calc/postfix.c | 3 --- src/libCom/calc/postfix.h | 6 ++++++ src/libCom/calcPerform.c | 3 +-- src/libCom/cvtFast.c | 1 + src/libCom/cvtFast/cvtFast.c | 1 + src/libCom/ellLib.c | 7 ++----- src/libCom/ellLib/ellLib.c | 7 ++----- src/libCom/env/envSubr.c | 2 +- src/libCom/envSubr.c | 2 +- src/libCom/errSymLib.c | 14 ++++++-------- src/libCom/errlog.h | 15 +++++++++++---- src/libCom/errlogUNIX.c | 20 ++------------------ src/libCom/errlogVX.c | 19 +------------------ src/libCom/error/errSymLib.c | 14 ++++++-------- src/libCom/error/errlog.c | 19 +------------------ src/libCom/error/errlog.h | 15 +++++++++++---- src/libCom/fdmgr.c | 11 ++++++----- src/libCom/fdmgr.h | 11 ----------- src/libCom/fdmgr/fdmgr.h | 11 ----------- src/libCom/gpHash/gpHashLib.c | 3 +-- src/libCom/gpHashLib.c | 3 +-- src/libCom/macCore.c | 8 ++++++-- src/libCom/macLib.h | 16 +++++----------- src/libCom/macLib/macCore.c | 8 ++++++-- src/libCom/macLib/macLib.h | 16 +++++----------- src/libCom/misc/adjustment.c | 1 - src/libCom/postfix.c | 3 --- src/libCom/postfix.h | 6 ++++++ src/libCom/tsDefs.h | 14 +------------- src/libCom/tsSubr.c | 5 ++--- 38 files changed, 127 insertions(+), 208 deletions(-) diff --git a/src/libCom/adjustment.c b/src/libCom/adjustment.c index 2ddcfadc4..4fc623d01 100644 --- a/src/libCom/adjustment.c +++ b/src/libCom/adjustment.c @@ -35,7 +35,6 @@ of this distribution. * (Appropriate for what we implenment) */ #define epicsExportSharedSymbols -#include "shareLib.h" #include "adjustment.h" epicsShareFunc size_t epicsShareAPI adjustToWorstCaseAlignment(size_t size) diff --git a/src/libCom/assertUNIX.c b/src/libCom/assertUNIX.c index 839f4a5f7..9bccea953 100644 --- a/src/libCom/assertUNIX.c +++ b/src/libCom/assertUNIX.c @@ -27,6 +27,9 @@ * Modification Log: * ----------------- * $Log$ + * Revision 1.10 1998/01/20 21:36:51 mrk + * add dbDefs.h + * * Revision 1.9 1997/05/01 19:57:09 jhill * updated dll keywords * @@ -55,10 +58,10 @@ #include #include +#define epicsExportSharedSymbols #include "dbDefs.h" #include "epicsPrint.h" #include "epicsVersion.h" -#define epicsExportSharedSymbols #include "epicsAssert.h" diff --git a/src/libCom/assertVX.c b/src/libCom/assertVX.c index f69134c46..d71e8217d 100644 --- a/src/libCom/assertVX.c +++ b/src/libCom/assertVX.c @@ -27,6 +27,11 @@ * Modification Log: * ----------------- * $Log$ + * Revision 1.9 1998/02/20 21:45:08 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.8 1997/05/01 19:57:10 jhill * updated dll keywords * @@ -56,10 +61,9 @@ #include #include +#define epicsExportSharedSymbols #include "epicsPrint.h" #include "epicsVersion.h" - -#define epicsExportSharedSymbols #include "epicsAssert.h" diff --git a/src/libCom/bucketLib.c b/src/libCom/bucketLib.c index ea56bb0e5..f53f7a80e 100644 --- a/src/libCom/bucketLib.c +++ b/src/libCom/bucketLib.c @@ -41,13 +41,16 @@ #include #include +#define epicsExportSharedSymbols #include "epicsAssert.h" #include "freeList.h" /* bucketLib uses freeListLib inside the DLL */ -#ifdef INCbucketLibh -#error bucketLib.h has been included too soon -#endif -#define epicsExportSharedSymbols +/* + * force these to be included before bucketLib.h + * includes them + */ +#include "errMdef.h" +#include "epicsTypes.h" #include "bucketLib.h" #ifndef TRUE diff --git a/src/libCom/bucketLib.h b/src/libCom/bucketLib.h index 4d7c5a877..3606cc00d 100644 --- a/src/libCom/bucketLib.h +++ b/src/libCom/bucketLib.h @@ -33,6 +33,11 @@ * .02 121693 joh added bucketFree() * .03 052395 joh use std EPICS status * $Log$ + * Revision 1.6 1998/02/20 21:45:10 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.5 1997/05/01 19:57:13 jhill * updated dll keywords * @@ -55,21 +60,10 @@ #ifdef __cplusplus extern "C" { -#endif - - /* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport #endif #include "errMdef.h" #include "epicsTypes.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" typedef unsigned BUCKETID; diff --git a/src/libCom/bucketLib/bucketLib.c b/src/libCom/bucketLib/bucketLib.c index ea56bb0e5..f53f7a80e 100644 --- a/src/libCom/bucketLib/bucketLib.c +++ b/src/libCom/bucketLib/bucketLib.c @@ -41,13 +41,16 @@ #include #include +#define epicsExportSharedSymbols #include "epicsAssert.h" #include "freeList.h" /* bucketLib uses freeListLib inside the DLL */ -#ifdef INCbucketLibh -#error bucketLib.h has been included too soon -#endif -#define epicsExportSharedSymbols +/* + * force these to be included before bucketLib.h + * includes them + */ +#include "errMdef.h" +#include "epicsTypes.h" #include "bucketLib.h" #ifndef TRUE diff --git a/src/libCom/bucketLib/bucketLib.h b/src/libCom/bucketLib/bucketLib.h index 4d7c5a877..3606cc00d 100644 --- a/src/libCom/bucketLib/bucketLib.h +++ b/src/libCom/bucketLib/bucketLib.h @@ -33,6 +33,11 @@ * .02 121693 joh added bucketFree() * .03 052395 joh use std EPICS status * $Log$ + * Revision 1.6 1998/02/20 21:45:10 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.5 1997/05/01 19:57:13 jhill * updated dll keywords * @@ -55,21 +60,10 @@ #ifdef __cplusplus extern "C" { -#endif - - /* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport #endif #include "errMdef.h" #include "epicsTypes.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" typedef unsigned BUCKETID; diff --git a/src/libCom/calc/calcPerform.c b/src/libCom/calc/calcPerform.c index 9c8c0ffc8..d1c7b7ada 100644 --- a/src/libCom/calc/calcPerform.c +++ b/src/libCom/calc/calcPerform.c @@ -110,10 +110,9 @@ #include #include "dbDefs.h" -#include "postfix.h" #define epicsExportSharedSymbols -#include "shareLib.h" +#include "postfix.h" static double local_random(); diff --git a/src/libCom/calc/postfix.c b/src/libCom/calc/postfix.c index ef5ce991f..53f9771b4 100644 --- a/src/libCom/calc/postfix.c +++ b/src/libCom/calc/postfix.c @@ -100,9 +100,6 @@ #include "dbDefs.h" -#ifdef INCpostfixh -#error postfix.h has been included too soon -#endif #define epicsExportSharedSymbols #include "postfix.h" diff --git a/src/libCom/calc/postfix.h b/src/libCom/calc/postfix.h index 5f7193933..e47e922b5 100644 --- a/src/libCom/calc/postfix.h +++ b/src/libCom/calc/postfix.h @@ -39,6 +39,12 @@ #include +epicsShareFunc long epicsShareAPI + postfix (char *pinfix, char *ppostfix, short *perror); + +epicsShareFunc long epicsShareAPI + calcPerform(double *parg, double *presult, char *post); + /* defines for element table */ #define BAD_EXPRESSION 0 #define FETCH_A 1 diff --git a/src/libCom/calcPerform.c b/src/libCom/calcPerform.c index 9c8c0ffc8..d1c7b7ada 100644 --- a/src/libCom/calcPerform.c +++ b/src/libCom/calcPerform.c @@ -110,10 +110,9 @@ #include #include "dbDefs.h" -#include "postfix.h" #define epicsExportSharedSymbols -#include "shareLib.h" +#include "postfix.h" static double local_random(); diff --git a/src/libCom/cvtFast.c b/src/libCom/cvtFast.c index 9250600cf..a34365f37 100644 --- a/src/libCom/cvtFast.c +++ b/src/libCom/cvtFast.c @@ -55,6 +55,7 @@ #include #include #include /* XPG2/XPG3/POSIX.1/FIPS151-1/ANSI-C */ + #define epicsExportSharedSymbols #include "cvtFast.h" diff --git a/src/libCom/cvtFast/cvtFast.c b/src/libCom/cvtFast/cvtFast.c index 9250600cf..a34365f37 100644 --- a/src/libCom/cvtFast/cvtFast.c +++ b/src/libCom/cvtFast/cvtFast.c @@ -55,6 +55,7 @@ #include #include #include /* XPG2/XPG3/POSIX.1/FIPS151-1/ANSI-C */ + #define epicsExportSharedSymbols #include "cvtFast.h" diff --git a/src/libCom/ellLib.c b/src/libCom/ellLib.c index 91a5c8304..c6fa3fc0b 100644 --- a/src/libCom/ellLib.c +++ b/src/libCom/ellLib.c @@ -33,17 +33,14 @@ /* #define DEBUG_DRIVER */ - +#include #ifdef vxWorks #include #endif -#include - -#include - #define epicsExportSharedSymbols +#include "epicsAssert.h" #include "ellLib.h" #if !defined(NULL) diff --git a/src/libCom/ellLib/ellLib.c b/src/libCom/ellLib/ellLib.c index 91a5c8304..c6fa3fc0b 100644 --- a/src/libCom/ellLib/ellLib.c +++ b/src/libCom/ellLib/ellLib.c @@ -33,17 +33,14 @@ /* #define DEBUG_DRIVER */ - +#include #ifdef vxWorks #include #endif -#include - -#include - #define epicsExportSharedSymbols +#include "epicsAssert.h" #include "ellLib.h" #if !defined(NULL) diff --git a/src/libCom/env/envSubr.c b/src/libCom/env/envSubr.c index b1e98c9af..9953910b1 100644 --- a/src/libCom/env/envSubr.c +++ b/src/libCom/env/envSubr.c @@ -82,8 +82,8 @@ #include #endif -#include "errMdef.h" #define epicsExportSharedSymbols +#include "errMdef.h" #include "envDefs.h" diff --git a/src/libCom/envSubr.c b/src/libCom/envSubr.c index b1e98c9af..9953910b1 100644 --- a/src/libCom/envSubr.c +++ b/src/libCom/envSubr.c @@ -82,8 +82,8 @@ #include #endif -#include "errMdef.h" #define epicsExportSharedSymbols +#include "errMdef.h" #include "envDefs.h" diff --git a/src/libCom/errSymLib.c b/src/libCom/errSymLib.c index 6d854d637..ff912e34f 100644 --- a/src/libCom/errSymLib.c +++ b/src/libCom/errSymLib.c @@ -70,11 +70,6 @@ #include #include -#include "ellLib.h" -#include "dbDefs.h" -#include "errMdef.h" -#include "errSymTbl.h" - #ifdef vxWorks #include #include @@ -82,13 +77,16 @@ #include #include -#define epicsExportSharedSymbols -#include "shareLib.h" - extern SYMTAB_ID statSymTbl; #endif +#define epicsExportSharedSymbols +#include "dbDefs.h" +#include "errMdef.h" +#include "errSymTbl.h" + + #ifdef __STDC__ static unsigned short errhash(long errNum); #else /*__STDC__*/ diff --git a/src/libCom/errlog.h b/src/libCom/errlog.h index 079514c7d..ef5ca1a6c 100644 --- a/src/libCom/errlog.h +++ b/src/libCom/errlog.h @@ -13,9 +13,9 @@ of this distribution. #ifndef INCerrlogh #define INCerrlogh -#include -#include + +#include "shareLib.h" #ifdef __cplusplus extern "C" { @@ -28,6 +28,11 @@ extern "C" { #endif #endif +#ifdef epicsPrintUseProtoANSI +# include +#else +# include +#endif /* define errMessage with a macro so we can print the file and line number*/ #define errMessage(S, PM) \ @@ -38,9 +43,11 @@ extern "C" { typedef void(*errlogListener) (const char *message); typedef enum {errlogInfo,errlogMinor,errlogMajor,errlogFatal} errlogSevEnum; -epicsShareExtern char * errlogSevEnumString[]; -#ifdef epicsExportSharedSymbols + +#ifdef ERRLOG_INIT epicsShareDef char * errlogSevEnumString[] = {"info","minor","major","fatal"}; +#else +epicsShareExtern char * errlogSevEnumString[]; #endif #ifdef epicsPrintUseProtoANSI diff --git a/src/libCom/errlogUNIX.c b/src/libCom/errlogUNIX.c index abec101b0..ca7ee1fbc 100644 --- a/src/libCom/errlogUNIX.c +++ b/src/libCom/errlogUNIX.c @@ -41,30 +41,14 @@ #include #include +#define ERRLOG_INIT +#define epicsExportSharedSymbols #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 errlog.h here (by undefining INCerrlogh) to: - * (1) Make the declarations be export - * (2) Allocate storage for errlogSevEnumString[] - */ -#undef INCerrlogh #include "errlog.h" static int sevToLog=0; - epicsShareFunc int epicsShareAPIV errlogPrintf(const char *pformat, ...) { diff --git a/src/libCom/errlogVX.c b/src/libCom/errlogVX.c index fc0f340ae..e4f1dee4b 100644 --- a/src/libCom/errlogVX.c +++ b/src/libCom/errlogVX.c @@ -27,29 +27,12 @@ of this distribution. #include #include +#define ERRLOG_INIT #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) - * (Is only a problem for WIN32 but done here for consistency) - * Define INCerrlog to keep it from being included - */ -#define INCerrlogh #include "errMdef.h" #include "error.h" #include "ellLib.h" #include "task_params.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 errlog.h here (by undefining INCerrlogh) to: - * (1) Make the declarations be export - * (2) Allocate storage for errlogSevEnumString[] - */ -#undef INCerrlogh #include "errlog.h" diff --git a/src/libCom/error/errSymLib.c b/src/libCom/error/errSymLib.c index 6d854d637..ff912e34f 100644 --- a/src/libCom/error/errSymLib.c +++ b/src/libCom/error/errSymLib.c @@ -70,11 +70,6 @@ #include #include -#include "ellLib.h" -#include "dbDefs.h" -#include "errMdef.h" -#include "errSymTbl.h" - #ifdef vxWorks #include #include @@ -82,13 +77,16 @@ #include #include -#define epicsExportSharedSymbols -#include "shareLib.h" - extern SYMTAB_ID statSymTbl; #endif +#define epicsExportSharedSymbols +#include "dbDefs.h" +#include "errMdef.h" +#include "errSymTbl.h" + + #ifdef __STDC__ static unsigned short errhash(long errNum); #else /*__STDC__*/ diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c index fc0f340ae..e4f1dee4b 100644 --- a/src/libCom/error/errlog.c +++ b/src/libCom/error/errlog.c @@ -27,29 +27,12 @@ of this distribution. #include #include +#define ERRLOG_INIT #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) - * (Is only a problem for WIN32 but done here for consistency) - * Define INCerrlog to keep it from being included - */ -#define INCerrlogh #include "errMdef.h" #include "error.h" #include "ellLib.h" #include "task_params.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 errlog.h here (by undefining INCerrlogh) to: - * (1) Make the declarations be export - * (2) Allocate storage for errlogSevEnumString[] - */ -#undef INCerrlogh #include "errlog.h" diff --git a/src/libCom/error/errlog.h b/src/libCom/error/errlog.h index 079514c7d..ef5ca1a6c 100644 --- a/src/libCom/error/errlog.h +++ b/src/libCom/error/errlog.h @@ -13,9 +13,9 @@ of this distribution. #ifndef INCerrlogh #define INCerrlogh -#include -#include + +#include "shareLib.h" #ifdef __cplusplus extern "C" { @@ -28,6 +28,11 @@ extern "C" { #endif #endif +#ifdef epicsPrintUseProtoANSI +# include +#else +# include +#endif /* define errMessage with a macro so we can print the file and line number*/ #define errMessage(S, PM) \ @@ -38,9 +43,11 @@ extern "C" { typedef void(*errlogListener) (const char *message); typedef enum {errlogInfo,errlogMinor,errlogMajor,errlogFatal} errlogSevEnum; -epicsShareExtern char * errlogSevEnumString[]; -#ifdef epicsExportSharedSymbols + +#ifdef ERRLOG_INIT epicsShareDef char * errlogSevEnumString[] = {"info","minor","major","fatal"}; +#else +epicsShareExtern char * errlogSevEnumString[]; #endif #ifdef epicsPrintUseProtoANSI diff --git a/src/libCom/fdmgr.c b/src/libCom/fdmgr.c index 05bff1f49..3ddd7bb9f 100644 --- a/src/libCom/fdmgr.c +++ b/src/libCom/fdmgr.c @@ -71,6 +71,11 @@ * we eliminate delete ambiguity (chance of the same * being reused). * $Log$ + * Revision 1.28 1998/02/20 21:45:14 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.27 1998/02/05 21:08:52 jhill * use SOCK error defs and use priority inheritance mutex * @@ -129,13 +134,9 @@ static char *pSccsId = "@(#) $Id$"; #include #endif +#define epicsExportSharedSymbols #include "epicsAssert.h" #include "epicsTypes.h" - -#ifdef includeFdmgrH -#error fdmgr.h has been included too soon -#endif -#define epicsExportSharedSymbols #include "fdmgr.h" #if 0 diff --git a/src/libCom/fdmgr.h b/src/libCom/fdmgr.h index 32e2a1f2b..19e3456bc 100644 --- a/src/libCom/fdmgr.h +++ b/src/libCom/fdmgr.h @@ -44,22 +44,11 @@ #ifdef __cplusplus extern "C" { -#endif - - /* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport #endif #include "ellLib.h" #include "bucketLib.h" #include "osiSock.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" enum fdi_type {fdi_read, fdi_write, fdi_excp}; diff --git a/src/libCom/fdmgr/fdmgr.h b/src/libCom/fdmgr/fdmgr.h index 32e2a1f2b..19e3456bc 100644 --- a/src/libCom/fdmgr/fdmgr.h +++ b/src/libCom/fdmgr/fdmgr.h @@ -44,22 +44,11 @@ #ifdef __cplusplus extern "C" { -#endif - - /* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport #endif #include "ellLib.h" #include "bucketLib.h" #include "osiSock.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" enum fdi_type {fdi_read, fdi_write, fdi_excp}; diff --git a/src/libCom/gpHash/gpHashLib.c b/src/libCom/gpHash/gpHashLib.c index 4b3cbd2b0..dd6e1355c 100644 --- a/src/libCom/gpHash/gpHashLib.c +++ b/src/libCom/gpHash/gpHashLib.c @@ -60,11 +60,10 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000). #include #include +#define epicsExportSharedSymbols #include "dbDefs.h" #include "ellLib.h" #include "epicsPrint.h" - -#define epicsExportSharedSymbols #include "gpHash.h" typedef struct gphPvt { diff --git a/src/libCom/gpHashLib.c b/src/libCom/gpHashLib.c index 4b3cbd2b0..dd6e1355c 100644 --- a/src/libCom/gpHashLib.c +++ b/src/libCom/gpHashLib.c @@ -60,11 +60,10 @@ DEVELOPMENT CENTER AT ARGONNE NATIONAL LABORATORY (708-252-2000). #include #include +#define epicsExportSharedSymbols #include "dbDefs.h" #include "ellLib.h" #include "epicsPrint.h" - -#define epicsExportSharedSymbols #include "gpHash.h" typedef struct gphPvt { diff --git a/src/libCom/macCore.c b/src/libCom/macCore.c index 95f7a28eb..a7e47e65f 100644 --- a/src/libCom/macCore.c +++ b/src/libCom/macCore.c @@ -37,9 +37,8 @@ #include #include -#include "dbmf.h" - #define epicsExportSharedSymbols +#include "dbmf.h" #include "macLib.h" /* @@ -756,6 +755,11 @@ char *Strdup( char *string ) } /* $Log$ + * Revision 1.7 1998/02/20 21:45:16 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.6 1997/06/05 18:28:48 mrk * Allow message about referenced but undefined to be suppressed * diff --git a/src/libCom/macLib.h b/src/libCom/macLib.h index 3f66d71b5..a3cdc08aa 100644 --- a/src/libCom/macLib.h +++ b/src/libCom/macLib.h @@ -5,23 +5,12 @@ * William Lupton, W. M. Keck Observatory */ -/* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport -#endif - /* * EPICS include files needed by this file */ #include "ellLib.h" #include "epicsPrint.h" #include "errMdef.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" /* @@ -213,6 +202,11 @@ epicsShareAPI macInstallMacros( ); /* $Log$ + * Revision 1.5 1998/02/20 21:45:17 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.4 1997/06/05 18:28:49 mrk * Allow message about referenced but undefined to be suppressed * diff --git a/src/libCom/macLib/macCore.c b/src/libCom/macLib/macCore.c index 95f7a28eb..a7e47e65f 100644 --- a/src/libCom/macLib/macCore.c +++ b/src/libCom/macLib/macCore.c @@ -37,9 +37,8 @@ #include #include -#include "dbmf.h" - #define epicsExportSharedSymbols +#include "dbmf.h" #include "macLib.h" /* @@ -756,6 +755,11 @@ char *Strdup( char *string ) } /* $Log$ + * Revision 1.7 1998/02/20 21:45:16 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.6 1997/06/05 18:28:48 mrk * Allow message about referenced but undefined to be suppressed * diff --git a/src/libCom/macLib/macLib.h b/src/libCom/macLib/macLib.h index 3f66d71b5..a3cdc08aa 100644 --- a/src/libCom/macLib/macLib.h +++ b/src/libCom/macLib/macLib.h @@ -5,23 +5,12 @@ * William Lupton, W. M. Keck Observatory */ -/* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport -#endif - /* * EPICS include files needed by this file */ #include "ellLib.h" #include "epicsPrint.h" #include "errMdef.h" - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" /* @@ -213,6 +202,11 @@ epicsShareAPI macInstallMacros( ); /* $Log$ + * Revision 1.5 1998/02/20 21:45:17 evans + * Made a large number of changes to epicsShareThings in libCom routines + * to get imports and exports straight on WIN32. Not everything is fixed + * at this time. + * * Revision 1.4 1997/06/05 18:28:49 mrk * Allow message about referenced but undefined to be suppressed * diff --git a/src/libCom/misc/adjustment.c b/src/libCom/misc/adjustment.c index 2ddcfadc4..4fc623d01 100644 --- a/src/libCom/misc/adjustment.c +++ b/src/libCom/misc/adjustment.c @@ -35,7 +35,6 @@ of this distribution. * (Appropriate for what we implenment) */ #define epicsExportSharedSymbols -#include "shareLib.h" #include "adjustment.h" epicsShareFunc size_t epicsShareAPI adjustToWorstCaseAlignment(size_t size) diff --git a/src/libCom/postfix.c b/src/libCom/postfix.c index ef5ce991f..53f9771b4 100644 --- a/src/libCom/postfix.c +++ b/src/libCom/postfix.c @@ -100,9 +100,6 @@ #include "dbDefs.h" -#ifdef INCpostfixh -#error postfix.h has been included too soon -#endif #define epicsExportSharedSymbols #include "postfix.h" diff --git a/src/libCom/postfix.h b/src/libCom/postfix.h index 5f7193933..e47e922b5 100644 --- a/src/libCom/postfix.h +++ b/src/libCom/postfix.h @@ -39,6 +39,12 @@ #include +epicsShareFunc long epicsShareAPI + postfix (char *pinfix, char *ppostfix, short *perror); + +epicsShareFunc long epicsShareAPI + calcPerform(double *parg, double *presult, char *post); + /* defines for element table */ #define BAD_EXPRESSION 0 #define FETCH_A 1 diff --git a/src/libCom/tsDefs.h b/src/libCom/tsDefs.h index 97d3b9705..66b6ec11c 100644 --- a/src/libCom/tsDefs.h +++ b/src/libCom/tsDefs.h @@ -54,21 +54,10 @@ #ifdef __cplusplus extern "C" { -#endif - - /* Defer declaring export functions until appropriate */ -#ifdef epicsExportSharedSymbols -#undef epicsExportSharedSymbols -#define restoreExport #endif #include "epicsTypes.h" #include "errMdef.h" /* get M_ts for this subsystem's `number' */ - -#ifdef restoreExport -#define epicsExportSharedSymbols -#undef restoreExport -#endif #include "shareLib.h" /*--------------------------------------------------------------------------- @@ -255,8 +244,7 @@ epicsShareFunc long epicsShareAPI tsTimeTextToStamp(); (glTsStatText[TsStatusToIndex(status)]) epicsShareExtern char *glTsStatText[7]; -#ifdef epicsExportSharedSymbols - /* #error epicsExportSharedSymbols is defined in tsDefs.h */ +#ifdef createTSSubrGlobals epicsShareDef char *glTsStatText[] = { /* S_ts_OK */ "success", /* S_ts_sysTimeError */ "error getting system time", diff --git a/src/libCom/tsSubr.c b/src/libCom/tsSubr.c index 56def0522..76ca3d1b3 100644 --- a/src/libCom/tsSubr.c +++ b/src/libCom/tsSubr.c @@ -134,11 +134,10 @@ # include #endif +#define epicsExportSharedSymbols #include "epicsAssert.h" #include "envDefs.h" - -#define epicsExportSharedSymbols -/* The instance of glTsStatText[] will be defined */ +#define createTSSubrGlobals #include "tsDefs.h"