1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(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 287ecd1582
commit 0463dbdc9e
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.

View File

@@ -38,6 +38,8 @@
#include "../gfx_func.h"
#include "../error.h"
#include "../safeguards.h"
#ifdef DEBUG_DUMP_COMMANDS
#include "../fileio_func.h"
/** When running the server till the wait point, run as fast as we can! */

View File

@@ -25,6 +25,8 @@
#include "../rev.h"
#include "../game/game.hpp"
#include "../safeguards.h"
/* This file handles all the admin network commands. */

View File

@@ -30,6 +30,8 @@
#include "table/strings.h"
#include "../safeguards.h"
/** The draw buffer must be able to contain the chat message, client name and the "[All]" message,
* some spaces and possible translations of [All] to other languages. */
assert_compile((int)DRAW_STRING_BUFFER >= (int)NETWORK_CHAT_LENGTH + NETWORK_NAME_LENGTH + 40);

View File

@@ -34,6 +34,8 @@
#include "table/strings.h"
#include "../safeguards.h"
/* This file handles all the client-commands */

View File

@@ -19,6 +19,8 @@
#include "../company_func.h"
#include "../settings_type.h"
#include "../safeguards.h"
/** Table with all the callbacks we'll use for conversion*/
static CommandCallback * const _callback_table[] = {
/* 0x00 */ NULL,

View File

@@ -27,6 +27,8 @@
#include <zlib.h>
#endif
#include "../safeguards.h"
extern bool HasScenario(const ContentInfo *ci, bool md5sum);
/** The client we use to connect to the server. */

View File

@@ -29,6 +29,8 @@
#include "table/strings.h"
#include "../table/sprites.h"
#include "../safeguards.h"
/** Whether the user accepted to enter external websites during this session. */
static bool _accepted_external_search = false;

View File

@@ -22,6 +22,8 @@
#include "network_udp.h"
#include "network_gamelist.h"
#include "../safeguards.h"
NetworkGameList *_network_game_list = NULL;
/** Mutex for handling delayed insertion/querying of servers. */

View File

@@ -39,6 +39,8 @@
#include "../stringfilter_type.h"
#include "../safeguards.h"
static void ShowNetworkStartServerWindow();
static void ShowNetworkLobbyWindow(NetworkGameList *ngl);

View File

@@ -33,6 +33,8 @@
#include "../core/random_func.hpp"
#include "../rev.h"
#include "../safeguards.h"
/* This file handles all the server-commands */

View File

@@ -34,6 +34,8 @@
#include "core/udp.h"
#include "../safeguards.h"
/** Mutex for all out threaded udp resolution and such. */
static ThreadMutex *_network_udp_mutex = ThreadMutex::New();