From 75f7b9f9313f2eff33dae86caf9ea3beb751cf1a Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 18 Jun 2014 12:52:03 +0200 Subject: [PATCH] Fix Snowballs service compile under MinGW --- code/nel/include/nel/net/buf_sock.h | 6 +++--- code/nel/src/net/unified_network.cpp | 2 +- code/snowballs2/server/frontend/src/main.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/nel/include/nel/net/buf_sock.h b/code/nel/include/nel/net/buf_sock.h index 947f6bff6..5a2f3c074 100644 --- a/code/nel/include/nel/net/buf_sock.h +++ b/code/nel/include/nel/net/buf_sock.h @@ -50,10 +50,10 @@ public: virtual ~CBufSock(); /// Sets the application identifier - void setAppId( uint64 id ) { _AppId = id; } + void setAppId( uintptr_t id ) { _AppId = id; } /// Returns the application identifier - uint64 appId() const { return _AppId; } + uintptr_t appId() const { return _AppId; } /// Returns a string with the characteristics of the object std::string asString() const; @@ -256,7 +256,7 @@ private: NLMISC::CObjectVector _ReadyToSendBuffer; TBlockSize _RTSBIndex; - uint64 _AppId; + uintptr_t _AppId; // Connected state (from the user's point of view, i.e. changed when the connection/disconnection event is at the front of the receive queue) bool _ConnectedState; diff --git a/code/nel/src/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index e8af9ceac..788dcdf12 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.cpp @@ -36,7 +36,7 @@ namespace NLNET { static size_t ThreadCreator = 0; -static const uint64 AppIdDeadConnection = 0xDEAD; +static const uintptr_t AppIdDeadConnection = 0xDEAD; uint32 TotalCallbackCalled = 0; diff --git a/code/snowballs2/server/frontend/src/main.cpp b/code/snowballs2/server/frontend/src/main.cpp index 7b3470cbe..38bcc18fc 100644 --- a/code/snowballs2/server/frontend/src/main.cpp +++ b/code/snowballs2/server/frontend/src/main.cpp @@ -229,7 +229,7 @@ void cbAddClient ( CMessage& msgin, TSockId from, CCallbackNetBase& clientcb ) if(from->appId() != 0) { - CPlayer *p = (CPlayer *)(uint)from->appId(); + CPlayer *p = (CPlayer *)(void *)from->appId(); if(id == p->id) p->State = CPlayer::ONLINE; } @@ -590,12 +590,12 @@ void onDisconnectClient ( TSockId from, void *arg ) { uint32 id; - uint64 i = from->appId(); + uintptr_t i = from->appId(); if(i == 0) return; - CPlayer *p = (CPlayer *)(uint)i; + CPlayer *p = (CPlayer *)(void *)i; id = p->id; nlinfo( "A client with unique Id %u has disconnected", id );