summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-23 20:13:33 +0000
committerrubidium <rubidium@openttd.org>2014-04-23 20:13:33 +0000
commit0463dbdc9e5b39399765015c394e29dedaf7d041 (patch)
tree0d115f2027997f6c452d59d63919f9a6d05cb8be /src/network/core
parent287ecd158249628a9b12aa5567e0e188499084f5 (diff)
downloadopenttd-0463dbdc9e5b39399765015c394e29dedaf7d041.tar.xz
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/address.cpp2
-rw-r--r--src/network/core/core.cpp2
-rw-r--r--src/network/core/host.cpp2
-rw-r--r--src/network/core/packet.cpp2
-rw-r--r--src/network/core/tcp.cpp2
-rw-r--r--src/network/core/tcp_admin.cpp2
-rw-r--r--src/network/core/tcp_connect.cpp2
-rw-r--r--src/network/core/tcp_content.cpp2
-rw-r--r--src/network/core/tcp_game.cpp2
-rw-r--r--src/network/core/tcp_http.cpp2
-rw-r--r--src/network/core/udp.cpp2
11 files changed, 22 insertions, 0 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp
index d8c990e24..d25ade4a3 100644
--- a/src/network/core/address.cpp
+++ b/src/network/core/address.cpp
@@ -16,6 +16,8 @@
#include "address.h"
#include "../../debug.h"
+#include "../../safeguards.h"
+
/**
* Get the hostname; in case it wasn't given the
* IPv4 dotted representation is given.
diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp
index 867bb4bb9..7a2ad92a2 100644
--- a/src/network/core/core.cpp
+++ b/src/network/core/core.cpp
@@ -18,6 +18,8 @@
#include "os_abstraction.h"
#include "packet.h"
+#include "../../safeguards.h"
+
#ifdef __MORPHOS__
/* the library base is required here */
diff --git a/src/network/core/host.cpp b/src/network/core/host.cpp
index 0af0f7992..cf98239f8 100644
--- a/src/network/core/host.cpp
+++ b/src/network/core/host.cpp
@@ -15,6 +15,8 @@
#include "../../debug.h"
#include "address.h"
+#include "../../safeguards.h"
+
/**
* Internal implementation for finding the broadcast IPs.
* This function is implemented multiple times for multiple targets.
diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp
index 4d9345e82..7548132e0 100644
--- a/src/network/core/packet.cpp
+++ b/src/network/core/packet.cpp
@@ -18,6 +18,8 @@
#include "packet.h"
+#include "../../safeguards.h"
+
/**
* Create a packet that is used to read from a network socket
* @param cs the socket handler associated with the socket we are reading from
diff --git a/src/network/core/tcp.cpp b/src/network/core/tcp.cpp
index e68c354fc..790941fc0 100644
--- a/src/network/core/tcp.cpp
+++ b/src/network/core/tcp.cpp
@@ -18,6 +18,8 @@
#include "tcp.h"
+#include "../../safeguards.h"
+
/**
* Construct a socket handler for a TCP connection.
* @param s The just opened TCP connection.
diff --git a/src/network/core/tcp_admin.cpp b/src/network/core/tcp_admin.cpp
index 636696e2c..284ceda9b 100644
--- a/src/network/core/tcp_admin.cpp
+++ b/src/network/core/tcp_admin.cpp
@@ -19,6 +19,8 @@
#include "tcp_admin.h"
#include "../../debug.h"
+#include "../../safeguards.h"
+
/* Make sure that these enums match. */
assert_compile((int)CRR_MANUAL == (int)ADMIN_CRR_MANUAL);
assert_compile((int)CRR_AUTOCLEAN == (int)ADMIN_CRR_AUTOCLEAN);
diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp
index ed2885b0e..ccbf93f3c 100644
--- a/src/network/core/tcp_connect.cpp
+++ b/src/network/core/tcp_connect.cpp
@@ -18,6 +18,8 @@
#include "tcp.h"
+#include "../../safeguards.h"
+
/** List of connections that are currently being created */
static SmallVector<TCPConnecter *, 1> _tcp_connecters;
diff --git a/src/network/core/tcp_content.cpp b/src/network/core/tcp_content.cpp
index 8a4604feb..fc22c4491 100644
--- a/src/network/core/tcp_content.cpp
+++ b/src/network/core/tcp_content.cpp
@@ -24,6 +24,8 @@
#endif /* OPENTTD_MSU */
#include "tcp_content.h"
+#include "../../safeguards.h"
+
/** Clear everything in the struct */
ContentInfo::ContentInfo()
{
diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp
index d263b28e4..9b3f7b5ef 100644
--- a/src/network/core/tcp_game.cpp
+++ b/src/network/core/tcp_game.cpp
@@ -22,6 +22,8 @@
#include "table/strings.h"
+#include "../../safeguards.h"
+
/**
* Create a new socket for the game connection.
* @param s The socket to connect with.
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp
index a9829d560..a8bb64080 100644
--- a/src/network/core/tcp_http.cpp
+++ b/src/network/core/tcp_http.cpp
@@ -20,6 +20,8 @@
#include "tcp_http.h"
+#include "../../safeguards.h"
+
/** List of open HTTP connections. */
static SmallVector<NetworkHTTPSocketHandler *, 1> _http_connections;
diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp
index f7abc7e35..ce5f06b1f 100644
--- a/src/network/core/udp.cpp
+++ b/src/network/core/udp.cpp
@@ -18,6 +18,8 @@
#include "../../debug.h"
#include "udp.h"
+#include "../../safeguards.h"
+
/**
* Create an UDP socket but don't listen yet.
* @param bind the addresses to bind to.