Skip to content

Commit 997619d

Browse files
committed
Moving guards to proper places.
1 parent 52741b9 commit 997619d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/opt/util/util.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,14 @@ void OptMgr::PrintUsage() {
5050
}
5151
}
5252

53+
ABC_NAMESPACE_IMPL_END
54+
5355
#ifdef __linux__
5456

5557
#include <sys/prctl.h>
5658

59+
ABC_NAMESPACE_IMPL_START
60+
5761
void kill_on_parent_death(int sig)
5862
{
5963
// kill process if parent dies
@@ -67,6 +71,8 @@ void kill_on_parent_death(int sig)
6771
}
6872
}
6973

74+
ABC_NAMESPACE_IMPL_END
75+
7076
#elif defined(__APPLE__)
7177

7278
#include <thread>
@@ -78,6 +84,8 @@ void kill_on_parent_death(int sig)
7884
#include <sys/event.h>
7985
#include <sys/time.h>
8086

87+
ABC_NAMESPACE_IMPL_START
88+
8189
template <typename Func>
8290
static auto retry_eintr(Func &&fn) -> decltype(fn())
8391
{
@@ -124,12 +132,16 @@ void kill_on_parent_death(int sig)
124132
monitor_thread.detach();
125133
}
126134

135+
ABC_NAMESPACE_IMPL_END
136+
127137
#else // neither linux or OS X
128138

139+
ABC_NAMESPACE_IMPL_START
140+
129141
void kill_on_parent_death(int sig)
130142
{
131143
}
132144

133-
#endif
134-
135145
ABC_NAMESPACE_IMPL_END
146+
147+
#endif

0 commit comments

Comments
 (0)