From 9cf56d917d92959701694477f7944d45ad2c38ed Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 19 May 2007 15:56:42 +0000 Subject: 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 --- include/dns.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/dns.h') 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 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 > dnscache; +#else +typedef nspace::hash_map > 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: -- cgit v1.2.3