From fc725b7e8fbe3f449a12012d9e5b92a57e723370 Mon Sep 17 00:00:00 2001 From: frostycoolslug Date: Mon, 30 Jan 2006 04:56:06 +0000 Subject: Small minor insignificant ite.. ZOMG CYGWIN DYNAMIC MODULES! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2984 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dynamic.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/dynamic.cpp b/src/dynamic.cpp index 06aaf3ccd..1dfb823c6 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -52,6 +52,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 @@ -78,6 +89,7 @@ DLLManager::DLLManager(char *fname) if (!Config->debugging) unlink(tmpfile_template); #endif +#endif } DLLManager::~DLLManager() -- cgit v1.2.3