summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp51
1 files changed, 29 insertions, 22 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index a9ef0e341..ecfbd6b0f 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -100,28 +100,35 @@ bool nofork = false;
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