Fix build with gcc4.2

This commit is contained in:
Kirill Ponomarev 2007-05-26 21:01:13 +00:00
parent d5f9a73cc0
commit 43adabc85f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=191939
3 changed files with 37 additions and 4 deletions

View file

@ -30,10 +30,6 @@ PLIST_FILES= bin/codeworker
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${OSVERSION} >= 700042
BROKEN= Broken with gcc 4.2
.endif
.if ${OSVERSION} < 500035 .if ${OSVERSION} < 500035
CFLAGS+= -fpermissive CFLAGS+= -fpermissive
.endif .endif

View file

@ -0,0 +1,14 @@
$FreeBSD$
--- GrfForeach.h.orig
+++ GrfForeach.h
@@ -83,7 +83,7 @@
virtual SEQUENCE_INTERRUPTION_LIST executeReverseSortedForeach(DtaScriptVariable& theVariable, DtaScriptVariable& stackForeach);
virtual SEQUENCE_INTERRUPTION_LIST executeReverseSortedIndirectForeach(DtaScriptVariable& theVariable, DtaScriptVariable& stackForeach);
- SEQUENCE_INTERRUPTION_LIST GrfForeach::iterate(DtaArrayIterator& iteratorData, DtaScriptVariable& stackForeach);
+ SEQUENCE_INTERRUPTION_LIST iterate(DtaArrayIterator& iteratorData, DtaScriptVariable& stackForeach);
};
}

View file

@ -0,0 +1,23 @@
$FreeBSD$
--- NetSocket.cpp.orig
+++ NetSocket.cpp
@@ -45,7 +45,7 @@
namespace CodeWorker {
bool socketReaderCBK(ScpStream& theStream, void* pData) {
char tcBuffer[2048];
- int hSocket = (int) pData;
+ int hSocket = (intptr_t) pData;
int iLength = recv(hSocket, tcBuffer, 2047, 0);
if (iLength <= 0) return false;
theStream.writeBinaryData(tcBuffer, iLength);
@@ -53,7 +53,7 @@
}
bool socketWriterCBK(ScpStream& theStream, void* pData) {
- int hSocket = (int) pData;
+ int hSocket = (intptr_t) pData;
int iLength = theStream.size();
if (iLength <= 0) return false;
return NetSocket::sendToSocket(hSocket, theStream.readBuffer(), iLength);