summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 03:01:54 -0400
committerAdam <Adam@anope.org>2013-05-05 03:04:01 -0400
commita118946e657b8a137502ff60c1f21c608cb44495 (patch)
tree41753aa8999a8932b8157a808f466f0a8b625f58
parentee2dcf11b8ff6cad5af4895738f7fe17e3baa9ee (diff)
Fix Windows
-rw-r--r--include/config.h23
-rw-r--r--include/defs.h4
2 files changed, 17 insertions, 10 deletions
diff --git a/include/config.h b/include/config.h
index 6fb1c244f..5d9005f63 100644
--- a/include/config.h
+++ b/include/config.h
@@ -21,9 +21,9 @@
namespace Configuration
{
- class Block
+ class CoreExport Block
{
- friend class Conf;
+ friend struct Conf;
public:
typedef Anope::map<Anope::string> item_map;
@@ -40,7 +40,14 @@ namespace Configuration
int CountBlock(const Anope::string &name);
Block* GetBlock(const Anope::string &name, int num = 0);
- template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
+ template<typename T> inline T Get(const Anope::string &tag)
+ {
+ return this->Get<T>(tag, "");
+ }
+ /* VS 2008 has an issue with having a default argument here (def = ""), which is why the above
+ * function exists.
+ */
+ template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
{
const Anope::string &value = this->Get<const Anope::string &>(tag, def);
try
@@ -57,10 +64,10 @@ namespace Configuration
const item_map* GetItems() const;
};
- template<> const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
- template<> time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
- template<> const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
- template<> bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport const Anope::string& Block::Get(const Anope::string &tag, const Anope::string& def) const;
+ template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport const char* Block::Get(const Anope::string &tag, const Anope::string &def) const;
+ template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
/** Represents a configuration file
*/
@@ -83,7 +90,7 @@ namespace Configuration
struct Uplink;
- struct Conf : Block
+ struct CoreExport Conf : Block
{
/* options:readtimeout */
time_t ReadTimeout;
diff --git a/include/defs.h b/include/defs.h
index 9521c760a..e1c7613bc 100644
--- a/include/defs.h
+++ b/include/defs.h
@@ -23,9 +23,9 @@ struct ChanUserContainer;
class ClientSocket;
class Command;
class CommandSource;
-namespace Configuration { class Conf; }
+namespace Configuration { struct Conf; }
class ConnectionSocket;
-namespace DNS { class Query; }
+namespace DNS { struct Query; }
class Entry;
class IdentifyRequest;
class InfoFormatter;