MXS-1840 Compile all routers as C++

Minimal changes, only what is needed in order to make it compile.
This commit is contained in:
Johan Wikman
2018-05-03 15:53:17 +03:00
parent 10b2b4ac37
commit 1f6cc6db8a
39 changed files with 476 additions and 427 deletions

View File

@ -1,5 +1,5 @@
if(BUILD_TESTS)
add_executable(testbinlogrouter testbinlog.c ../blr.c ../blr_slave.c ../blr_master.c ../blr_file.c ../blr_cache.c)
add_executable(testbinlogrouter testbinlog.cc ../blr.cc ../blr_slave.cc ../blr_master.cc ../blr_file.cc ../blr_cache.cc)
target_link_libraries(testbinlogrouter maxscale-common ${PCRE_LINK_FLAGS} uuid)
add_test(NAME TestBinlogRouter COMMAND ./testbinlogrouter WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()

View File

@ -132,7 +132,8 @@ int main(int argc, char **argv)
serviceAddBackend(service, server);
}
if ((inst = MXS_CALLOC(1, sizeof(ROUTER_INSTANCE))) == NULL)
inst = static_cast<ROUTER_INSTANCE*>(MXS_CALLOC(1, sizeof(ROUTER_INSTANCE)));
if (inst == NULL)
{
mxs_log_flush_sync();
mxs_log_finish();