From 8e1ac545ce5b1312af37ee4e955326710c40f484 Mon Sep 17 00:00:00 2001 From: Mark Koennecke Date: Thu, 10 Apr 2014 10:53:18 +0200 Subject: [PATCH] Linked epics statically --- commandlog.h | 2 +- hipadaba.h | 2 +- make_gen | 2 +- makefile_slinux | 5 ++++- network.c | 7 ++++--- sicshdbadapter.c | 4 ++-- sicshipadaba.c | 2 +- sllinux_def | 2 +- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/commandlog.h b/commandlog.h index d02d1da3..82293f79 100644 --- a/commandlog.h +++ b/commandlog.h @@ -9,7 +9,7 @@ --------------------------------------------------------------------------*/ #ifndef COMMANDLOG #define COMMANDLOG -void WriteToCommandLog(char *prompt, char *pText); +void WriteToCommandLog(const char *prompt, const char *pText); void WriteToCommandLogId(char *prompt, int id, char *text); void WriteToCommandLogCmd(int id, char *text); int CompactCommandLog(void); diff --git a/hipadaba.h b/hipadaba.h index 09e49336..be087396 100644 --- a/hipadaba.h +++ b/hipadaba.h @@ -71,7 +71,7 @@ typedef struct __hipadaba { struct __hdbcallback *callBackChain; char *name; hdbValue value; - int protected; + int iprotected; pStringDict properties; } Hdb, *pHdb; /*-------------- return values for callback functions -------------------------*/ diff --git a/make_gen b/make_gen index d8154fb1..64962730 100644 --- a/make_gen +++ b/make_gen @@ -69,7 +69,7 @@ all: libmat libhlib libtecsl libpsi SICServer full: purge all SICServer: $(OBJ) $(SUBLIBS) - $(CC) $(DBG) -o SICServer $(OBJ) $(LIBS) + g++ $(DBG) -o SICServer $(OBJ) $(LIBS) matrix/libmatrix.a: libmat diff --git a/makefile_slinux b/makefile_slinux index 09e3af71..a384635c 100644 --- a/makefile_slinux +++ b/makefile_slinux @@ -12,11 +12,14 @@ NI= -DHAVENI NIOBJ= nigpib.o NILIB=$(SINQDIR)/sl6/lib/cib.o -EPICSLIBS=-L$(SINQDIR)/sl6/lib/linux-x86 -lezca -lca -lCom +EPICSDIR=$(SINQDIR)/sl6/lib/linux-x86 +EPICSLIBS=$(EPICSDIR)/libezca.a $(EPICSDIR)/libca.a $(EPICSDIR)/libCom.a -lreadline -lhistory +#EPICSLIBS=-L$(EPICSDIR) -lezca -lca -lCom include sllinux_def CC = gcc + CFLAGS = -I$(HDFROOT)/include -DNXXML -DHDF5 $(NI) \ -I$(SICSROOT)/sicspsi/hardsup -I$(SICSROOT) -I. -MMD \ -Werror -DCYGNUS -DNONINTF $(DBG) $(DFORTIFY) \ diff --git a/network.c b/network.c index be90cf31..4e2d2031 100644 --- a/network.c +++ b/network.c @@ -67,7 +67,7 @@ struct timeval lastclose = { -1, 0 }; /*----------------------------------------------------------------------- Redefine this function if another means of error reporting is necessary. */ -static void NetError(char *pText) +static void NetError(const char pText[]) { /* SICSLogWrite(pText,eError); @@ -607,7 +607,7 @@ int NETReadTillTerm(mkChannel * self, long timeout, gettimeofday(&start, NULL); if (pTerm == NULL) - pTerm = ""; + pTerm = strdup(""); length = strlen(pTerm); memset(pBuffer, 0, iBufLen); @@ -842,8 +842,9 @@ mkChannel *UDPOpen(int iPort) i = 1; setsockopt(pRes->sockid, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(int)); + /* assert(pRes->sockid < (sizeof(long) * 8)); - /* if this fails the masks for select will be to + if this fails the masks for select will be to short. */ diff --git a/sicshdbadapter.c b/sicshdbadapter.c index c7357f9a..31e6d9aa 100644 --- a/sicshdbadapter.c +++ b/sicshdbadapter.c @@ -315,7 +315,7 @@ static pHdb CreateMotorAdapter(char *name, pMotor pMot) DeleteHipadabaNode(result, NULL); return NULL; } - result->protected = 1; + result->iprotected = 1; return result; } @@ -499,7 +499,7 @@ static pHdb MakeSicsVarNode(pSicsVariable pVar, char *name) snprintf(command, 1023, "%s ", pVar->name); SetHdbProperty(node, "sicscommand", command); - node->protected = 1; + node->iprotected = 1; return node; } diff --git a/sicshipadaba.c b/sicshipadaba.c index 82da1b6f..2e7ec442 100644 --- a/sicshipadaba.c +++ b/sicshipadaba.c @@ -2342,7 +2342,7 @@ static int isNodeProtected(pHdb node) { pHdb current = NULL; - if (node->protected == 1) { + if (node->iprotected == 1) { return 1; } current = node->child; diff --git a/sllinux_def b/sllinux_def index 0e22a767..bdd73884 100644 --- a/sllinux_def +++ b/sllinux_def @@ -12,4 +12,4 @@ MFLAGS=-f makefile_linux$(DUMMY) HDFROOT=/afs/psi.ch/project/sinq/sl6 TCLINC=. -DBG= -g +DBG= -g