mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Fixed gcc vs clang preprocessor tomfoolery.
This commit is contained in:
parent
52f02168bc
commit
468840c9ea
11
src/main.cpp
11
src/main.cpp
@ -21,6 +21,13 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
// HACK
|
||||||
|
#ifdef __has_feature
|
||||||
|
#if __has_feature(address_sanitizer)
|
||||||
|
#define __SANITIZE_ADDRESS__ 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
CNShardServer *shardServer;
|
CNShardServer *shardServer;
|
||||||
std::thread *shardThread;
|
std::thread *shardThread;
|
||||||
|
|
||||||
@ -34,9 +41,11 @@ void terminate(int arg) {
|
|||||||
std::cout << "OpenFusion: terminating." << std::endl;
|
std::cout << "OpenFusion: terminating." << std::endl;
|
||||||
shardServer->kill();
|
shardServer->kill();
|
||||||
shardThread->join();
|
shardThread->join();
|
||||||
#if defined(__SANITIZE_ADDRESS__) || (defined(__has_feature) && __has_feature(address_sanitizer))
|
|
||||||
|
#if defined(__SANITIZE_ADDRESS__)
|
||||||
TableData::cleanup();
|
TableData::cleanup();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user