Made SICS PSI part compile on OSX Maverick with clang
This commit is contained in:
4
bruker.c
4
bruker.c
@ -234,7 +234,7 @@ int BrukerReadCurrent(pEVControl pEva, float *fField)
|
|||||||
static int BrukerGet(pEVDriver pEva, float *fValue)
|
static int BrukerGet(pEVDriver pEva, float *fValue)
|
||||||
{
|
{
|
||||||
pBrukerDriv self = NULL;
|
pBrukerDriv self = NULL;
|
||||||
int iRet, iSign = 1;
|
int iRet=0, iSign = 1;
|
||||||
char pBueffel[80];
|
char pBueffel[80];
|
||||||
char pCommand[6];
|
char pCommand[6];
|
||||||
char *pPtr, *pSign = NULL;
|
char *pPtr, *pSign = NULL;
|
||||||
@ -283,7 +283,7 @@ static int BrukerGet(pEVDriver pEva, float *fValue)
|
|||||||
static int BrukerRun(pEVDriver pEva, float fVal)
|
static int BrukerRun(pEVDriver pEva, float fVal)
|
||||||
{
|
{
|
||||||
pBrukerDriv self = NULL;
|
pBrukerDriv self = NULL;
|
||||||
int iRet;
|
int iRet =0;
|
||||||
char pBueffel[80];
|
char pBueffel[80];
|
||||||
char pCommand[40];
|
char pCommand[40];
|
||||||
char *pPtr;
|
char *pPtr;
|
||||||
|
2
ease.c
2
ease.c
@ -754,7 +754,7 @@ static int EaseInit(SConnection * pCon, EaseBase * eab, int argc,
|
|||||||
<host> <port>
|
<host> <port>
|
||||||
<host>:<port>
|
<host>:<port>
|
||||||
*/
|
*/
|
||||||
int port, iRet, i;
|
int port=0, iRet, i;
|
||||||
rs232 *ser;
|
rs232 *ser;
|
||||||
char *colon, *host;
|
char *colon, *host;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
@ -73,7 +73,7 @@ int FocusAverageDo(SConnection * pCon, SicsInterp * pSics, void *pData,
|
|||||||
pSicsVariable var1 = NULL;
|
pSicsVariable var1 = NULL;
|
||||||
pSicsVariable var2 = NULL;
|
pSicsVariable var2 = NULL;
|
||||||
pSicsVariable var3 = NULL;
|
pSicsVariable var3 = NULL;
|
||||||
int lbank, mbank, ubank;
|
int lbank=0, mbank=0, ubank=0;
|
||||||
|
|
||||||
self = (pFocusAverager) pData;
|
self = (pFocusAverager) pData;
|
||||||
assert(self);
|
assert(self);
|
||||||
@ -330,7 +330,7 @@ int MakeFA(SConnection * pCon, SicsInterp * pSics, void *pData,
|
|||||||
pSicsVariable var1 = NULL;
|
pSicsVariable var1 = NULL;
|
||||||
pSicsVariable var2 = NULL;
|
pSicsVariable var2 = NULL;
|
||||||
pSicsVariable var3 = NULL;
|
pSicsVariable var3 = NULL;
|
||||||
int lbank, mbank, ubank;
|
int lbank=0, mbank=0, ubank=0;
|
||||||
|
|
||||||
assert(pCon);
|
assert(pCon);
|
||||||
assert(pSics);
|
assert(pSics);
|
||||||
@ -432,7 +432,7 @@ HistInt *CheckBank(pFocusAverager self, SConnection * pCon,
|
|||||||
HistInt *mData = NULL;
|
HistInt *mData = NULL;
|
||||||
HistInt *uData = NULL;
|
HistInt *uData = NULL;
|
||||||
HistInt *mergData = NULL;
|
HistInt *mergData = NULL;
|
||||||
int lbank, mbank, ubank;
|
int lbank=0, mbank=0, ubank=0;
|
||||||
|
|
||||||
if (iBank == 2) {
|
if (iBank == 2) {
|
||||||
var2 = FindVariable(pServ->pSics, "mbank");
|
var2 = FindVariable(pServ->pSics, "mbank");
|
||||||
|
18
hardsup/makefile_macosx
Normal file
18
hardsup/makefile_macosx
Normal 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)
|
||||||
|
|
@ -8,8 +8,8 @@
|
|||||||
# Mark Koennecke, February 2014
|
# Mark Koennecke, February 2014
|
||||||
#==========================================================================
|
#==========================================================================
|
||||||
|
|
||||||
#include ../linux_def
|
include $(SICSROOT)/sics/linux_def
|
||||||
include $(SICSROOT)/sics/sllinux_def
|
#include $(SICSROOT)/sics/sllinux_def
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
25
makefile_macosx
Normal file
25
makefile_macosx
Normal 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
2
sinq.c
@ -31,7 +31,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include "dgrambroadcast.h"
|
#include "dgrambroadcast.h"
|
||||||
|
|
||||||
#include <sinq.h>
|
#include "sinq.h"
|
||||||
#include <asynnet.h>
|
#include <asynnet.h>
|
||||||
|
|
||||||
#ifdef SEND_PORT
|
#ifdef SEND_PORT
|
||||||
|
@ -635,7 +635,7 @@ static int SQStatus(pHistDriver self, SConnection * pCon)
|
|||||||
COUNTID);
|
COUNTID);
|
||||||
if (pCountInt) {
|
if (pCountInt) {
|
||||||
status = pCountInt->CheckCountStatus(pInternal->pCounter, pCon);
|
status = pCountInt->CheckCountStatus(pInternal->pCounter, pCon);
|
||||||
if ((status == HWFault)) {
|
if (status == HWFault) {
|
||||||
ReleaseCountLock(pCountInt);
|
ReleaseCountLock(pCountInt);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ static char *findLastPoint(char *text)
|
|||||||
static int TASHeader(pScanData self)
|
static int TASHeader(pScanData self)
|
||||||
{
|
{
|
||||||
pTASdata pTAS = (pTASdata) self->pSpecial;
|
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],
|
char pBueffel[1024], pHeader[1024], pWork[132], pWork2[60], pTen[12],
|
||||||
*pcPtr;
|
*pcPtr;
|
||||||
time_t iDate;
|
time_t iDate;
|
||||||
@ -152,7 +152,7 @@ static int TASHeader(pScanData self)
|
|||||||
pIDrivable pDrive = NULL;
|
pIDrivable pDrive = NULL;
|
||||||
pEVControl pTem = NULL;
|
pEVControl pTem = NULL;
|
||||||
pSicsVariable sVar = NULL;
|
pSicsVariable sVar = NULL;
|
||||||
float f1, f2, f3, f4;
|
float f1=.0, f2=.0, f3=.0, f4=.0;
|
||||||
|
|
||||||
assert(self);
|
assert(self);
|
||||||
assert(pTAS);
|
assert(pTAS);
|
||||||
|
@ -18,6 +18,9 @@
|
|||||||
|
|
||||||
#include <tcl.h>
|
#include <tcl.h>
|
||||||
#include <tcl-private/generic/tclInt.h>
|
#include <tcl-private/generic/tclInt.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <tcl-private/generic/tclPort.h>
|
#include <tcl-private/generic/tclPort.h>
|
||||||
|
|
||||||
typedef long TIMEZONE_t;
|
typedef long TIMEZONE_t;
|
||||||
|
6
tdchm.c
6
tdchm.c
@ -207,8 +207,8 @@ static int enableTdc(pTdc self)
|
|||||||
*/
|
*/
|
||||||
in.c = 0;
|
in.c = 0;
|
||||||
in.b = self->range;
|
in.b = self->range;
|
||||||
in.d = (char) ((self->n >> 8) && 255);
|
in.d = (char) ((self->n >> 8) & 255);
|
||||||
in.e = (char) (self->n && 255);
|
in.e = (char) (self->n & 255);
|
||||||
|
|
||||||
return ecbExecute(self->tdc, 131, in, &out);
|
return ecbExecute(self->tdc, 131, in, &out);
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ static int TDCHalt(pHistDriver self)
|
|||||||
static int TDCCountStatus(pHistDriver self, SConnection * pCon)
|
static int TDCCountStatus(pHistDriver self, SConnection * pCon)
|
||||||
{
|
{
|
||||||
pTdc tdc = NULL;
|
pTdc tdc = NULL;
|
||||||
int tdcstatus, status;
|
int tdcstatus, status = HWFault;
|
||||||
float fControl, fOldControl;
|
float fControl, fOldControl;
|
||||||
MonEvent sMon;
|
MonEvent sMon;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
include macosx_def
|
include macosx_def
|
||||||
|
|
||||||
CC = gcc
|
CC = clang
|
||||||
FC = g77
|
FC = g77
|
||||||
CFLAGS = -DLINUX -I.. -I../.. -g $(DFORTIFY)
|
CFLAGS = -DLINUX -I.. -I../.. -g $(DFORTIFY)
|
||||||
FFLAGS = -Wimplicit -g
|
FFLAGS = -Wimplicit -g
|
||||||
|
@ -93,7 +93,7 @@ int TecsWrapper(SConnection * pCon, SicsInterp * pSics, void *pData,
|
|||||||
{
|
{
|
||||||
pEVControl self = NULL;
|
pEVControl self = NULL;
|
||||||
char pBueffel[1024], result[1024], *res;
|
char pBueffel[1024], result[1024], *res;
|
||||||
int iRet;
|
int iRet = -1;
|
||||||
pEVDriver pD;
|
pEVDriver pD;
|
||||||
pTecsDriv pMe;
|
pTecsDriv pMe;
|
||||||
float fVal;
|
float fVal;
|
||||||
|
Reference in New Issue
Block a user