summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-01 00:57:24 -0500
committerAdam <Adam@anope.org>2013-03-01 00:57:24 -0500
commit91ad9d22cad8c1da3134975852ba1f732b55dabe (patch)
treef93eb451755e2e531c75d2c16ced8c96f17e243c /include
parent6aa9ad938a4923bd730516aa97a6e19643fd5c57 (diff)
Fix Windows build
Diffstat (limited to 'include')
-rw-r--r--include/anope.h46
-rw-r--r--include/commands.h2
-rw-r--r--include/defs.h1
-rw-r--r--include/language.h10
-rw-r--r--include/modes.h3
-rw-r--r--include/modules.h2
-rw-r--r--include/regchannel.h2
-rw-r--r--include/sockets.h2
8 files changed, 35 insertions, 33 deletions
diff --git a/include/anope.h b/include/anope.h
index 6878a333c..9bf0f982d 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -339,16 +339,16 @@ namespace Anope
/** The time Anope started.
*/
- extern time_t StartTime;
+ extern CoreExport time_t StartTime;
/** The value to return from main()
*/
extern int ReturnValue;
extern sig_atomic_t Signal;
- extern bool Quitting;
- extern bool Restarting;
- extern Anope::string QuitReason;
+ extern CoreExport bool Quitting;
+ extern CoreExport bool Restarting;
+ extern CoreExport Anope::string QuitReason;
/** The current system time, which is pretty close to being accurate.
* Use this unless you need very specific time checks
@@ -357,31 +357,31 @@ namespace Anope
/** The debug level we are running at.
*/
- extern int Debug;
+ extern CoreExport int Debug;
/** Other comand line options.
*/
- extern bool ReadOnly, NoFork, NoThird, NoExpire, ProtocolDebug;
+ extern CoreExport bool ReadOnly, NoFork, NoThird, NoExpire, ProtocolDebug;
/** The root of the services installation. Usually ~/services
*/
- extern Anope::string ServicesDir;
+ extern CoreExport Anope::string ServicesDir;
/** Services binary name (eg services)
*/
- extern Anope::string ServicesBin;
+ extern CoreExport Anope::string ServicesBin;
/** Various directory paths. These can be set at runtime by command line args
*/
- extern Anope::string ConfigDir;
- extern Anope::string DataDir;
- extern Anope::string ModuleDir;
- extern Anope::string LocaleDir;
- extern Anope::string LogDir;
+ extern CoreExport Anope::string ConfigDir;
+ extern CoreExport Anope::string DataDir;
+ extern CoreExport Anope::string ModuleDir;
+ extern CoreExport Anope::string LocaleDir;
+ extern CoreExport Anope::string LogDir;
/** The uplink we are currently connected to
*/
- extern int CurrentUplink;
+ extern CoreExport int CurrentUplink;
/** Various methods to determine the Anope version running
*/
@@ -417,7 +417,7 @@ namespace Anope
/** Calls the save database event
*/
- extern void SaveDatabases();
+ extern CoreExport void SaveDatabases();
/** Check whether two strings match.
* @param str The string to check against the pattern (e.g. foobar)
@@ -457,7 +457,7 @@ namespace Anope
* @param src The source string to encrypt
* @param dest The destination where the encrypted string is placed
*/
- extern void Encrypt(const Anope::string &src, Anope::string &dest);
+ extern CoreExport void Encrypt(const Anope::string &src, Anope::string &dest);
/** Decrypts what is in 'src' to 'dest'.
* @param src The source string to decrypt
@@ -465,7 +465,7 @@ namespace Anope
* @return true if decryption was successful. This is usually not the case
* as most encryption methods we use are one way.
*/
- extern bool Decrypt(const Anope::string &src, Anope::string &dest);
+ extern CoreExport bool Decrypt(const Anope::string &src, Anope::string &dest);
/** Returns a sequence of data formatted as the format argument specifies.
** After the format parameter, the function expects at least as many
@@ -488,40 +488,40 @@ namespace Anope
/** Determines if a path is a file
*/
- extern bool IsFile(const Anope::string &file);
+ extern CoreExport bool IsFile(const Anope::string &file);
/** Converts a string into seconds
* @param s The string, eg 3d
* @return The time represented by the string, eg 259,200
*/
- extern time_t DoTime(const Anope::string &s);
+ extern CoreExport time_t DoTime(const Anope::string &s);
/** Retrieves a human readable string representing the time in seconds
* @param seconds The time on seconds, eg 60
* @param nc The account to use langauge settings for to translate this string, if applicable
* @return A human readable string, eg "1 minute"
*/
- extern Anope::string Duration(time_t seconds, const NickCore *nc = NULL);
+ extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = NULL);
/** Generates a human readable string of type "expires in ..."
* @param expires time in seconds
* @param nc The account to use langauge settings for to translate this string, if applicable
* @return A human readable string, eg "expires in 5 days"
*/
- extern Anope::string Expires(time_t seconds, const NickCore *nc = NULL);
+ extern CoreExport Anope::string Expires(time_t seconds, const NickCore *nc = NULL);
/** Converts a time in seconds (epoch) to a human readable format.
* @param t The time
* @param nc The account to use langauge settings for to translate this string, if applicable
* @param short_output If true, the output is just a date (eg, "Apr 12 20:18:22 2009 MSD"), else it includes the date and how long ago/from now that date is, (eg "Apr 12 20:18:22 2009 MSD (1313 days, 9 hours, 32 minutes ago)"
*/
- extern Anope::string strftime(time_t t, const NickCore *nc = NULL, bool short_output = false);
+ extern CoreExport Anope::string strftime(time_t t, const NickCore *nc = NULL, bool short_output = false);
/** Normalize buffer, stripping control characters and colors
* @param A string to be parsed for control and color codes
* @return A string stripped of control and color codes
*/
- extern Anope::string NormalizeBuffer(const Anope::string &);
+ extern CoreExport Anope::string NormalizeBuffer(const Anope::string &);
/** Main processing routine. Parses the message and takes the appropriate action.
* @param Raw message from the uplink
diff --git a/include/commands.h b/include/commands.h
index 207d2c444..10ddeed2b 100644
--- a/include/commands.h
+++ b/include/commands.h
@@ -43,7 +43,7 @@ struct CommandInfo
/* Where the replies from commands go to. User inheits from this and is the normal
* source of a CommandReply
*/
-struct CommandReply
+struct CoreExport CommandReply
{
virtual ~CommandReply() { }
virtual void SendMessage(const BotInfo *source, const Anope::string &msg) = 0;
diff --git a/include/defs.h b/include/defs.h
index ee70d5a70..34e900717 100644
--- a/include/defs.h
+++ b/include/defs.h
@@ -13,6 +13,7 @@
class AccessGroup;
class AutoKick;
+namespace Anope { class String; }
class BotInfo;
class CallBack;
class ChanAccess;
diff --git a/include/language.h b/include/language.h
index daa5aa6bf..42d95383d 100644
--- a/include/language.h
+++ b/include/language.h
@@ -16,7 +16,7 @@ namespace Language
* added to this list if we detect a language exists in the correct
* location for each language.
*/
- extern std::vector<Anope::string> Languages;
+ extern CoreExport std::vector<Anope::string> Languages;
/* Domains to search when looking for translations other than the
* default "anope domain. This is used by modules who add their own
@@ -38,28 +38,28 @@ namespace Language
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
- extern const char *Translate(const char *string);
+ extern CoreExport const char *Translate(const char *string);
/** Translates a string to the language of the given user.
* @param u The user to transate the string for
* @param string A string to translate
* @return The translated string if found, else the original string.
*/
- extern const char *Translate(User *u, const char *string);
+ extern CoreExport const char *Translate(User *u, const char *string);
/** Translates a string to the language of the given account.
* @param nc The account to translate the string for
* @param string A string to translate
* @return The translated string if count, else the original string
*/
- extern const char *Translate(const NickCore *nc, const char *string);
+ extern CoreExport const char *Translate(const NickCore *nc, const char *string);
/** Translatesa string to the given language.
* @param lang The language to trnalsate to
* @param string The string to translate
* @return The translated string if found, else the original string.
*/
- extern const char *Translate(const char *lang, const char *string);
+ extern CoreExport const char *Translate(const char *lang, const char *string);
} // namespace Language
diff --git a/include/modes.h b/include/modes.h
index 5d884692e..4b207fa44 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -298,7 +298,8 @@ class CoreExport ModeManager
static std::vector<UserMode *> UserModes;
/* Number of generic channel and user modes we are tracking */
- static unsigned GenericChannelModes, GenericUserModes;
+ static unsigned GenericChannelModes;
+ static unsigned GenericUserModes;
/* Default channel mode lock */
static std::list<std::pair<Anope::string, Anope::string> > ModeLockOn;
static std::list<Anope::string> ModeLockOff;
diff --git a/include/modules.h b/include/modules.h
index 5bdce1355..53f723898 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1029,7 +1029,7 @@ class CoreExport ModuleManager
public:
/** List of all modules loaded in Anope
*/
- static CoreExport std::list<Module *> Modules;
+ static std::list<Module *> Modules;
/** Event handler hooks.
* This needs to be public to be used by FOREACH_MOD and friends.
diff --git a/include/regchannel.h b/include/regchannel.h
index ab369ce2b..c20f874e1 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -168,7 +168,7 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
public:
friend class ChanAccess;
friend class AutoKick;
- friend class BadWord;
+ friend struct BadWord;
typedef std::multimap<Anope::string, ModeLock *> ModeList;
Serialize::Checker<ModeList> mode_locks;
diff --git a/include/sockets.h b/include/sockets.h
index 12cba7b7f..8fc675614 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -96,7 +96,7 @@ class CoreExport cidr
bool operator==(const cidr &other) const;
bool operator!=(const cidr &other) const;
- struct hash
+ struct CoreExport hash
{
size_t operator()(const cidr &s) const;
};