Made SICS PSI part compile on OSX Maverick with clang

This commit is contained in:
2014-03-14 09:51:48 +01:00
parent fc0ff43db2
commit 71c03ee3d1
13 changed files with 63 additions and 17 deletions

View File

@ -234,7 +234,7 @@ int BrukerReadCurrent(pEVControl pEva, float *fField)
static int BrukerGet(pEVDriver pEva, float *fValue)
{
pBrukerDriv self = NULL;
int iRet, iSign = 1;
int iRet=0, iSign = 1;
char pBueffel[80];
char pCommand[6];
char *pPtr, *pSign = NULL;
@ -283,7 +283,7 @@ static int BrukerGet(pEVDriver pEva, float *fValue)
static int BrukerRun(pEVDriver pEva, float fVal)
{
pBrukerDriv self = NULL;
int iRet;
int iRet =0;
char pBueffel[80];
char pCommand[40];
char *pPtr;

2
ease.c
View File

@ -754,7 +754,7 @@ static int EaseInit(SConnection * pCon, EaseBase * eab, int argc,
<host> <port>
<host>:<port>
*/
int port, iRet, i;
int port=0, iRet, i;
rs232 *ser;
char *colon, *host;
char buf[64];

View File

@ -73,7 +73,7 @@ int FocusAverageDo(SConnection * pCon, SicsInterp * pSics, void *pData,
pSicsVariable var1 = NULL;
pSicsVariable var2 = NULL;
pSicsVariable var3 = NULL;
int lbank, mbank, ubank;
int lbank=0, mbank=0, ubank=0;
self = (pFocusAverager) pData;
assert(self);
@ -330,7 +330,7 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
pSicsVariable var1 = NULL;
pSicsVariable var2 = NULL;
pSicsVariable var3 = NULL;
int lbank, mbank, ubank;
int lbank=0, mbank=0, ubank=0;
assert(pCon);
assert(pSics);
@ -432,7 +432,7 @@ HistInt *CheckBank(pFocusAverager self, SConnection * pCon,
HistInt *mData = NULL;
HistInt *uData = NULL;
HistInt *mergData = NULL;
int lbank, mbank, ubank;
int lbank=0, mbank=0, ubank=0;
if (iBank == 2) {
var2 = FindVariable(pServ->pSics, "mbank");

18
hardsup/makefile_macosx Normal file
View File

@ -0,0 +1,18 @@
#---------------------------------------------------------------------------
# Makefile for the SINQ hardware support library
# with libraries installed unde r/usr/local
#
# Mark Koennecke, November 1996
# Markus Zolliker, March 2003
# Mark Koennecke, December 2009
#--------------------------------------------------------------------------
include $(SICSROOT)/sics/linux_def
CC = clang
CFLAGS = -g -DLINUX $(DFORTIFY) -I. -I$(SICSROOT)/sics -MMD -Wall -Wno-unused
include make_gen
-include $(OBJ:.o=.d)

View File

@ -8,8 +8,8 @@
# Mark Koennecke, February 2014
#==========================================================================
#include ../linux_def
include $(SICSROOT)/sics/sllinux_def
include $(SICSROOT)/sics/linux_def
#include $(SICSROOT)/sics/sllinux_def
CC = gcc

25
makefile_macosx Normal file
View File

@ -0,0 +1,25 @@
#---------------------------------------------------------------------------
# Makefile for SICS
# with libraries installed under /usr/local
#
# Mark Koennecke 1996-2001
# Markus Zolliker, March 2003
# Mark Koennecke, December 2009
# Mark Koennecke, February 2014
#==========================================================================
include $(SICSROOT)/sics/linux_def
#include $(SICSROOT)/sics/sllinux_def
CC = clang
CFLAGS = -I$(HDFROOT)/include -I/usr/pkg/include -DHDF5 $(NI) -I$(TCLINC) -Ihardsup \
-I$(SICSROOT)/sics -I.. -I. -MMD -DCYGNUS -DNONINTF $(DBG) \
$(DFORTIFY) -Wall -Wno-unused -Wunused-value -Wno-comment \
-Wno-switch -Werror
EXTRA=nintf.o
include make_gen
-include $(OBJ:.o=.d)

2
sinq.c
View File

@ -31,7 +31,7 @@
#include <arpa/inet.h>
#include "dgrambroadcast.h"
#include <sinq.h>
#include "sinq.h"
#include <asynnet.h>
#ifdef SEND_PORT

View File

@ -635,7 +635,7 @@ static int SQStatus(pHistDriver self, SConnection * pCon)
COUNTID);
if (pCountInt) {
status = pCountInt->CheckCountStatus(pInternal->pCounter, pCon);
if ((status == HWFault)) {
if (status == HWFault) {
ReleaseCountLock(pCountInt);
return status;
}

View File

@ -138,7 +138,7 @@ static char *findLastPoint(char *text)
static int TASHeader(pScanData self)
{
pTASdata pTAS = (pTASdata) self->pSpecial;
int i, iCount, status, iFileNO;
int i, iCount, status, iFileNO=0;
char pBueffel[1024], pHeader[1024], pWork[132], pWork2[60], pTen[12],
*pcPtr;
time_t iDate;
@ -152,7 +152,7 @@ static int TASHeader(pScanData self)
pIDrivable pDrive = NULL;
pEVControl pTem = NULL;
pSicsVariable sVar = NULL;
float f1, f2, f3, f4;
float f1=.0, f2=.0, f3=.0, f4=.0;
assert(self);
assert(pTAS);

View File

@ -18,6 +18,9 @@
#include <tcl.h>
#include <tcl-private/generic/tclInt.h>
#include <tcl-private/generic/tclPort.h>
typedef long TIMEZONE_t;

View File

@ -207,8 +207,8 @@ static int enableTdc(pTdc self)
*/
in.c = 0;
in.b = self->range;
in.d = (char) ((self->n >> 8) && 255);
in.e = (char) (self->n && 255);
in.d = (char) ((self->n >> 8) & 255);
in.e = (char) (self->n & 255);
return ecbExecute(self->tdc, 131, in, &out);
}
@ -286,7 +286,7 @@ static int TDCHalt(pHistDriver self)
static int TDCCountStatus(pHistDriver self, SConnection * pCon)
{
pTdc tdc = NULL;
int tdcstatus, status;
int tdcstatus, status = HWFault;
float fControl, fOldControl;
MonEvent sMon;

View File

@ -7,7 +7,7 @@
include macosx_def
CC = gcc
CC = clang
FC = g77
CFLAGS = -DLINUX -I.. -I../.. -g $(DFORTIFY)
FFLAGS = -Wimplicit -g

View File

@ -93,7 +93,7 @@ int TecsWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
{
pEVControl self = NULL;
char pBueffel[1024], result[1024], *res;
int iRet;
int iRet = -1;
pEVDriver pD;
pTecsDriv pMe;
float fVal;