diff --git a/devser.c b/devser.c index b3888e51..4df8bb74 100644 --- a/devser.c +++ b/devser.c @@ -559,7 +559,7 @@ char * DevList(DevSer * devser) { DynStringConcat(result, str); free(str); } else { - snprintf(text, sizeof text, "%8.8x", (unsigned int)action->data); + snprintf(text, sizeof text, "%8.8lx", (unsigned long)action->data); DynStringConcat(result, text); } DynStringConcat(result, "\n"); diff --git a/logger.c b/logger.c index 4534ce40..b281b718 100644 --- a/logger.c +++ b/logger.c @@ -1,5 +1,5 @@ /*--------------------------------------------------------------------------- -logger.c +Logger.c Markus Zolliker, Sept 2004 ---------------------------------------------------------------------------- @@ -205,7 +205,7 @@ int LoggerWrite0(Logger * log, time_t now, int period, char *value) fprintf(fil, "%s\t%s\n", stim, value); } else { /* newline within string! do write only characters before nl */ - fprintf(fil, "%s\t%.*s\n", stim, (nl - value), value); + fprintf(fil, "%s\t%.*s\n", stim, (int)(nl - value), value); } log->lastWrite = now; fclose(fil); diff --git a/make_gen b/make_gen index 9d3a5d06..f6a017c3 100644 --- a/make_gen +++ b/make_gen @@ -100,6 +100,14 @@ Dbg.o: Dbg.c cc -g -I/data/koenneck/include -c Dbg.c Dbg_cmd.o: Dbg_cmd.c +tclClock.o: tclClock.c + cc -g -c -DHAVE_UNISTD_H tclClock.c + +tclDate.o: tclDate.c + cc -g -c -DHAVE_UNISTD_H tclDate.c + +tclUnixTime.o: tclUnixTime.c + cc -g -c -DHAVE_UNISTD_H tclUnixTime.c diff --git a/makefile_rhel7 b/makefile_rhel7 new file mode 100644 index 00000000..92574903 --- /dev/null +++ b/makefile_rhel7 @@ -0,0 +1,41 @@ +#--------------------------------------------------------------------------- +# Makefile for SICS +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Mark Koennecke 1996-2001 +# Markus Zolliker, March 2003 +# Mark Koennecke, February 2014 +#========================================================================== +# assign if the National Instrument GPIB driver is available +SINQDIR=/afs/psi.ch/project/sinq +#NI= -DHAVENI +#NIOBJ= nigpib.o +#NILIB=$(SINQDIR)/rhel7/lib/cib.o +EXTRAROOT=/afs/psi.ch/project/sinq/rhel7 + +EPICSDIR=$(SINQDIR)/rhel7/lib/linux-x86_64-debug +#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 -I$(EXTRAROOT)/include -DNXXML -DHDF5 $(NI) \ + -I$(SICSROOT)/sicspsi -I$(SICSROOT) -I. -MMD \ + -Werror -DCYGNUS -DNONINTF $(DBG) $(DFORTIFY) \ + -Wall -Wno-unused -Wunused-value -Wno-comment -Wno-switch + +BINTARGET = bin +EXTRA=nintf.o +SUBLIBS = $(SICSROOT)/sicspsi/libpsi.a $(SICSROOT)/sicspsi/hardsup/libhlib.a \ + matrix/libmatrix.a +LIBS = -L$(EXTRAROOT)/lib -L$(EXTRAROOT)/lib $(SUBLIBS) $(NILIB) $(EPICSLIBS) \ + -ltcl -lNeXus -lhdf5 \ + $(EXTRAROOT)/lib/libjson-c.a \ + -ldl -lz -lmxml $(EXTRAROOT)/lib/libghttp.a -lm -lc -lpthread -lsqlite3 -lbson-1.0 -lmongoc-1.0 + +include make_gen + +-include $(OBJ:.o=.d) + diff --git a/passwd.c b/passwd.c index 0f687cf0..0765a7a1 100644 --- a/passwd.c +++ b/passwd.c @@ -130,7 +130,7 @@ int InitPasswd(char *filename) if (!fp) return 0; - while ((int) fgets(pLine, 255, fp) != EOF) { + while ((long)fgets(pLine, 255, fp) != EOF) { if (feof(fp)) break; diff --git a/remoteobject.c b/remoteobject.c index ffcf0609..926cb079 100644 --- a/remoteobject.c +++ b/remoteobject.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #define OOM -5001 /* out of memory */ #define TO -5002 /* timeout */ @@ -550,7 +550,7 @@ static int WriteResponseTask(void *pData) return 1; } else if(tokerr != json_tokener_success) { traceIO("RO","JSON parsing error %s on %s from %s %d", - json_tokener_errors[tokerr], pText, self->host, self->jtok->char_offset); + json_tokener_error_desc(tokerr), pText, self->host, self->jtok->char_offset); ANETreadConsume(self->handle,length); return 1; } diff --git a/sllinux_def b/sllinux_def index ee2f5005..5eb541b9 100644 --- a/sllinux_def +++ b/sllinux_def @@ -9,7 +9,7 @@ MFLAGS=-f makefile_linux$(DUMMY) -HDFROOT=/afs/psi.ch/project/sinq/sl6 +HDFROOT=/usr/lib64 TCLINC=. #DBG= -g -fstack-protector-all