YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PlatformNetdb.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_PLATFORMNETDB_H
7#define YARP_OS_IMPL_PLATFORMNETDB_H
8
9#include <yarp/conf/system.h>
10#ifdef YARP_HAS_ACE
11# include <ace/OS_NS_netdb.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_NETDB_H)
17# include <netdb.h>
18#endif
19
20
21namespace yarp::os::impl {
22
23#ifdef YARP_HAS_ACE
24using ACE_OS::gethostbyaddr;
25using ACE_OS::gethostbyname;
26// ACE_OS::getaddrinfo, etc are not implemented, anyway ACE implementation
27// is different, therefore they are not needed.
28#else
29using ::freeaddrinfo;
30using ::gai_strerror;
31using ::getaddrinfo;
32using ::gethostbyaddr;
33using ::gethostbyname;
34using ::getnameinfo;
35#endif
36
37} // namespace yarp::os::impl
38
39
40#endif // YARP_OS_IMPL_PLATFORMNETDB_H
The components from which ports and connections are built.