(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

This commit is contained in:
rubidium
2014-04-23 20:13:33 +00:00
parent dd84952d15
commit 2be4215f43
402 changed files with 873 additions and 1 deletions

View File

@@ -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.

View File

@@ -18,6 +18,8 @@
#include "os_abstraction.h"
#include "packet.h"
#include "../../safeguards.h"
#ifdef __MORPHOS__
/* the library base is required here */

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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);

View File

@@ -18,6 +18,8 @@
#include "tcp.h"
#include "../../safeguards.h"
/** List of connections that are currently being created */
static SmallVector<TCPConnecter *, 1> _tcp_connecters;

View File

@@ -24,6 +24,8 @@
#endif /* OPENTTD_MSU */
#include "tcp_content.h"
#include "../../safeguards.h"
/** Clear everything in the struct */
ContentInfo::ContentInfo()
{

View File

@@ -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.

View File

@@ -20,6 +20,8 @@
#include "tcp_http.h"
#include "../../safeguards.h"
/** List of open HTTP connections. */
static SmallVector<NetworkHTTPSocketHandler *, 1> _http_connections;

View File

@@ -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.