YARP
Yet Another Robot Platform
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 
21 namespace yarp {
22 namespace os {
23 namespace impl {
24 
25 #ifdef YARP_HAS_ACE
26 using ACE_OS::gethostbyaddr;
27 using ACE_OS::gethostbyname;
28 // ACE_OS::getaddrinfo, etc are not implemented, anyway ACE implementation
29 // is different, therefore they are not needed.
30 #else
31 using ::freeaddrinfo;
32 using ::gai_strerror;
33 using ::getaddrinfo;
34 using ::gethostbyaddr;
35 using ::gethostbyname;
36 using ::getnameinfo;
37 #endif
38 
39 } // namespace impl
40 } // namespace os
41 } // namespace yarp
42 
43 
44 #endif // YARP_OS_IMPL_PLATFORMNETDB_H
The main, catch-all namespace for YARP.
Definition: dirs.h:16