SICS compiles under RHEL7
This commit is contained in:
2
devser.c
2
devser.c
@ -559,7 +559,7 @@ char * DevList(DevSer * devser) {
|
|||||||
DynStringConcat(result, str);
|
DynStringConcat(result, str);
|
||||||
free(str);
|
free(str);
|
||||||
} else {
|
} 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, text);
|
||||||
}
|
}
|
||||||
DynStringConcat(result, "\n");
|
DynStringConcat(result, "\n");
|
||||||
|
4
logger.c
4
logger.c
@ -1,5 +1,5 @@
|
|||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
logger.c
|
Logger.c
|
||||||
|
|
||||||
Markus Zolliker, Sept 2004
|
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);
|
fprintf(fil, "%s\t%s\n", stim, value);
|
||||||
} else {
|
} else {
|
||||||
/* newline within string! do write only characters before nl */
|
/* 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;
|
log->lastWrite = now;
|
||||||
fclose(fil);
|
fclose(fil);
|
||||||
|
8
make_gen
8
make_gen
@ -100,6 +100,14 @@ Dbg.o: Dbg.c
|
|||||||
cc -g -I/data/koenneck/include -c Dbg.c
|
cc -g -I/data/koenneck/include -c Dbg.c
|
||||||
Dbg_cmd.o: Dbg_cmd.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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
41
makefile_rhel7
Normal file
41
makefile_rhel7
Normal file
@ -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)
|
||||||
|
|
2
passwd.c
2
passwd.c
@ -130,7 +130,7 @@ int InitPasswd(char *filename)
|
|||||||
if (!fp)
|
if (!fp)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
while ((int) fgets(pLine, 255, fp) != EOF) {
|
while ((long)fgets(pLine, 255, fp) != EOF) {
|
||||||
if (feof(fp))
|
if (feof(fp))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
#include <lld_blob.h>
|
#include <lld_blob.h>
|
||||||
#include <dynstring.h>
|
#include <dynstring.h>
|
||||||
#include <stptok.h>
|
#include <stptok.h>
|
||||||
#include <json/json.h>
|
#include <json-c/json.h>
|
||||||
|
|
||||||
#define OOM -5001 /* out of memory */
|
#define OOM -5001 /* out of memory */
|
||||||
#define TO -5002 /* timeout */
|
#define TO -5002 /* timeout */
|
||||||
@ -550,7 +550,7 @@ static int WriteResponseTask(void *pData)
|
|||||||
return 1;
|
return 1;
|
||||||
} else if(tokerr != json_tokener_success) {
|
} else if(tokerr != json_tokener_success) {
|
||||||
traceIO("RO","JSON parsing error %s on %s from %s %d",
|
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);
|
ANETreadConsume(self->handle,length);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
MFLAGS=-f makefile_linux$(DUMMY)
|
MFLAGS=-f makefile_linux$(DUMMY)
|
||||||
|
|
||||||
HDFROOT=/afs/psi.ch/project/sinq/sl6
|
HDFROOT=/usr/lib64
|
||||||
TCLINC=.
|
TCLINC=.
|
||||||
|
|
||||||
#DBG= -g -fstack-protector-all
|
#DBG= -g -fstack-protector-all
|
||||||
|
Reference in New Issue
Block a user