summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 15:56:42 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-19 15:56:42 +0000
commit9cf56d917d92959701694477f7944d45ad2c38ed (patch)
treea379ee905e7485c2ee825790720ed2b69ba127d1 /src/modules/extra
parent3bbb36695383badf5b3ba0ecba070f16094ae51d (diff)
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
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp10
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp15
2 files changed, 21 insertions, 4 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 5d95e75cf..436b0f364 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -29,6 +29,12 @@
#include "transport.h"
+#ifdef WINDOWS
+#pragma comment(lib, "libgnutls-13.lib")
+#undef MAX_DESCRIPTORS
+#define MAX_DESCRIPTORS 10000
+#endif
+
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: exec("libgnutls-config --cflags") */
/* $LinkerFlags: rpath("libgnutls-config --libs") exec("libgnutls-config --libs") */
@@ -85,7 +91,7 @@ class ModuleSSLGnuTLS : public Module
public:
ModuleSSLGnuTLS(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
ServerInstance->PublishInterface("InspSocketHook", this);
@@ -837,7 +843,7 @@ class ModuleSSLGnuTLSFactory : public ModuleFactory
};
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
{
return new ModuleSSLGnuTLSFactory;
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index e073eba81..90e9c9ab6 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -17,6 +17,10 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
+#ifdef WINDOWS
+#include <openssl/applink.c>
+#endif
+
#include "inspircd_config.h"
#include "configreader.h"
#include "users.h"
@@ -29,6 +33,13 @@
#include "transport.h"
+#ifdef WINDOWS
+#pragma comment(lib, "libeay32MTd")
+#pragma comment(lib, "ssleay32MTd")
+#undef MAX_DESCRIPTORS
+#define MAX_DESCRIPTORS 10000
+#endif
+
/* $ModDesc: Provides SSL support for clients */
/* $CompileFlags: pkgconfversion("openssl","0.9.7") pkgconfincludes("openssl","/openssl/ssl.h","") */
/* $LinkerFlags: rpath("pkg-config --libs openssl") pkgconflibs("openssl","/libssl.so","-lssl -lcrypto -ldl") */
@@ -122,7 +133,7 @@ class ModuleSSLOpenSSL : public Module
InspIRCd* PublicInstance;
ModuleSSLOpenSSL(InspIRCd* Me)
- : Module::Module(Me), PublicInstance(Me)
+ : Module(Me), PublicInstance(Me)
{
ServerInstance->PublishInterface("InspSocketHook", this);
@@ -855,7 +866,7 @@ class ModuleSSLOpenSSLFactory : public ModuleFactory
};
-extern "C" void * init_module( void )
+extern "C" DllExport void * init_module( void )
{
return new ModuleSSLOpenSSLFactory;
}