summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/core.c9
-rw-r--r--src/common/mutex.c3
-rw-r--r--src/common/random.c1
-rw-r--r--src/common/thread.c8
4 files changed, 12 insertions, 9 deletions
diff --git a/src/common/core.c b/src/common/core.c
index 85f824866..d74e5a451 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -7,6 +7,11 @@
#include "../config/core.h"
#include "core.h"
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
#include "../common/cbasetypes.h"
#include "../common/console.h"
#include "../common/malloc.h"
@@ -28,10 +33,6 @@
# include "../common/utils.h"
#endif
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#ifndef _WIN32
# include <unistd.h>
#else
diff --git a/src/common/mutex.c b/src/common/mutex.c
index 1de707e95..626dfa2e1 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -5,6 +5,8 @@
#include "mutex.h"
+#include "../common/cbasetypes.h" // for WIN32
+
#ifdef WIN32
#include "../common/winapi.h"
#else
@@ -13,7 +15,6 @@
#include <sys/time.h>
#endif
-#include "../common/cbasetypes.h"
#include "../common/malloc.h"
#include "../common/showmsg.h"
#include "../common/timer.h"
diff --git a/src/common/random.c b/src/common/random.c
index 7019a31f3..88d5748cf 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -9,6 +9,7 @@
#include <mt19937ar.h> // init_genrand, genrand_int32, genrand_res53
+#include "../common/cbasetypes.h" // for WIN32
#include "../common/showmsg.h"
#include "../common/timer.h" // gettick
diff --git a/src/common/thread.c b/src/common/thread.c
index bba56e7eb..91360537f 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -19,12 +19,12 @@
# define getpagesize() 4096 // @TODO: implement this properly (GetSystemInfo .. dwPageSize..). (Atm as on all supported win platforms its 4k its static.)
# define __thread __declspec( thread )
#else
-# include <stdlib.h>
-# include <unistd.h>
-# include <string.h>
-# include <signal.h>
# include <pthread.h>
# include <sched.h>
+# include <signal.h>
+# include <stdlib.h>
+# include <string.h>
+# include <unistd.h>
#endif
// When Compiling using MSC (on win32..) we know we have support in any case!