diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dynamic.cpp | 12 |
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() |