summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-03-25 06:01:34 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-03-25 06:01:34 +0000
commite2359d9a4ed9d27139346aa045c784db04d15776 (patch)
treeb9b5a3a998e0e6ab2a4559b069fa29ab58612bb8 /src/modules.cpp
parenta0ef1070aa77fec38d6bf5e162f5667736c56b1f (diff)
Fixes for GCC3.4 and namespaces (must rerun configure!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@902 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp52
1 files changed, 29 insertions, 23 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index d5288d371..7f3603fb7 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -107,29 +107,35 @@ extern FILE *log_file;
namespace nspace
{
- template<> struct nspace::hash<in_addr>
- {
- size_t operator()(const struct in_addr &a) const
- {
- size_t q;
- memcpy(&q,&a,sizeof(size_t));
- return q;
- }
- };
-
- template<> struct nspace::hash<string>
- {
- size_t operator()(const string &s) const
- {
- char a[MAXBUF];
- static struct hash<const char *> strhash;
- strlcpy(a,s.c_str(),MAXBUF);
- strlower(a);
- return strhash(a);
- }
- };
-}
-
+#ifdef GCC34
+ template<> struct hash<in_addr>
+#else
+ template<> struct nspace::hash<in_addr>
+#endif
+ {
+ size_t operator()(const struct in_addr &a) const
+ {
+ size_t q;
+ memcpy(&q,&a,sizeof(size_t));
+ return q;
+ }
+ };
+#ifdef GCC34
+ template<> struct hash<string>
+#else
+ template<> struct nspace::hash<string>
+#endif
+ {
+ size_t operator()(const string &s) const
+ {
+ char a[MAXBUF];
+ static struct hash<const char *> strhash;
+ strlcpy(a,s.c_str(),MAXBUF);
+ strlower(a);
+ return strhash(a);
+ }
+ };
+}
struct StrHashComp
{