summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 04:56:06 +0000
committerfrostycoolslug <frostycoolslug@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 04:56:06 +0000
commitfc725b7e8fbe3f449a12012d9e5b92a57e723370 (patch)
tree331226bd407d29753bb4a169c3587b93e0d87a48 /src
parente9c208d82b288226437fdef3c9ca4c5438d43abc (diff)
Small minor insignificant ite.. ZOMG CYGWIN DYNAMIC MODULES!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2984 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/dynamic.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dynamic.cpp b/src/dynamic.cpp
index 06aaf3ccd..1dfb823c6 100644
--- a/src/dynamic.cpp
+++ b/src/dynamic.cpp
@@ -53,6 +53,17 @@ DLLManager::DLLManager(char *fname)
}
err = "Module is not statically compiled into the ircd";
#else
+#ifdef IS_CYGWIN
+ // Cygwin behaviour is handled slightly differently
+ // With the advent of dynamic modules. Because Windows
+ // wont let you overwrite a file which is currently in
+ // Use, we can safely attempt to load the module from its
+ // Current location :)
+
+ h = dlopen(fname, RTLD_NOW );
+ err = (char*)dlerror();
+
+#else
// Copy the library to a temp location, this makes recompiles
// a little safer if the ircd is running at the time as the
// shared libraries are mmap()ed and not doing this causes
@@ -78,6 +89,7 @@ DLLManager::DLLManager(char *fname)
if (!Config->debugging)
unlink(tmpfile_template);
#endif
+#endif
}
DLLManager::~DLLManager()