summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-31 01:48:18 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-31 01:48:18 +0300
commitd53b058ec3f6208f34884ed572bb5d47de932108 (patch)
tree980acf66aaa3b5df6b7e3e7e08dfccc0b9af8827 /src/net
parent4530a341c65ac12e50075fb3e3d6166cd2e1fe3b (diff)
downloadplus-d53b058ec3f6208f34884ed572bb5d47de932108.tar.gz
plus-d53b058ec3f6208f34884ed572bb5d47de932108.tar.bz2
plus-d53b058ec3f6208f34884ed572bb5d47de932108.tar.xz
plus-d53b058ec3f6208f34884ed572bb5d47de932108.zip
Fix different include issues.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/download.cpp2
-rw-r--r--src/net/ea/network.cpp4
-rw-r--r--src/net/eathena/maptypeproperty2.h2
-rw-r--r--src/net/eathena/messagein.cpp4
-rw-r--r--src/net/eathena/messageout.cpp6
-rw-r--r--src/net/eathena/network.cpp1
-rw-r--r--src/net/eathena/packetsout.inc2
-rw-r--r--src/net/eathena/protocolout.cpp3
-rw-r--r--src/net/eathena/protocolout.h2
-rw-r--r--src/net/eathena/recvpackets.inc2
-rw-r--r--src/net/eathena/updateprotocol.cpp6
-rw-r--r--src/net/net.cpp2
-rw-r--r--src/net/protocoloutdefine.h1
-rw-r--r--src/net/protocoloutupdate.h1
-rw-r--r--src/net/tmwa/messagein.cpp4
-rw-r--r--src/net/tmwa/messageout.cpp6
-rw-r--r--src/net/tmwa/network.cpp1
-rw-r--r--src/net/tmwa/packetsout.inc2
-rw-r--r--src/net/tmwa/protocolout.cpp3
-rw-r--r--src/net/tmwa/protocolout.h2
-rw-r--r--src/net/tmwa/recvpackets.inc2
-rw-r--r--src/net/tmwa/updateprotocol.cpp7
22 files changed, 55 insertions, 10 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 96b330aec..91d448899 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -30,8 +30,6 @@
#include <curl/curl.h>
-#include <SDL_thread.h>
-
#include <zlib.h>
#define CURLVERSION_ATLEAST(a, b, c) ((LIBCURL_VERSION_MAJOR > (a)) || \
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index ea6587421..15a45fde0 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -35,6 +35,10 @@
#include "debug.h"
+#ifndef SDL_BYTEORDER
+#error missing SDL_endian.h
+#endif
+
extern unsigned int mLastHost;
namespace Ea
diff --git a/src/net/eathena/maptypeproperty2.h b/src/net/eathena/maptypeproperty2.h
index da069ac96..e8602ffbe 100644
--- a/src/net/eathena/maptypeproperty2.h
+++ b/src/net/eathena/maptypeproperty2.h
@@ -21,6 +21,8 @@
#ifndef NET_EATHENA_MAPTYPEPROPERTY2_H
#define NET_EATHENA_MAPTYPEPROPERTY2_H
+#include "localconsts.h"
+
#if defined(__GXX_EXPERIMENTAL_CXX0X__)
#include <cstdint>
#else
diff --git a/src/net/eathena/messagein.cpp b/src/net/eathena/messagein.cpp
index 34edbe39d..7137b468b 100644
--- a/src/net/eathena/messagein.cpp
+++ b/src/net/eathena/messagein.cpp
@@ -31,6 +31,10 @@
#include "debug.h"
+#ifndef SDL_BYTEORDER
+#error missing SDL_endian.h
+#endif
+
namespace EAthena
{
diff --git a/src/net/eathena/messageout.cpp b/src/net/eathena/messageout.cpp
index a20d924c9..83fc381c5 100644
--- a/src/net/eathena/messageout.cpp
+++ b/src/net/eathena/messageout.cpp
@@ -28,10 +28,12 @@
#include "logger.h"
-#include <SDL_endian.h>
-
#include "debug.h"
+#ifndef SDL_BYTEORDER
+#error missing SDL_endian.h
+#endif
+
namespace EAthena
{
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index 2511f8e57..c5f0adad5 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -108,6 +108,7 @@ Network::~Network()
void Network::registerHandlers()
{
#include "net/eathena/recvpackets.inc"
+RECVPACKETS_VOID
}
void Network::clearHandlers()
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc
index 603a62f22..1cf5f2780 100644
--- a/src/net/eathena/packetsout.inc
+++ b/src/net/eathena/packetsout.inc
@@ -20,6 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define PACKETSOUT_VOID
+
// 0
packet(CMSG_SERVER_VERSION_REQUEST, 0x7530, 0, nullptr);
diff --git a/src/net/eathena/protocolout.cpp b/src/net/eathena/protocolout.cpp
index 44e5477d6..00f455aca 100644
--- a/src/net/eathena/protocolout.cpp
+++ b/src/net/eathena/protocolout.cpp
@@ -23,7 +23,8 @@ namespace EAthena
#include "net/protocoloutdefine.h"
#include "net/eathena/packetsout.inc"
#undef packet
-
+PROTOCOLOUT_VOID
+PACKETSOUT_VOID
} // namespace EAthena
#include "debug.h"
diff --git a/src/net/eathena/protocolout.h b/src/net/eathena/protocolout.h
index 4f4572050..fa8319c92 100644
--- a/src/net/eathena/protocolout.h
+++ b/src/net/eathena/protocolout.h
@@ -23,6 +23,8 @@
#include "net/protocoloutinclude.h"
+#define PROTOCOLOUT_VOID
+
namespace EAthena
{
#include "net/eathena/packetsout.inc"
diff --git a/src/net/eathena/recvpackets.inc b/src/net/eathena/recvpackets.inc
index 29e3d433d..9dbe9d3f6 100644
--- a/src/net/eathena/recvpackets.inc
+++ b/src/net/eathena/recvpackets.inc
@@ -21,6 +21,8 @@
#ifndef NET_EATHENA_RECVPACKETS_H
#define NET_EATHENA_RECVPACKETS_H
+#define RECVPACKETS_VOID
+
#include "net/recvpacketdefine.h"
#include "net/eathena/packetsin.inc"
diff --git a/src/net/eathena/updateprotocol.cpp b/src/net/eathena/updateprotocol.cpp
index b14c4b89a..a23ea51bb 100644
--- a/src/net/eathena/updateprotocol.cpp
+++ b/src/net/eathena/updateprotocol.cpp
@@ -30,6 +30,8 @@
extern int packetVersion;
extern int serverVersion;
+PACKETSOUT_VOID
+#undef PACKETSOUT_VOID
namespace EAthena
{
@@ -48,4 +50,8 @@ void updateProtocol()
}
}
+PACKETSOUT_VOID
+PROTOCOLOUTUPDATE_VOID
+PROTOCOLOUT_VOID
+
} // namespace EAthena
diff --git a/src/net/net.cpp b/src/net/net.cpp
index 49ce1321f..ca2d07838 100644
--- a/src/net/net.cpp
+++ b/src/net/net.cpp
@@ -20,8 +20,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "main.h"
-
#include "net/net.h"
#include "configuration.h"
diff --git a/src/net/protocoloutdefine.h b/src/net/protocoloutdefine.h
index bbf2ea20e..006168bf5 100644
--- a/src/net/protocoloutdefine.h
+++ b/src/net/protocoloutdefine.h
@@ -22,5 +22,6 @@
#define NET_PROTOCOLOUTDEFINE_H
#define packet(name, id, sz, comment) int name = id
+#define PROTOCOLOUT_VOID
#endif // NET_PROTOCOLOUTDEFINE_H
diff --git a/src/net/protocoloutupdate.h b/src/net/protocoloutupdate.h
index 550831940..042e264d2 100644
--- a/src/net/protocoloutupdate.h
+++ b/src/net/protocoloutupdate.h
@@ -22,5 +22,6 @@
#define NET_PROTOCOLOUTUPDATE_H
#define packet(name, id, sz, comment) name = id
+#define PROTOCOLOUTUPDATE_VOID
#endif // NET_PROTOCOLOUTUPDATE_H
diff --git a/src/net/tmwa/messagein.cpp b/src/net/tmwa/messagein.cpp
index a5fac5ac9..095ee91bf 100644
--- a/src/net/tmwa/messagein.cpp
+++ b/src/net/tmwa/messagein.cpp
@@ -31,6 +31,10 @@
#include "debug.h"
+#ifndef SDL_BYTEORDER
+#error missing SDL_endian.h
+#endif
+
namespace TmwAthena
{
diff --git a/src/net/tmwa/messageout.cpp b/src/net/tmwa/messageout.cpp
index 82a67e924..237d4f185 100644
--- a/src/net/tmwa/messageout.cpp
+++ b/src/net/tmwa/messageout.cpp
@@ -28,10 +28,12 @@
#include "logger.h"
-#include <SDL_endian.h>
-
#include "debug.h"
+#ifndef SDL_BYTEORDER
+#error missing SDL_endian.h
+#endif
+
namespace TmwAthena
{
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 66bf166e1..bf574b567 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -86,6 +86,7 @@ Network::~Network()
void Network::registerHandlers()
{
#include "net/tmwa/recvpackets.inc"
+RECVPACKETS_VOID
}
void Network::clearHandlers()
diff --git a/src/net/tmwa/packetsout.inc b/src/net/tmwa/packetsout.inc
index 339863cf0..f789791df 100644
--- a/src/net/tmwa/packetsout.inc
+++ b/src/net/tmwa/packetsout.inc
@@ -20,6 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#define PACKETSOUT_VOID
+
packet(CMSG_SERVER_VERSION_REQUEST, 0x7530, 0, nullptr);
packet(CMSG_LOGIN_REGISTER, 0x0064, 0, nullptr);
diff --git a/src/net/tmwa/protocolout.cpp b/src/net/tmwa/protocolout.cpp
index 8332ceb8d..d8d123eee 100644
--- a/src/net/tmwa/protocolout.cpp
+++ b/src/net/tmwa/protocolout.cpp
@@ -23,7 +23,8 @@ namespace TmwAthena
#include "net/protocoloutdefine.h"
#include "net/tmwa/packetsout.inc"
#undef packet
-
+PROTOCOLOUT_VOID
+PACKETSOUT_VOID
} // namesspace TmwAthena
#include "debug.h"
diff --git a/src/net/tmwa/protocolout.h b/src/net/tmwa/protocolout.h
index 413e458ef..2686cd9f5 100644
--- a/src/net/tmwa/protocolout.h
+++ b/src/net/tmwa/protocolout.h
@@ -23,6 +23,8 @@
#include "net/protocoloutinclude.h"
+#define PROTOCOLOUT_VOID
+
namespace TmwAthena
{
#include "net/tmwa/packetsout.inc"
diff --git a/src/net/tmwa/recvpackets.inc b/src/net/tmwa/recvpackets.inc
index 8c1a59253..3afbf07bb 100644
--- a/src/net/tmwa/recvpackets.inc
+++ b/src/net/tmwa/recvpackets.inc
@@ -21,6 +21,8 @@
#ifndef NET_TMWA_RECVPACKETS_H
#define NET_TMWA_RECVPACKETS_H
+#define RECVPACKETS_VOID
+
#include "net/recvpacketdefine.h"
#include "net/tmwa/packetsin.inc"
diff --git a/src/net/tmwa/updateprotocol.cpp b/src/net/tmwa/updateprotocol.cpp
index a07ccc319..7d5622acd 100644
--- a/src/net/tmwa/updateprotocol.cpp
+++ b/src/net/tmwa/updateprotocol.cpp
@@ -25,6 +25,9 @@
#include "debug.h"
+PACKETSOUT_VOID
+#undef PACKETSOUT_VOID
+
namespace TmwAthena
{
@@ -42,4 +45,8 @@ void updateProtocol()
}
}
+PACKETSOUT_VOID
+PROTOCOLOUTUPDATE_VOID
+PROTOCOLOUT_VOID
+
} // namespace TmwAthena