summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2022-12-23 15:09:12 +0000
committerSadie Powell <sadie@witchery.services>2022-12-23 15:09:12 +0000
commit24b881c427a0f3b07709bb2b81c8d2a574142d81 (patch)
tree776b78881581473222fdffe0da5f4c7aa43039af /include/modules.h
parent28be8818869380e2d01a516423015e16c4c18553 (diff)
Update MODULE_INIT for modern MSVC+ versions.
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/include/modules.h b/include/modules.h
index f7956ecab..a13d56195 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -24,32 +24,7 @@
* and functions needed to make a module loadable by the OS.
* It defines the class factory and external AnopeInit and AnopeFini functions.
*/
-#ifdef _WIN32
-# define MODULE_INIT(x) \
- extern "C" DllExport Module *AnopeInit(const Anope::string &, const Anope::string &); \
- extern "C" Module *AnopeInit(const Anope::string &modname, const Anope::string &creator) \
- { \
- return new x(modname, creator); \
- } \
- BOOLEAN WINAPI DllMain(HINSTANCE, DWORD, LPVOID) \
- { \
- return TRUE; \
- } \
- extern "C" DllExport void AnopeFini(x *); \
- extern "C" void AnopeFini(x *m) \
- { \
- delete m; \
- } \
- extern "C" DllExport ModuleVersionC AnopeVersion() \
- { \
- ModuleVersionC ver; \
- ver.version_major = VERSION_MAJOR; \
- ver.version_minor = VERSION_MINOR; \
- ver.version_patch = VERSION_PATCH; \
- return ver; \
- }
-#else
-# define MODULE_INIT(x) \
+#define MODULE_INIT(x) \
extern "C" DllExport Module *AnopeInit(const Anope::string &modname, const Anope::string &creator) \
{ \
return new x(modname, creator); \
@@ -66,7 +41,6 @@
ver.version_patch = VERSION_PATCH; \
return ver; \
}
-#endif
/**
* This #define allows us to call a method in all