make it build with clang, clean up a shitload of warnings and errors,
make it obey CFLAGS, extract the embedded source so we can patch it.
This commit is contained in:
parent
a6ba306244
commit
e0b52f0ff8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2017/04/10 11:46:23 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
COMMENT-main = model railroad control daemon
|
||||
COMMENT-gui = model railroad control daemon client
|
||||
@ -10,8 +10,8 @@ PKGNAME-main = rocrail-${VERSION}.${REV}
|
||||
PKGNAME-gui = rocview-${VERSION}.${REV}
|
||||
CATEGORIES = misc x11
|
||||
|
||||
REVISION-main = 1
|
||||
REVISION-gui = 0
|
||||
REVISION-main = 2
|
||||
REVISION-gui = 1
|
||||
|
||||
HOMEPAGE = http://www.rocrail.net/
|
||||
MAINTAINER = Sebastian Reitenbach <sebastia@openbsd.org>
|
||||
@ -48,6 +48,10 @@ THEMES2 = Accessories \
|
||||
Roads \
|
||||
SpDrS60/alt
|
||||
|
||||
post-extract:
|
||||
mkdir ${WRKDIST}/unxgen
|
||||
cd ${WRKDIST}/unxgen && tar zxf ${WRKDIST}/rocs/rocs-gen.tar.gz
|
||||
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib/rocrail
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/rocrail
|
||||
|
41
misc/rocrail/patches/patch-analyser_impl_analyse_c
Normal file
41
misc/rocrail/patches/patch-analyser_impl_analyse_c
Normal file
@ -0,0 +1,41 @@
|
||||
$OpenBSD: patch-analyser_impl_analyse_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: analyser/impl/analyse.c
|
||||
--- analyser/impl/analyse.c.orig
|
||||
+++ analyser/impl/analyse.c
|
||||
@@ -1208,7 +1208,7 @@ static Boolean __analyseBehindConnector(iOAnalyse inst
|
||||
__analyseItem(inst, nextitem, route, occ, travel, 0, depth, searchingSignal, behindABlock );
|
||||
}
|
||||
|
||||
- return;
|
||||
+ return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1437,7 +1437,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
|
||||
searchingSignal = False;
|
||||
|
||||
if( behindABlock) {
|
||||
- return;
|
||||
+ return False;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,7 +1454,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
|
||||
if( behindABlock) {
|
||||
TraceOp.trc( name, TRCLEVEL_DEBUG, __LINE__, 9999, "behind a block");
|
||||
|
||||
- return;
|
||||
+ return False;
|
||||
}
|
||||
|
||||
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999, "next is a block: [%s]", wItem.getid(nextitem));
|
||||
@@ -1503,7 +1503,7 @@ static Boolean __analyseItem(iOAnalyse inst, iONode it
|
||||
|
||||
if( travelp > 10 && behindABlock){
|
||||
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999, " found a turnout [%s] behind the end block: return", wItem.getid(nextitem));
|
||||
- return;
|
||||
+ return False;
|
||||
}
|
||||
|
||||
/* item is a turnout -> coming from the points: dive into branches */
|
17
misc/rocrail/patches/patch-analyser_makefile
Normal file
17
misc/rocrail/patches/patch-analyser_makefile
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-analyser_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: analyser/makefile
|
||||
--- analyser/makefile.orig
|
||||
+++ analyser/makefile
|
||||
@@ -87,9 +87,9 @@ DEBUG=-g
|
||||
DESTDIR=$(FS)opt$(FS)rocrail
|
||||
BINDIR=..$(FS)rocs$(FS)bin
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
|
||||
|
||||
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
|
14
misc/rocrail/patches/patch-rocdigs_impl_dcc232_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_dcc232_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_dcc232_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/dcc232.c
|
||||
--- rocdigs/impl/dcc232.c.orig
|
||||
+++ rocdigs/impl/dcc232.c
|
||||
@@ -765,7 +765,7 @@ static int __getcvbyte(iODCC232 inst, int cv) {
|
||||
/* no special error handling, it's job of the clients */
|
||||
if (cv<0 || cv>1024) {
|
||||
TraceOp.trc( name, TRCLEVEL_EXCEPTION, __LINE__, 9999, "PT: CV[%d] out of range", cv);
|
||||
- return;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
TraceOp.trc( name, TRCLEVEL_MONITOR, __LINE__, 9999, "PT: enable booster output");
|
23
misc/rocrail/patches/patch-rocdigs_impl_ddx_nmra_c
Normal file
23
misc/rocrail/patches/patch-rocdigs_impl_ddx_nmra_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-rocdigs_impl_ddx_nmra_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/ddx/nmra.c
|
||||
--- rocdigs/impl/ddx/nmra.c.orig
|
||||
+++ rocdigs/impl/ddx/nmra.c
|
||||
@@ -1112,7 +1112,7 @@ int protocol_nmra_sm_direct_cvbyte(obj inst, int cv, i
|
||||
int ack = 0;
|
||||
|
||||
/* no special error handling, it's job of the clients */
|
||||
- if (cv<0 || cv>1024 || value<0 || value>255) return;
|
||||
+ if (cv<0 || cv>1024 || value<0 || value>255) return 0;
|
||||
|
||||
if (!sm_initialized) sm_init();
|
||||
|
||||
@@ -1333,7 +1333,7 @@ int nmragetcvbyte(obj inst, int cv) {
|
||||
TraceOp.trc( __FILE__, TRCLEVEL_MONITOR, __LINE__, 9999, "PT: cvget for %d", cv);
|
||||
|
||||
/* no special error handling, it's job of the clients */
|
||||
- if (cv<0 || cv>1024) return;
|
||||
+ if (cv<0 || cv>1024) return 0;
|
||||
|
||||
if (!sm_initialized) sm_init();
|
||||
|
14
misc/rocrail/patches/patch-rocdigs_impl_loconet_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_loconet_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_loconet_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/loconet.c
|
||||
--- rocdigs/impl/loconet.c.orig
|
||||
+++ rocdigs/impl/loconet.c
|
||||
@@ -1619,7 +1619,7 @@ static int __setFastClock(iOLocoNet loconet, iONode no
|
||||
int hours = 10;
|
||||
int mins = 30;
|
||||
|
||||
- long l_time = wClock.gettime(node);
|
||||
+ time_t l_time = wClock.gettime(node);
|
||||
struct tm* lTime = localtime( &l_time );
|
||||
|
||||
mins = lTime->tm_min;
|
27
misc/rocrail/patches/patch-rocdigs_impl_loconet_lnmaster_c
Normal file
27
misc/rocrail/patches/patch-rocdigs_impl_loconet_lnmaster_c
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-rocdigs_impl_loconet_lnmaster_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/loconet/lnmaster.c
|
||||
--- rocdigs/impl/loconet/lnmaster.c.orig
|
||||
+++ rocdigs/impl/loconet/lnmaster.c
|
||||
@@ -379,17 +379,17 @@ static Boolean __setstat1byte(struct __lnslot* slot, i
|
||||
slot[slotnr].format = 0;
|
||||
|
||||
if( stat & DEC_MODE_128 ) {
|
||||
- slot[slotnr].steps == 128;
|
||||
+ slot[slotnr].steps = 128;
|
||||
}
|
||||
else if( stat & DEC_MODE_28 ) {
|
||||
- slot[slotnr].steps == 28;
|
||||
+ slot[slotnr].steps = 28;
|
||||
}
|
||||
else if( stat & DEC_MODE_14 ) {
|
||||
- slot[slotnr].steps == 14;
|
||||
+ slot[slotnr].steps = 14;
|
||||
}
|
||||
else if( stat & DEC_MODE_28TRI ) {
|
||||
slot[slotnr].format = 1;
|
||||
- slot[slotnr].steps == 28;
|
||||
+ slot[slotnr].steps = 28;
|
||||
}
|
||||
|
||||
TraceOp.trc( name, TRCLEVEL_INFO, __LINE__, 9999,
|
14
misc/rocrail/patches/patch-rocdigs_impl_nmra_nmra_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_nmra_nmra_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_nmra_nmra_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/nmra/nmra.c
|
||||
--- rocdigs/impl/nmra/nmra.c.orig
|
||||
+++ rocdigs/impl/nmra/nmra.c
|
||||
@@ -1390,7 +1390,7 @@ int createCVsetpacket(int cv, int value, char* SendStr
|
||||
int ack = 0;
|
||||
|
||||
/* no special error handling, it's job of the clients */
|
||||
- if (cv<0 || cv>1024 || value<0 || value>255) return;
|
||||
+ if (cv<0 || cv>1024 || value<0 || value>255) return 0;
|
||||
|
||||
if (!smInitialized)
|
||||
smInit();
|
14
misc/rocrail/patches/patch-rocdigs_impl_opendcc_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_opendcc_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_opendcc_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/opendcc.c
|
||||
--- rocdigs/impl/opendcc.c.orig
|
||||
+++ rocdigs/impl/opendcc.c
|
||||
@@ -140,7 +140,7 @@ static iONode _cmd( obj inst ,const iONode cmd ) {
|
||||
iONode clockcmd = NodeOp.inst( wBinCmd.name(), NULL, ELEMENT_NODE );
|
||||
char* byteStr = NULL;
|
||||
byte outBytes[6];
|
||||
- long l_time = wClock.gettime(cmd);
|
||||
+ time_t l_time = wClock.gettime(cmd);
|
||||
struct tm* lTime = localtime( &l_time );
|
||||
|
||||
int mins = lTime->tm_min;
|
14
misc/rocrail/patches/patch-rocdigs_impl_p50x_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_p50x_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_p50x_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/p50x.c
|
||||
--- rocdigs/impl/p50x.c.orig
|
||||
+++ rocdigs/impl/p50x.c
|
||||
@@ -602,7 +602,7 @@ static Boolean __getversion( iOP50x inst ) {
|
||||
else
|
||||
state = P50_SNDERR;
|
||||
|
||||
- if( state = P50_OK ) {
|
||||
+ if( state == P50_OK ) {
|
||||
int bAvail = 0;
|
||||
ThreadOp.sleep( 500 );
|
||||
bAvail = SerialOp.available(data->serial);
|
14
misc/rocrail/patches/patch-rocdigs_impl_xpressnet_opendcc_c
Normal file
14
misc/rocrail/patches/patch-rocdigs_impl_xpressnet_opendcc_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocdigs_impl_xpressnet_opendcc_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/impl/xpressnet/opendcc.c
|
||||
--- rocdigs/impl/xpressnet/opendcc.c.orig
|
||||
+++ rocdigs/impl/xpressnet/opendcc.c
|
||||
@@ -245,7 +245,7 @@ void opendccTranslate( obj xpressnet, void* node ) {
|
||||
When no Parameters are given, it is a query and the answer will be sent only to the requesting slave.
|
||||
*/
|
||||
if( data->fastclock && StrOp.equals( wClock.set, wClock.getcmd( node ) ) ) {
|
||||
- long l_time = wClock.gettime(node);
|
||||
+ time_t l_time = wClock.gettime(node);
|
||||
struct tm* lTime = localtime( &l_time );
|
||||
|
||||
int mins = lTime->tm_min;
|
28
misc/rocrail/patches/patch-rocdigs_makefile
Normal file
28
misc/rocrail/patches/patch-rocdigs_makefile
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-rocdigs_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocdigs/makefile
|
||||
--- rocdigs/makefile.orig
|
||||
+++ rocdigs/makefile
|
||||
@@ -69,7 +69,7 @@ else ifeq ($(PLATFORM),OPENBSD)
|
||||
DIRPREFIX=unx
|
||||
CC_EXTRA_FLAGS=-fPIC
|
||||
LNK_FLAGS=-shared
|
||||
- LNK=gcc
|
||||
+ LNK=$(CC)
|
||||
SHAREDSUFFIX=.so
|
||||
else
|
||||
LIBS=-lpthread -ldl
|
||||
@@ -88,10 +88,10 @@ DEBUG=-g
|
||||
DESTDIR=$(FS)opt$(FS)rocrail
|
||||
BINDIR=..$(FS)rocs$(FS)bin
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
-DDL_CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -O2 -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+DDL_CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -O2 -I$(INCL_PATH) -I$(GENDIR)
|
||||
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocutils.a $(OUTDIR)$(FS)librocs.a
|
||||
|
||||
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
|
19
misc/rocrail/patches/patch-rocint_makefile
Normal file
19
misc/rocrail/patches/patch-rocint_makefile
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-rocint_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocint/makefile
|
||||
--- rocint/makefile.orig
|
||||
+++ rocint/makefile
|
||||
@@ -67,10 +67,10 @@ TMPOUTDIR=$(GENDIR)$(FS)rocint$(FS)bin
|
||||
DEBUG=-g
|
||||
BINDIR=..$(FS)$(COREDIR)bin
|
||||
|
||||
-CPP=gcc
|
||||
-LNK=gcc
|
||||
+CPP=$(CC)
|
||||
+LNK=$(CC)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
|
||||
|
||||
all:
|
||||
cd $(GENDIR)$(FS)rocint$(CS) ..$(FS)..$(FS)rocs$(FS)bin$(FS)ogen$(GENSUFFIX) ..$(FS)..$(FS)rocint$(FS)rocint.xml
|
23
misc/rocrail/patches/patch-roclcdr_impl_tools_schedules_c
Normal file
23
misc/rocrail/patches/patch-roclcdr_impl_tools_schedules_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-roclcdr_impl_tools_schedules_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: roclcdr/impl/tools/schedules.c
|
||||
--- roclcdr/impl/tools/schedules.c.orig
|
||||
+++ roclcdr/impl/tools/schedules.c
|
||||
@@ -50,7 +50,7 @@ static Boolean isHourlyInRange(iILcDriverInt inst, iON
|
||||
int hours = 0;
|
||||
int mins = 0;
|
||||
|
||||
- long modeltime = data->model->getTime( data->model );
|
||||
+ time_t modeltime = data->model->getTime( data->model );
|
||||
struct tm* ltm;
|
||||
|
||||
ltm = localtime( &modeltime );
|
||||
@@ -214,7 +214,7 @@ Boolean checkScheduleTime( iILcDriverInt inst, const c
|
||||
/* check if the schedule index is correct: */
|
||||
while( entry != NULL ) {
|
||||
if( idx == scheduleIdx ) {
|
||||
- long modeltime = data->model->getTime( data->model );
|
||||
+ time_t modeltime = data->model->getTime( data->model );
|
||||
struct tm* ltm;
|
||||
int modelminutes = 0;
|
||||
int scheduleminutes = 0;
|
17
misc/rocrail/patches/patch-roclcdr_makefile
Normal file
17
misc/rocrail/patches/patch-roclcdr_makefile
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-roclcdr_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: roclcdr/makefile
|
||||
--- roclcdr/makefile.orig
|
||||
+++ roclcdr/makefile
|
||||
@@ -88,9 +88,9 @@ DEBUG=-g
|
||||
DESTDIR=$(FS)opt$(FS)rocrail
|
||||
BINDIR=..$(FS)rocs$(FS)bin
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
|
||||
|
||||
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
|
14
misc/rocrail/patches/patch-rocrail_impl_action_c
Normal file
14
misc/rocrail/patches/patch-rocrail_impl_action_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocrail_impl_action_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/action.c
|
||||
--- rocrail/impl/action.c.orig
|
||||
+++ rocrail/impl/action.c
|
||||
@@ -819,7 +819,7 @@ static void _exec( struct OAction* inst, iONode action
|
||||
static void _tick( iOAction inst ) {
|
||||
iOActionData data = Data(inst);
|
||||
iOControl control = AppOp.getControl();
|
||||
- long l_time = ControlOp.getTime(control);
|
||||
+ time_t l_time = ControlOp.getTime(control);
|
||||
struct tm* lTime = localtime( &l_time );
|
||||
|
||||
data->ticker++; /* scale minutes */
|
14
misc/rocrail/patches/patch-rocrail_impl_display_c
Normal file
14
misc/rocrail/patches/patch-rocrail_impl_display_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocrail_impl_display_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/display.c
|
||||
--- rocrail/impl/display.c.orig
|
||||
+++ rocrail/impl/display.c
|
||||
@@ -97,7 +97,7 @@ static const char* __getSystemMenu(Boolean select) {
|
||||
iODisplayData data = NULL;
|
||||
|
||||
if( __displayinst == NULL ) {
|
||||
- return;
|
||||
+ return "";
|
||||
}
|
||||
data = Data(__displayinst);
|
||||
if( data->menulevel == 0 ) {
|
23
misc/rocrail/patches/patch-rocrail_impl_hclient_c
Normal file
23
misc/rocrail/patches/patch-rocrail_impl_hclient_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-rocrail_impl_hclient_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/hclient.c
|
||||
--- rocrail/impl/hclient.c.orig
|
||||
+++ rocrail/impl/hclient.c
|
||||
@@ -174,7 +174,7 @@ static void __scan4Html( iOHClient inst ) {
|
||||
if( StrOp.endsWithi( fileName, ".html" ) || StrOp.endsWithi( fileName, ".htm" ) ) {
|
||||
char* path = StrOp.fmt( "%s%c%s", data->path, SystemOp.getFileSeparator(), fileName );
|
||||
long size = FileOp.fileSize( path );
|
||||
- long ftime = FileOp.fileTime( path );
|
||||
+ time_t ftime = FileOp.fileTime( path );
|
||||
StrOp.replaceAll( path, '\\', '/' );
|
||||
SocketOp.fmt( data->socket, "<tr><td><a href=\"%s\">%s</a></td><td align=\"right\">%ld</td><td align=\"right\">%s</td></tr>\n",
|
||||
path, path, size, ctime(&ftime) );
|
||||
@@ -267,7 +267,7 @@ static void __getHome( iOHClient inst ) {
|
||||
SocketOp.fmt( data->socket, "<table border=\"1\" cellpadding=\"4\" cellspacing= \"0\">\n" );
|
||||
SocketOp.fmt( data->socket, "<tr><td>process id </td><td>%d </td></tr>\n", SystemOp.getpid() );
|
||||
{
|
||||
- long t = AppOp.getStartTime();
|
||||
+ time_t t = AppOp.getStartTime();
|
||||
SocketOp.fmt( data->socket, "<tr><td>started at</td><td>%s</td></tr>\n", ctime( &t ) );
|
||||
}
|
||||
|
14
misc/rocrail/patches/patch-rocrail_impl_modplan_c
Normal file
14
misc/rocrail/patches/patch-rocrail_impl_modplan_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocrail_impl_modplan_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/modplan.c
|
||||
--- rocrail/impl/modplan.c.orig
|
||||
+++ rocrail/impl/modplan.c
|
||||
@@ -903,7 +903,7 @@ static iONode _setModule( iOModPlan inst, iONode modul
|
||||
if( planmodule == NULL ) {
|
||||
TraceOp.trc( name, TRCLEVEL_WARNING, __LINE__, 9999,
|
||||
"no module found with id [%s] or [%s]", wModule.getid(module), wItem.getprev_id(module) );
|
||||
- return;
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
wModule.settitle( planmodule, wModule.gettitle(module) );
|
14
misc/rocrail/patches/patch-rocrail_impl_snmp_c
Normal file
14
misc/rocrail/patches/patch-rocrail_impl_snmp_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocrail_impl_snmp_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/snmp.c
|
||||
--- rocrail/impl/snmp.c.orig
|
||||
+++ rocrail/impl/snmp.c
|
||||
@@ -780,7 +780,7 @@ static int __handleGetRequest(iOSNMP snmp, iOSnmpHdr h
|
||||
TraceOp.trc( name, TRCLEVEL_BYTE, __LINE__, 9999, "next request for %s=%s", oid, val );
|
||||
}
|
||||
else {
|
||||
- val == NULL;
|
||||
+ val = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
14
misc/rocrail/patches/patch-rocrail_impl_srcpcon_c
Normal file
14
misc/rocrail/patches/patch-rocrail_impl_srcpcon_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocrail_impl_srcpcon_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/impl/srcpcon.c
|
||||
--- rocrail/impl/srcpcon.c.orig
|
||||
+++ rocrail/impl/srcpcon.c
|
||||
@@ -346,7 +346,7 @@ static char* __rr2srcp(iOSrcpConData data, iONode evt,
|
||||
}
|
||||
|
||||
else if( StrOp.equals( wClock.name(), NodeOp.getName(evt)) ) {
|
||||
- long l_time = wClock.gettime(evt);
|
||||
+ time_t l_time = wClock.gettime(evt);
|
||||
struct tm* lTime = localtime( &l_time );
|
||||
|
||||
int mins = lTime->tm_min;
|
19
misc/rocrail/patches/patch-rocrail_makefile
Normal file
19
misc/rocrail/patches/patch-rocrail_makefile
Normal file
@ -0,0 +1,19 @@
|
||||
$OpenBSD: patch-rocrail_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocrail/makefile
|
||||
--- rocrail/makefile.orig
|
||||
+++ rocrail/makefile
|
||||
@@ -80,10 +80,10 @@ DEBUG=-g
|
||||
DESTDIR=$(FS)opt$(FS)rocrail
|
||||
BINDIR=..$(FS)rocs$(FS)bin
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
-LNK=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
+LNK=$(TOOLPREFIX)$(CC)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(ANSI) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(CFLAGS) $(ANSI) -I$(INCL_PATH) -I$(GENDIR)
|
||||
LNK_FLAGS=
|
||||
RRLIBS=$(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a $(OUTDIR)$(FS)librocutils.a $(OUTDIR)$(FS)librocrail.a
|
||||
|
13
misc/rocrail/patches/patch-rocs_gen_mdoc_c
Normal file
13
misc/rocrail/patches/patch-rocs_gen_mdoc_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-rocs_gen_mdoc_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/gen/mdoc.c
|
||||
--- rocs/gen/mdoc.c.orig
|
||||
+++ rocs/gen/mdoc.c
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
+#include <string.h>
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* platform dependent interfaces.
|
13
misc/rocrail/patches/patch-rocs_gen_ogen_c
Normal file
13
misc/rocrail/patches/patch-rocs_gen_ogen_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-rocs_gen_ogen_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/gen/ogen.c
|
||||
--- rocs/gen/ogen.c.orig
|
||||
+++ rocs/gen/ogen.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
+#include <string.h>
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* platform dependent interfaces.
|
13
misc/rocrail/patches/patch-rocs_gen_wgen_c
Normal file
13
misc/rocrail/patches/patch-rocs_gen_wgen_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-rocs_gen_wgen_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/gen/wgen.c
|
||||
--- rocs/gen/wgen.c.orig
|
||||
+++ rocs/gen/wgen.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
+#include <string.h>
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* platform dependent interfaces.
|
23
misc/rocrail/patches/patch-rocs_impl_mem_c
Normal file
23
misc/rocrail/patches/patch-rocs_impl_mem_c
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-rocs_impl_mem_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/impl/mem.c
|
||||
--- rocs/impl/mem.c.orig
|
||||
+++ rocs/impl/mem.c
|
||||
@@ -53,13 +53,13 @@ static void _mem_init( void ) {
|
||||
static char __opStr[1024];
|
||||
static const char* _mem_getLastOperation( void ) {
|
||||
const char* op = "?";
|
||||
- if( mt.type = MEMTYPE_ALLOC )
|
||||
+ if( mt.type == MEMTYPE_ALLOC )
|
||||
op = "alloc";
|
||||
- else if( mt.type = MEMTYPE_FREE )
|
||||
+ else if( mt.type == MEMTYPE_FREE )
|
||||
op = "free";
|
||||
- else if( mt.type = MEMTYPE_CHECK )
|
||||
+ else if( mt.type == MEMTYPE_CHECK )
|
||||
op = "check";
|
||||
- else if( mt.type = MEMTYPE_REALLOC )
|
||||
+ else if( mt.type == MEMTYPE_REALLOC )
|
||||
op = "realloc";
|
||||
sprintf( __opStr, ">>>>> memLastOp: op=%s p=0x%08X file=%s line=%d <<<<<", op, mt.p, mt.file, mt.line );
|
||||
return __opStr;
|
31
misc/rocrail/patches/patch-rocs_impl_str_c
Normal file
31
misc/rocrail/patches/patch-rocs_impl_str_c
Normal file
@ -0,0 +1,31 @@
|
||||
$OpenBSD: patch-rocs_impl_str_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/impl/str.c
|
||||
--- rocs/impl/str.c.orig
|
||||
+++ rocs/impl/str.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "rocs/public/str.h"
|
||||
#include "rocs/public/mem.h"
|
||||
@@ -520,7 +521,7 @@ static char* _createStampNoDotsID( RocsMemID id ) {
|
||||
}
|
||||
|
||||
|
||||
-static char* _isoDate( long tt ) {
|
||||
+static char* _isoDate( time_t tt ) {
|
||||
struct tm* t = NULL;
|
||||
|
||||
/* Alloc a string for the stamp; caller should freeup! */
|
||||
@@ -536,7 +537,7 @@ static char* _isoDate( long tt ) {
|
||||
return s;
|
||||
}
|
||||
|
||||
-static char* _isoTime( long tt ) {
|
||||
+static char* _isoTime( time_t tt ) {
|
||||
struct tm* t = NULL;
|
||||
|
||||
/* Alloc a string for the stamp; caller should freeup! */
|
14
misc/rocrail/patches/patch-rocs_impl_unx_umutex_c
Normal file
14
misc/rocrail/patches/patch-rocs_impl_unx_umutex_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocs_impl_unx_umutex_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/impl/unx/umutex.c
|
||||
--- rocs/impl/unx/umutex.c.orig
|
||||
+++ rocs/impl/unx/umutex.c
|
||||
@@ -94,7 +94,7 @@ Boolean rocs_mutex_wait( iOMutexData o, int t ) {
|
||||
if( t == -1 ) {
|
||||
rc = pthread_mutex_lock( (pthread_mutex_t*)data->mh );
|
||||
}
|
||||
- else if( rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh ) == EBUSY ) {
|
||||
+ else if( (rc = pthread_mutex_trylock( (pthread_mutex_t*)data->mh )) == EBUSY ) {
|
||||
int try = t / 10 + 1;
|
||||
do {
|
||||
ThreadOp.sleep( 10 );
|
13
misc/rocrail/patches/patch-rocs_impl_unx_uthread_c
Normal file
13
misc/rocrail/patches/patch-rocs_impl_unx_uthread_c
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-rocs_impl_unx_uthread_c,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/impl/unx/uthread.c
|
||||
--- rocs/impl/unx/uthread.c.orig
|
||||
+++ rocs/impl/unx/uthread.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stddef.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
30
misc/rocrail/patches/patch-rocs_makefile
Normal file
30
misc/rocrail/patches/patch-rocs_makefile
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-rocs_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/makefile
|
||||
--- rocs/makefile.orig
|
||||
+++ rocs/makefile
|
||||
@@ -85,11 +85,11 @@ OPENSSL=
|
||||
SSLLIBS=
|
||||
AR=$(TOOLPREFIX)ar
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
-LNK=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
+LNK=$(TOOLPREFIX)$(CC)
|
||||
|
||||
# --- compile flags ---
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(OPENSSL) -I$(SRCMOUNTPOINT) -I$(GENMOUNTPOINT)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(CFLAGS) $(OPENSSL) -I$(SRCMOUNTPOINT) -I$(GENMOUNTPOINT)
|
||||
|
||||
# --- link flags ---
|
||||
LNK_FLAGS=
|
||||
@@ -172,8 +172,7 @@ fromtar:
|
||||
-$(MKDIR) $(GENMOUNTPOINT)$(FS)rocs
|
||||
-$(REMOVE) $(TMPOUTDIR)$(FS)*.o
|
||||
-$(REMOVE) $(OUTDIR)$(FS)librocs.a
|
||||
- cd $(GENMOUNTPOINT)$(CS) \
|
||||
- $(COPY) ..$(FS)rocs$(FS)rocs-gen.tar.gz .$(CS) gzip -df rocs-gen.tar.gz$(CS) tar -xf rocs-gen.tar
|
||||
+
|
||||
|
||||
|
||||
ssl: OPENSSL=-D__OPENSSL__
|
14
misc/rocrail/patches/patch-rocs_public_rocs_h
Normal file
14
misc/rocrail/patches/patch-rocs_public_rocs_h
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-rocs_public_rocs_h,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocs/public/rocs.h
|
||||
--- rocs/public/rocs.h.orig
|
||||
+++ rocs/public/rocs.h
|
||||
@@ -40,7 +40,7 @@
|
||||
#define _POSIX_SOURCE
|
||||
#define __EXTENSIONS__
|
||||
#elif defined __unix__
|
||||
- #pragma message("--- [Unix] ---")
|
||||
+/* SHHHH who cares */
|
||||
#else
|
||||
#error *** Unsupported Operating System ***
|
||||
#endif
|
20
misc/rocrail/patches/patch-rocutils_makefile
Normal file
20
misc/rocrail/patches/patch-rocutils_makefile
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-rocutils_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocutils/makefile
|
||||
--- rocutils/makefile.orig
|
||||
+++ rocutils/makefile
|
||||
@@ -69,11 +69,11 @@ BINDIR=..$(FS)$(COREDIR)bin
|
||||
|
||||
AR=$(TOOLPREFIX)ar
|
||||
|
||||
-CPP=$(TOOLPREFIX)gcc
|
||||
-LNK=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CC)
|
||||
+LNK=$(TOOLPREFIX)$(CC)
|
||||
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -ansi -I$(INCL_PATH) -I$(GENDIR)
|
||||
|
||||
OBJS=$(patsubst impl/%.c,$(TMPOUTDIR)/%.o,$(wildcard impl/*.c))
|
||||
|
23
misc/rocrail/patches/patch-rocview_makefile
Normal file
23
misc/rocrail/patches/patch-rocview_makefile
Normal file
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-rocview_makefile,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: rocview/makefile
|
||||
--- rocview/makefile.orig
|
||||
+++ rocview/makefile
|
||||
@@ -104,13 +104,13 @@ DEBUG=-g
|
||||
DESTDIR=$(FS)opt$(FS)rocrail
|
||||
BINDIR=..$(FS)rocs$(FS)bin
|
||||
|
||||
-CPP=$(TOOLPREFIX)c++
|
||||
-CC=$(TOOLPREFIX)gcc
|
||||
+CPP=$(TOOLPREFIX)$(CXX)
|
||||
+CC=$(TOOLPREFIX)$(CC)
|
||||
LNK=$(TOOLPREFIX)$(LINKTOOL)
|
||||
INCL_PATH=$(MOUNTPOINT)
|
||||
-CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_FLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) -I$(INCL_PATH) -I$(GENDIR)
|
||||
|
||||
-CC_WXFLAGS=-c $(CC_EXTRA_FLAGS) $(DEBUG) $(WX_FLAGS) $(WX_INCL) -I$(INCL_PATH) -I$(GENDIR)
|
||||
+CC_WXFLAGS=-c $(CC_EXTRA_FLAGS) $(CFLAGS) $(DEBUG) $(WX_FLAGS) $(WX_INCL) -I$(INCL_PATH) -I$(GENDIR)
|
||||
RRLIBS=$(OUTDIR)$(FS)librocrail.a $(OUTDIR)$(FS)libwrapper.a $(OUTDIR)$(FS)librocs.a
|
||||
|
||||
SRCS=impl$(FS)guiapp.cpp impl$(FS)item.cpp impl$(FS)locdlg.cpp impl$(FS)planpanel.cpp impl$(FS)propdlg.cpp impl$(FS)swdlg.cpp impl$(FS)streetdlg.cpp impl$(FS)bktext.cpp
|
14
misc/rocrail/patches/patch-unxgen_rocs_public_serial_h
Normal file
14
misc/rocrail/patches/patch-unxgen_rocs_public_serial_h
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-unxgen_rocs_public_serial_h,v 1.1 2017/05/07 23:57:16 espie Exp $
|
||||
|
||||
Index: unxgen/rocs/public/serial.h
|
||||
--- unxgen/rocs/public/serial.h.orig
|
||||
+++ unxgen/rocs/public/serial.h
|
||||
@@ -23,7 +23,7 @@ typedef enum {cts=1,dsr=2,xon=3} serial_flow;
|
||||
typedef enum {onestopbit=1,twostopbits=2} serial_stopbits;
|
||||
typedef enum {eight=8,seven=7} serial_databits;
|
||||
typedef enum {undefined=0,mm=1,dcc=2,mma=3} serial_mode;
|
||||
-typedef serial_bps;
|
||||
+typedef int serial_bps;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user