summaryrefslogtreecommitdiff
path: root/include/services.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-03-29 13:43:40 -0400
committerAdam <Adam@anope.org>2011-03-29 13:43:40 -0400
commit8dbdfa9a440b72dbee21f548f7d9457607d35f42 (patch)
treebc82b4bc83acd33bfe0673ef8e306d3bb4bc38fc /include/services.h
parent685e99be0241e97665cefe8730bb4aa53647aeb2 (diff)
Fixed windows build
Diffstat (limited to 'include/services.h')
-rw-r--r--include/services.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/services.h b/include/services.h
index 15896ca83..f5a787a24 100644
--- a/include/services.h
+++ b/include/services.h
@@ -43,6 +43,19 @@
#include <fcntl.h>
#include <typeinfo>
+#if GETTEXT_FOUND
+# include <libintl.h>
+# define _(x) anope_gettext(x)
+# ifdef _WIN32
+ /* Redefine snprintf and undefine vsnprintf because liblintl defines it to its own function */
+# undef snprintf
+# define snprintf _snprintf
+# undef vsnprintf
+# endif
+#else
+# define _(x) x
+#endif
+
#ifndef _WIN32
# include <unistd.h>
# include <grp.h>
@@ -140,13 +153,6 @@ extern "C" void __pfnBkCheck() {}
# undef int32
#endif
-#if GETTEXT_FOUND
-# include <libintl.h>
-# define _(x) anope_gettext(x)
-#else
-# define _(x) x
-#endif
-
/** This definition is used as shorthand for the various classes
* and functions needed to make a module loadable by the OS.
* It defines the class factory and external AnopeInit and AnopeFini functions.
@@ -508,7 +514,7 @@ const Anope::string MemoFlagStrings[] = {
/* Memo info structures. Since both nicknames and channels can have memos,
* we encapsulate memo data in a MemoList to make it easier to handle. */
-class Memo : public Flags<MemoFlag>
+class CoreExport Memo : public Flags<MemoFlag>
{
public:
Memo();