summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-05-04 06:13:56 +0200
committerHaru <haru@dotalux.com>2014-05-09 08:29:46 +0200
commitb6b3f58795288701d0e162d43fa6f0a47af913b3 (patch)
treea75f686731786ed1746325589d8acb1569409981 /src/common/socket.c
parent1c4e3820d5f4ff9870c28104122f6733db4d55a6 (diff)
downloadhercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.gz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.bz2
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.xz
hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.zip
Fixed order of includes in all source files
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c64
1 files changed, 33 insertions, 31 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index 35d350e95..3738f2c2a 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -2,48 +2,50 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/timer.h"
-#include "../common/malloc.h"
-#include "../common/showmsg.h"
-#include "../common/strlib.h"
-#include "../config/core.h"
-#include "../common/HPM.h"
+#define HERCULES_CORE
+#include "../config/core.h" // SHOW_SERVER_STATS
#define _H_SOCKET_C_
-
#include "socket.h"
+#undef _H_SOCKET_C_
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
+#include "../common/HPM.h"
+#include "../common/cbasetypes.h"
+#include "../common/malloc.h"
+#include "../common/mmo.h"
+#include "../common/showmsg.h"
+#include "../common/strlib.h"
+#include "../common/timer.h"
+
#ifdef WIN32
- #include "../common/winapi.h"
+# include "../common/winapi.h"
#else
- #include <errno.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <netinet/tcp.h>
- #include <net/if.h>
- #include <unistd.h>
- #include <sys/time.h>
- #include <sys/ioctl.h>
- #include <netdb.h>
- #include <arpa/inet.h>
-
- #ifndef SIOCGIFCONF
- #include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
- #endif
- #ifndef FIONBIO
- #include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
- #endif
-
- #ifdef HAVE_SETRLIMIT
- #include <sys/resource.h>
- #endif
+# include <arpa/inet.h>
+# include <errno.h>
+# include <net/if.h>
+# include <netdb.h>
+# include <netinet/in.h>
+# include <netinet/tcp.h>
+# include <sys/ioctl.h>
+# include <sys/socket.h>
+# include <sys/time.h>
+# include <unistd.h>
+
+# ifndef SIOCGIFCONF
+# include <sys/sockio.h> // SIOCGIFCONF on Solaris, maybe others? [Shinomori]
+# endif
+# ifndef FIONBIO
+# include <sys/filio.h> // FIONBIO on Solaris [FlavioJS]
+# endif
+
+# ifdef HAVE_SETRLIMIT
+# include <sys/resource.h>
+# endif
#endif
/**