summaryrefslogtreecommitdiff
path: root/lib/server
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-08 23:07:24 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-08 23:07:24 +0000
commit2ae377404d6f8a45742f46750e71c90c040f82bf (patch)
tree6cf7f61c1537b7d7196aaad576ba81ce0331a90f /lib/server
parent1f40f0f2003553f0bba6953dcecf73a0d2054f1b (diff)
Remove non-standard BSD u_int* types.
MSVC doesn't like them, and they're not necessary now that we have stdint.h. Remove some compatibility typedefs from BoxPlatform.h and emu.h which are not needed any longer either.
Diffstat (limited to 'lib/server')
-rw-r--r--lib/server/Protocol.cpp12
-rw-r--r--lib/server/Protocol.h4
-rw-r--r--lib/server/ProtocolWire.h4
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/server/Protocol.cpp b/lib/server/Protocol.cpp
index 937a2379..0adf9543 100644
--- a/lib/server/Protocol.cpp
+++ b/lib/server/Protocol.cpp
@@ -189,7 +189,7 @@ std::auto_ptr<Message> Protocol::ReceiveInternal()
}
// Check the object size
- u_int32_t objSize = ntohl(objHeader.mObjSize);
+ uint32_t objSize = ntohl(objHeader.mObjSize);
if(objSize < sizeof(objHeader) || objSize > mMaxObjectSize)
{
THROW_EXCEPTION(ConnectionException, Protocol_ObjTooBig)
@@ -641,7 +641,7 @@ std::auto_ptr<IOStream> Protocol::ReceiveStream()
}
// Get the stream size
- u_int32_t streamSize = ntohl(objHeader.mObjSize);
+ uint32_t streamSize = ntohl(objHeader.mObjSize);
// Inform sub class
InformStreamReceiving(streamSize);
@@ -836,12 +836,12 @@ int Protocol::SendStreamSendBlock(uint8_t *Block, int BytesInBlock)
// --------------------------------------------------------------------------
//
// Function
-// Name: Protocol::InformStreamReceiving(u_int32_t)
+// Name: Protocol::InformStreamReceiving(uint32_t)
// Purpose: Informs sub classes about streams being received
// Created: 2003/10/27
//
// --------------------------------------------------------------------------
-void Protocol::InformStreamReceiving(u_int32_t Size)
+void Protocol::InformStreamReceiving(uint32_t Size)
{
if(GetLogToSysLog())
{
@@ -868,12 +868,12 @@ void Protocol::InformStreamReceiving(u_int32_t Size)
// --------------------------------------------------------------------------
//
// Function
-// Name: Protocol::InformStreamSending(u_int32_t)
+// Name: Protocol::InformStreamSending(uint32_t)
// Purpose: Informs sub classes about streams being sent
// Created: 2003/10/27
//
// --------------------------------------------------------------------------
-void Protocol::InformStreamSending(u_int32_t Size)
+void Protocol::InformStreamSending(uint32_t Size)
{
if(GetLogToSysLog())
{
diff --git a/lib/server/Protocol.h b/lib/server/Protocol.h
index f659d3ca..fbe6461c 100644
--- a/lib/server/Protocol.h
+++ b/lib/server/Protocol.h
@@ -186,8 +186,8 @@ protected:
void CheckAndReadHdr(void *hdr); // don't use type here to avoid dependency
// Will be used for logging
- virtual void InformStreamReceiving(u_int32_t Size);
- virtual void InformStreamSending(u_int32_t Size);
+ virtual void InformStreamReceiving(uint32_t Size);
+ virtual void InformStreamSending(uint32_t Size);
private:
void EnsureBufferAllocated(int Size);
diff --git a/lib/server/ProtocolWire.h b/lib/server/ProtocolWire.h
index ff62b66e..6dee445b 100644
--- a/lib/server/ProtocolWire.h
+++ b/lib/server/ProtocolWire.h
@@ -26,8 +26,8 @@ typedef struct
typedef struct
{
- u_int32_t mObjSize;
- u_int32_t mObjType;
+ uint32_t mObjSize;
+ uint32_t mObjType;
} PW_ObjectHeader;
#define SPECIAL_STREAM_OBJECT_TYPE 0xffffffff