diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-19 15:56:42 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-19 15:56:42 +0000 |
commit | 9cf56d917d92959701694477f7944d45ad2c38ed (patch) | |
tree | a379ee905e7485c2ee825790720ed2b69ba127d1 /include/dns.h | |
parent | 3bbb36695383badf5b3ba0ecba070f16094ae51d (diff) |
Windows support. Tested and working to compile on freebsd and linux. Next step is to make sure it actually works in windows too. ;p. Add Burlex to contributors.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7043 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/dns.h')
-rw-r--r-- | include/dns.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/dns.h b/include/dns.h index f12dbdb1e..d823a04a8 100644 --- a/include/dns.h +++ b/include/dns.h @@ -52,7 +52,7 @@ class Module; /** * Result status, used internally */ -class DNSResult : public classbase +class CoreExport DNSResult : public classbase { public: /** Result ID @@ -84,7 +84,7 @@ typedef std::pair<unsigned char*, std::string> DNSInfo; /** Cached item stored in the query cache. */ -class CachedQuery +class CoreExport CachedQuery { public: /** The cached result data, an IP or hostname @@ -108,14 +108,18 @@ class CachedQuery */ int CalcTTLRemaining() { - int n = expires - time(NULL); + int n = (int)expires - (int)time(NULL); return (n < 0 ? 0 : n); } }; /** DNS cache information. Holds IPs mapped to hostnames, and hostnames mapped to IPs. */ +#ifndef WIN32 typedef nspace::hash_map<irc::string, CachedQuery, nspace::hash<irc::string> > dnscache; +#else +typedef nspace::hash_map<irc::string, CachedQuery, nspace::hash_compare<irc::string> > dnscache; +#endif /** * Error types that class Resolver can emit to its error method. @@ -144,7 +148,7 @@ class DNSHeader; /** * A DNS Resource Record (rr) */ -class ResourceRecord; +struct ResourceRecord; /** * Query and resource record types @@ -189,7 +193,7 @@ enum ForceProtocol * can occur by calling virtual methods, one is a success situation, and the other * an error situation. */ -class Resolver : public Extensible +class CoreExport Resolver : public Extensible { protected: /** @@ -319,7 +323,7 @@ class Resolver : public Extensible * back to Resolver objects, based upon the request ID. You * should never use this class yourself. */ -class DNS : public EventHandler +class CoreExport DNS : public EventHandler { private: |