summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/connection.h21
-rw-r--r--include/hashcomp.h16
-rw-r--r--include/socket.h12
-rw-r--r--include/users.h16
4 files changed, 27 insertions, 38 deletions
diff --git a/include/connection.h b/include/connection.h
index 032f9ba6c..52a485f8b 100644
--- a/include/connection.h
+++ b/include/connection.h
@@ -14,24 +14,13 @@
* ---------------------------------------------------
*/
-#include "inspircd_config.h"
-#include "base.h"
-#include <string>
-#include <map>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <unistd.h>
-#include <errno.h>
-#include <time.h>
-#include <vector>
-#include <deque>
-#include <sstream>
-
#ifndef __CONNECTION_H__
#define __CONNECTION_H__
+#include <time.h>
+#include "inspircd_config.h"
+#include "base.h"
+
/** Please note: classes serverrec and userrec both inherit from class connection.
*/
class connection : public Extensible
@@ -101,5 +90,3 @@ class connection : public Extensible
#endif
-
-
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 7ec813ad6..dc8c1ec81 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -18,6 +18,8 @@
#define _HASHCOMP_H_
#include "inspircd_config.h"
+#include "socket.h"
+#include "hash_map.h"
/*******************************************************
* This file contains classes and templates that deal
@@ -33,19 +35,7 @@
* backwards compatible with other code which is not
* aware of irc::string.
*******************************************************/
-
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
-
-#ifdef GCC3
-#define nspace __gnu_cxx
-#else
-#define nspace std
-#endif
-
+
using namespace std;
namespace nspace
diff --git a/include/socket.h b/include/socket.h
index 60347506d..1dd2e6827 100644
--- a/include/socket.h
+++ b/include/socket.h
@@ -19,6 +19,8 @@
/* This is where we'll define wrappers for socket IO stuff, for neat winsock compatability */
+#ifndef WIN32
+
#include <arpa/inet.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -29,8 +31,16 @@
#include <unistd.h>
#include <fcntl.h>
#include <poll.h>
-#include <errno.h>
#include <netdb.h>
+#include <errno.h>
+
+#else
+
+#include <windows_defs.h>
+#include <winsock2.h>
+
+#endif
+
#include "inspircd_config.h"
/* macros to the relevant system address description structs */
diff --git a/include/users.h b/include/users.h
index 81ab1c844..30870f392 100644
--- a/include/users.h
+++ b/include/users.h
@@ -14,18 +14,20 @@
* ---------------------------------------------------
*/
-#include "inspircd_config.h"
-#include "channels.h"
-#include "inspstring.h"
-#include "connection.h"
+#ifndef __USERS_H__
+#define __USERS_H__
+
#include <string>
+
#ifdef THREADED_DNS
#include <pthread.h>
#endif
-
-#ifndef __USERS_H__
-#define __USERS_H__
+#include "inspircd_config.h"
+#include "socket.h"
+#include "channels.h"
+#include "inspstring.h"
+#include "connection.h"
#include "hashcomp.h"
#include "cull_list.h"