diff --git a/src/dbStatic/dbStaticLib.c b/src/dbStatic/dbStaticLib.c index 0a9d04bd0..4e662c3c6 100644 --- a/src/dbStatic/dbStaticLib.c +++ b/src/dbStatic/dbStaticLib.c @@ -1338,7 +1338,7 @@ long dbFreeRecords(DBBASE *pdbbase) return(0); } -long dbFindRecord(DBENTRY *pdbentry,char *precordName) +long dbFindRecord(DBENTRY *pdbentry,const char *precordName) { dbBase *pdbbase = pdbentry->pdbbase; int lenName=0; @@ -1522,7 +1522,7 @@ long dbCopyRecord(DBENTRY *pdbentry,char *newRecordName,int overWriteOK) return(dbFindRecord(pdbentry,newRecordName)); } -long dbFindField(DBENTRY *pdbentry,char *pname) +long dbFindField(DBENTRY *pdbentry,const char *pname) { dbRecordType *precordType = pdbentry->precordType; dbRecordNode *precnode = pdbentry->precnode; diff --git a/src/dbStatic/dbStaticLib.h b/src/dbStatic/dbStaticLib.h index 7c96a45c5..7f502e994 100644 --- a/src/dbStatic/dbStaticLib.h +++ b/src/dbStatic/dbStaticLib.h @@ -135,7 +135,7 @@ int dbGetPromptGroup(DBENTRY *pdbentry); long dbCreateRecord(DBENTRY *pdbentry,char *precordName); long dbDeleteRecord(DBENTRY *pdbentry); long dbFreeRecords(DBBASE *pdbbase); -long dbFindRecord(DBENTRY *pdbentry,char *precordName); +long dbFindRecord(DBENTRY *pdbentry,const char *precordName); long dbFirstRecord(DBENTRY *pdbentry); /*first of record type*/ long dbNextRecord(DBENTRY *pdbentry); int dbGetNRecords(DBENTRY *pdbentry); @@ -147,7 +147,7 @@ long dbVisibleRecord(DBENTRY *pdbentry); long dbInvisibleRecord(DBENTRY *pdbentry); int dbIsVisibleRecord(DBENTRY *pdbentry); -long dbFindField(DBENTRY *pdbentry,char *pfieldName); +long dbFindField(DBENTRY *pdbentry,const char *pfieldName); int dbFoundField(DBENTRY *pdbentry); char *dbGetString(DBENTRY *pdbentry); long dbPutString(DBENTRY *pdbentry,char *pstring); diff --git a/src/gdd/aitConvert.h b/src/gdd/aitConvert.h index 069600455..2c00491bd 100644 --- a/src/gdd/aitConvert.h +++ b/src/gdd/aitConvert.h @@ -8,6 +8,9 @@ * $Id$ * * $Log$ + * Revision 1.3 1996/10/17 12:41:07 jbk + * network byte order stuff / added strDup function to Helpers + * * Revision 1.2 1996/08/13 23:13:34 jhill * win NT changes * @@ -22,11 +25,8 @@ #include -#ifdef WIN32 -#include -#else -#include -#endif +#include "shareLib.h" +#include "osiSock.h" #include "aitTypes.h" @@ -50,11 +50,11 @@ extern "C" { #endif /* main conversion table */ -extern aitFunc aitConvertTable[aitTotal][aitTotal]; +epicsShareExtern aitFunc aitConvertTable[aitTotal][aitTotal]; /* do not make conversion table if not needed */ #ifdef AIT_NEED_BYTE_SWAP -extern aitFunc aitConvertToNetTable[aitTotal][aitTotal]; -extern aitFunc aitConvertFromNetTable[aitTotal][aitTotal]; +epicsShareExtern aitFunc aitConvertToNetTable[aitTotal][aitTotal]; +epicsShareExtern aitFunc aitConvertFromNetTable[aitTotal][aitTotal]; #else #define aitConvertToNetTable aitConvertTable #define aitConvertFromNetTable aitConvertTable diff --git a/src/gdd/aitHelpers.h b/src/gdd/aitHelpers.h index 9b20528f9..71e1d6f0b 100644 --- a/src/gdd/aitHelpers.h +++ b/src/gdd/aitHelpers.h @@ -8,6 +8,9 @@ * $Id$ * * $Log$ + * Revision 1.11 1997/03/21 01:56:00 jbk + * *** empty log message *** + * * Revision 1.10 1996/11/02 01:28:15 jhill * removed merge problems * @@ -63,9 +66,9 @@ inline char* strDup(const char* x) } class aitTimeStamp { - friend aitTimeStamp operator+ (const aitTimeStamp &lhs, const aitTimeStamp &rhs); - friend aitTimeStamp operator- (const aitTimeStamp &lhs, const aitTimeStamp &rhs); - friend int operator>= (const aitTimeStamp &lhs, const aitTimeStamp &rhs); + friend inline aitTimeStamp operator+ (const aitTimeStamp &lhs, const aitTimeStamp &rhs); + friend inline aitTimeStamp operator- (const aitTimeStamp &lhs, const aitTimeStamp &rhs); + friend inline int operator>= (const aitTimeStamp &lhs, const aitTimeStamp &rhs); public: aitTimeStamp () : tv_sec(0u), tv_nsec(0u) {} aitTimeStamp (const aitTimeStamp &t) : tv_sec(t.tv_sec), tv_nsec(t.tv_nsec) {} diff --git a/src/gdd/aitTypes.c b/src/gdd/aitTypes.c index db4419f94..ff3587a38 100644 --- a/src/gdd/aitTypes.c +++ b/src/gdd/aitTypes.c @@ -5,6 +5,9 @@ * $Id$ * * $Log$ + * Revision 1.1 1996/06/25 19:11:32 jbk + * new in EPICS base + * * Revision 1.1 1996/05/31 13:15:21 jbk * add new stuff * @@ -14,7 +17,7 @@ #include #include "aitTypes.h" -const size_t aitSize[aitTotal] = { +epicsShareDecl const size_t aitSize[aitTotal] = { 0, sizeof(aitInt8), sizeof(aitUint8), @@ -30,7 +33,7 @@ const size_t aitSize[aitTotal] = { 0 }; -const char* aitName[aitTotal] = { +epicsShareDecl const char* aitName[aitTotal] = { "aitInvalid", "aitInt8", "aitUint8", @@ -46,7 +49,7 @@ const char* aitName[aitTotal] = { "aitContainer" }; -const char* aitStringType[aitTotal] = { +epicsShareDecl const char* aitStringType[aitTotal] = { "%8.8x", "%2.2x", "%2.2x", diff --git a/src/gdd/aitTypes.h b/src/gdd/aitTypes.h index 8dc19b9e6..d19e3c6f9 100644 --- a/src/gdd/aitTypes.h +++ b/src/gdd/aitTypes.h @@ -8,6 +8,9 @@ * $Id$ * * $Log$ + * Revision 1.3 1997/03/21 01:56:00 jbk + * *** empty log message *** + * * Revision 1.2 1996/08/22 21:05:40 jbk * More fixes to make strings and fixed string work better. * @@ -31,6 +34,8 @@ #include #include +#include "shareLib.h" + typedef char aitInt8; typedef unsigned char aitUint8; typedef short aitInt16; @@ -139,9 +144,9 @@ typedef union { #ifdef __cplusplus extern "C" { #endif -extern const size_t aitSize[aitTotal]; -extern const char* aitName[aitTotal]; -extern const char* aitStringType[aitTotal]; +epicsShareExtern const size_t aitSize[aitTotal]; +epicsShareExtern const char* aitName[aitTotal]; +epicsShareExtern const char* aitStringType[aitTotal]; #ifdef __cplusplus } #endif diff --git a/src/gdd/dbMapper.h b/src/gdd/dbMapper.h index 409b43894..0f1fe3e51 100644 --- a/src/gdd/dbMapper.h +++ b/src/gdd/dbMapper.h @@ -8,12 +8,16 @@ * $Id$ * * $Log$ + * Revision 1.1 1996/06/25 19:11:36 jbk + * new in EPICS base + * * * *Revision 1.1 1996/05/31 13:15:24 jbk * *add new stuff * */ +#include "shareLib.h" #include "aitTypes.h" #include "gdd.h" @@ -49,9 +53,9 @@ struct gddDbrToAitTable { }; typedef struct gddDbrToAitTable gddDbrToAitTable; -extern gddDbrToAitTable gddDbrToAit[]; -extern const chtype gddAitToDbr[]; -extern gddDbrMapFuncTable gddMapDbr[]; +epicsShareExtern gddDbrToAitTable gddDbrToAit[]; +epicsShareExtern const chtype gddAitToDbr[]; +epicsShareExtern gddDbrMapFuncTable gddMapDbr[]; void gddMakeMapDBR(gddApplicationTypeTable& tt); void gddMakeMapDBR(gddApplicationTypeTable* tt); diff --git a/src/gdd/gddErrorCodes.h b/src/gdd/gddErrorCodes.h index bdb11a2ca..98d5aea37 100644 --- a/src/gdd/gddErrorCodes.h +++ b/src/gdd/gddErrorCodes.h @@ -8,6 +8,9 @@ * $Id$ * * $Log$ + * Revision 1.2 1996/08/27 13:05:10 jbk + * final repairs to string functions, put() functions, and error code printing + * * Revision 1.1 1996/06/25 19:11:43 jbk * new in EPICS base * @@ -19,6 +22,8 @@ * */ +#include "shareLib.h" + /* gdd.cc contains a table (gddErrorMessages) that has all the text strings for each of the error codes @@ -37,7 +42,7 @@ typedef long gddStatus; #define gddErrorOverflow -9 #define gddErrorUnderflow -10 -extern char* gddErrorMessages[]; +epicsShareExtern char* gddErrorMessages[]; #define gddPrintError(x) \ fprintf(stderr,"gdd Error: %s\n",gddErrorMessages[x*(-1)]); diff --git a/src/include/osiMutexNOOP.h b/src/include/osiMutexNOOP.h index 723bced13..a4dc92826 100644 --- a/src/include/osiMutexNOOP.h +++ b/src/include/osiMutexNOOP.h @@ -3,6 +3,14 @@ // osiMutex - OS independent mutex // (NOOP on single threaded OS) // +// NOTE: +// I have made lock/unlock const because this allows +// a list to be run in a const member function on a +// multi-threaded os (since paired lock/unlock +// requests really do not modify the internal +// state of the object and neither does +// running the list if we dont modify the list). +// class osiMutex { public: // @@ -10,8 +18,8 @@ public: // (since g++ does not have exceptions) // int init() {return 0;} - void osiLock() {} - void osiUnlock() {} + void osiLock() const {} + void osiUnlock() const {} void show (unsigned) const {} private: }; diff --git a/src/util/Makefile.Host b/src/util/Makefile.Host index 0ed8a095a..1f18c1a7a 100644 --- a/src/util/Makefile.Host +++ b/src/util/Makefile.Host @@ -5,8 +5,8 @@ TOP = ../../.. include $(TOP)/config/CONFIG_BASE # default Unix needs lib m, every system needs libs ca & Com: -PROD_LIBS_DEFAULT := m -PROD_LIBS_WIN32 := -nil- +SYS_PROD_LIBS_DEFAULT := m +SYS_PROD_LIBS_WIN32 := -nil- PROD_LIBS := ca Com PROD_DEFAULT := ca_test iocLogServer startCArepeater diff --git a/src/util/iocLogServer.c b/src/util/iocLogServer.c index 25ed6a231..5a9439ac1 100644 --- a/src/util/iocLogServer.c +++ b/src/util/iocLogServer.c @@ -47,6 +47,9 @@ * .09 050494 pg HPUX port changes. * .10 021694 joh ANSI C * $Log$ + * Revision 1.24 1996/11/22 20:43:03 jhill + * doc + * * Revision 1.22 1996/11/02 02:20:36 jhill * use osiSock.h * @@ -140,7 +143,7 @@ static void logTime (struct iocLogClient *pclient); static int getConfig(void); static int openLogFile(struct ioc_log_server *pserver); static void handleLogFileError(void); -static void envFailureNotify(ENV_PARAM *pparam); +static void envFailureNotify(const ENV_PARAM *pparam); static void freeLogClient(struct iocLogClient *pclient); static void sighupHandler(void); @@ -747,7 +750,7 @@ static int getConfig(void) * * */ -static void envFailureNotify(ENV_PARAM *pparam) +static void envFailureNotify(const ENV_PARAM *pparam) { fprintf(stderr, "iocLogServer: EPICS environment variable `%s' undefined\n",