mirror of https://github.com/YosysHQ/abc.git
Moving guards to proper places.
This commit is contained in:
parent
52741b9123
commit
997619d33e
|
|
@ -50,10 +50,14 @@ void OptMgr::PrintUsage() {
|
|||
}
|
||||
}
|
||||
|
||||
ABC_NAMESPACE_IMPL_END
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
#include <sys/prctl.h>
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
void kill_on_parent_death(int sig)
|
||||
{
|
||||
// kill process if parent dies
|
||||
|
|
@ -67,6 +71,8 @@ void kill_on_parent_death(int sig)
|
|||
}
|
||||
}
|
||||
|
||||
ABC_NAMESPACE_IMPL_END
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
|
||||
#include <thread>
|
||||
|
|
@ -78,6 +84,8 @@ void kill_on_parent_death(int sig)
|
|||
#include <sys/event.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
template <typename Func>
|
||||
static auto retry_eintr(Func &&fn) -> decltype(fn())
|
||||
{
|
||||
|
|
@ -124,12 +132,16 @@ void kill_on_parent_death(int sig)
|
|||
monitor_thread.detach();
|
||||
}
|
||||
|
||||
ABC_NAMESPACE_IMPL_END
|
||||
|
||||
#else // neither linux or OS X
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
void kill_on_parent_death(int sig)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ABC_NAMESPACE_IMPL_END
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue