YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PlatformSignal.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_OS_IMPL_PLATFORMSIGNAL_H
7#define YARP_OS_IMPL_PLATFORMSIGNAL_H
8
9#include <yarp/conf/system.h>
10#ifdef YARP_HAS_ACE
11# include <ace/OS_NS_signal.h>
12// In one the ACE headers there is a definition of "main" for WIN32
13# ifdef main
14# undef main
15# endif
16#elif defined(YARP_HAS_SIGNAL_H)
17# include <signal.h>
18#elif defined(YARP_HAS_SYS_SIGNAL_H)
19# include <sys/signal.h>
20#endif
21#if defined(YARP_HAS_CSIGNAL)
22# include <csignal>
23#endif
24
25namespace yarp::os::impl {
26
27#if defined(YARP_HAS_ACE)
28using ACE_OS::kill;
29using ACE_OS::sigaction;
30using ACE_OS::sigemptyset;
31using ACE_OS::sigfillset;
32# if defined(YARP_HAS_CSIGNAL)
33// Prefer std::signal over ::signal
34using std::raise;
35using std::signal;
36# else
37using ::raise;
38using ::signal;
39# endif
40#else
41# if defined(__APPLE__) && defined(sigfillset)
42# undef sigfillset
43# endif
44using ::kill;
45using ::sigaction;
46using ::sigemptyset;
47using ::sigfillset;
48# if defined(YARP_HAS_CSIGNAL)
49// Prefer std::signal over ::signal
50using std::raise;
51using std::signal;
52# else
53using ::raise;
54using ::signal;
55# endif
56#endif
57
58} // namespace yarp::os::impl
59
60
61#endif // YARP_OS_IMPL_PLATFORMSIGNAL_H
The components from which ports and connections are built.