1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 18:53:12 +02:00

Fix OSX buld and a warning in modulemanager.cpp

This commit is contained in:
Adam
2013-04-12 17:19:29 -04:00
parent 9a45626379
commit b405484fb9
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -84,12 +84,15 @@ foreach(MODULE_FOLDER ${MODULES_FOLDERS})
if(GETTEXT_FOUND)
add_dependencies(${SO} module_language)
endif(GETTEXT_FOUND)
target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
# For Windows only, have the module link to the export library of Anope as well as wsock32 and Ws2_32 libraries (most of the modules probably don't need this, but this is to be on the safe side), also set it's version
if(WIN32)
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY} ${TEMP_DEPENDENCIES})
target_link_libraries(${SO} ${PROGRAM_NAME} wsock32 Ws2_32 ${WIN32_MEMORY})
set_target_properties(${PROGRAM_NAME} PROPERTIES VERSION "${VERSION_DOTTED}")
else(WIN32)
target_link_libraries(${SO} ${TEMP_DEPENDENCIES})
if(APPLE)
target_link_libraries(${SO} ${PROGRAM_NAME})
endif(APPLE)
endif(WIN32)
# Set the module to be installed to the module directory under the data directory
install(TARGETS ${SO}
+1 -1
View File
@@ -465,7 +465,7 @@ bool ModuleManager::SetPriority(Module *mod, Implementation i, Priority s, Modul
for (unsigned j = source; j != swap_pos; j += incrmnt)
{
if (j + incrmnt > EventHandlers[i].size() - 1 || j + incrmnt < 0)
if (j + incrmnt > EventHandlers[i].size() - 1 || (!j && incrmnt == -1))
continue;
std::swap(EventHandlers[i][j], EventHandlers[i][j + incrmnt]);