summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPM.c1
-rw-r--r--src/common/cbasetypes.h1
-rw-r--r--src/common/conf.h2
-rw-r--r--src/common/core.c3
-rw-r--r--src/common/core.h2
-rw-r--r--src/common/grfio.c1
-rw-r--r--src/common/malloc.c2
-rw-r--r--src/common/mapindex.c3
-rw-r--r--src/common/mapindex.h1
-rw-r--r--src/common/md5calc.c5
-rw-r--r--src/common/mmo.h3
-rw-r--r--src/common/mutex.c1
-rw-r--r--src/common/random.c2
-rw-r--r--src/common/showmsg.c2
-rw-r--r--src/common/socket.c2
-rw-r--r--src/common/socket.h2
-rw-r--r--src/common/sql.c1
-rw-r--r--src/common/sysinfo.c1
-rw-r--r--src/common/timer.c1
-rw-r--r--src/common/utils.c4
-rw-r--r--src/common/utils.h1
21 files changed, 9 insertions, 32 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 2b508e233..5a0fe16dc 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -10,6 +10,7 @@
#include "common/conf.h"
#include "common/console.h"
#include "common/core.h"
+#include "common/db.h"
#include "common/malloc.h"
#include "common/mmo.h"
#include "common/showmsg.h"
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index a0fa77fb5..ce8fc6bcf 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -97,6 +97,7 @@
#include <inttypes.h>
#include <stdint.h>
#include <limits.h>
+#include <time.h>
// temporary fix for bugreport:4961 (unintended conversion from signed to unsigned)
// (-20 >= UCHAR_MAX) returns true
diff --git a/src/common/conf.h b/src/common/conf.h
index 771725cf4..1889aeb3a 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -7,7 +7,7 @@
#include "common/cbasetypes.h"
-#include "libconfig/libconfig.h"
+#include <libconfig/libconfig.h>
/**
* The libconfig interface -- specially for plugins, but we enforce it throughout the core to be consistent
diff --git a/src/common/core.c b/src/common/core.c
index 5a410add1..e663c4e4c 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -9,6 +9,7 @@
#include "common/cbasetypes.h"
#include "common/console.h"
+#include "common/db.h"
#include "common/malloc.h"
#include "common/mmo.h"
#include "common/random.h"
@@ -20,7 +21,6 @@
#ifndef MINICORE
# include "common/HPM.h"
# include "common/conf.h"
-# include "common/db.h"
# include "common/ers.h"
# include "common/socket.h"
# include "common/sql.h"
@@ -37,7 +37,6 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
/// Called when a terminate signal is received.
void (*shutdown_callback)(void) = NULL;
diff --git a/src/common/core.h b/src/common/core.h
index d96e8506a..c2a8d9e58 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -6,8 +6,6 @@
#define COMMON_CORE_H
#include "common/cbasetypes.h"
-#include "common/db.h"
-#include "common/mmo.h"
/* so that developers with --enable-debug can raise signals from any section of the code they'd like */
#ifdef DEBUG
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 00d6ffc89..614678da8 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -16,7 +16,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/stat.h>
#include <zlib.h>
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 008fd0930..ec0467495 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -6,6 +6,7 @@
#include "malloc.h"
+#include "common/cbasetypes.h"
#include "common/core.h"
#include "common/showmsg.h"
#include "common/sysinfo.h"
@@ -13,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
struct malloc_interface iMalloc_s;
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 42b46246d..18aa413cc 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -6,15 +6,14 @@
#include "mapindex.h"
+#include "common/cbasetypes.h"
#include "common/db.h"
-#include "common/malloc.h"
#include "common/mmo.h"
#include "common/showmsg.h"
#include "common/strlib.h"
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
/* mapindex.c interface source */
struct mapindex_interface mapindex_s;
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index 408078ceb..c334e7cca 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -5,6 +5,7 @@
#ifndef COMMON_MAPINDEX_H
#define COMMON_MAPINDEX_H
+#include "common/cbasetypes.h"
#include "common/db.h"
#include "common/mmo.h"
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index e27b64504..e594c364f 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -10,16 +10,13 @@
#include "md5calc.h"
+#include "common/cbasetypes.h"
#include "common/random.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifndef UINT_MAX
-#define UINT_MAX 4294967295U
-#endif
-
// Global variable
static unsigned int *pX;
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 94a4b06da..3e497c667 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -7,9 +7,6 @@
#include "config/core.h"
#include "common/cbasetypes.h"
-#include "common/db.h"
-
-#include <time.h>
// server->client protocol version
// 0 - pre-?
diff --git a/src/common/mutex.c b/src/common/mutex.c
index 59c04d4f0..5dfb3d01c 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -14,7 +14,6 @@
#include "common/winapi.h"
#else
#include <pthread.h>
-#include <time.h>
#include <sys/time.h>
#endif
diff --git a/src/common/random.c b/src/common/random.c
index 70257fcb6..a4d7c5d34 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -5,8 +5,6 @@
#include "random.h"
-#include <time.h> // time
-
#include "common/cbasetypes.h" // for WIN32
#include "common/showmsg.h"
#include "common/timer.h" // gettick
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 3eb7ba0af..01dc0b01a 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -15,8 +15,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h> // atexit
-#include <string.h>
-#include <time.h>
#ifdef WIN32
# include "common/winapi.h"
diff --git a/src/common/socket.c b/src/common/socket.c
index aa575f1a6..17c31db50 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -11,6 +11,7 @@
#include "common/HPM.h"
#include "common/cbasetypes.h"
+#include "common/db.h"
#include "common/malloc.h"
#include "common/mmo.h"
#include "common/showmsg.h"
@@ -19,7 +20,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/types.h>
#ifdef WIN32
diff --git a/src/common/socket.h b/src/common/socket.h
index 94f86759b..bd5d9baa2 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -7,8 +7,6 @@
#include "common/cbasetypes.h"
-#include <time.h>
-
#ifdef WIN32
# include "common/winapi.h"
typedef long in_addr_t;
diff --git a/src/common/sql.c b/src/common/sql.c
index 9dc8144bf..a93092533 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -17,7 +17,6 @@
#endif
#include <mysql.h>
#include <stdlib.h> // strtoul
-#include <string.h> // strlen/strnlen/memcpy/memset
void hercules_mysql_error_handler(unsigned int ecode);
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index 33ffc43f3..a27357e7e 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -16,7 +16,6 @@
#include <stdio.h> // fopen
#include <stdlib.h> // atoi
#ifdef WIN32
-# include <string.h> // strlen
# include <windows.h>
#else
# include <unistd.h>
diff --git a/src/common/timer.c b/src/common/timer.c
index 42eb892ad..06309642e 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
struct timer_interface timer_s;
diff --git a/src/common/utils.c b/src/common/utils.c
index 865b3575b..07e2e9fdf 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -8,7 +8,6 @@
#include "common/cbasetypes.h"
#include "common/core.h"
-#include "common/malloc.h"
#include "common/mmo.h"
#include "common/showmsg.h"
#include "common/socket.h"
@@ -21,15 +20,12 @@
# endif /* F_OK */
#else
# include <dirent.h>
-# include <sys/stat.h>
# include <unistd.h>
#endif
#include <math.h> // floor()
-#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <sys/stat.h> // cache purposes [Ind/Hercules]
struct HCache_interface HCache_s;
diff --git a/src/common/utils.h b/src/common/utils.h
index 57113aea0..0ac818468 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -8,7 +8,6 @@
#include "common/cbasetypes.h"
#include <stdio.h> // FILE*
-#include <time.h>
/* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */
#define HCACHE_KEY 'k'