diff options
author | ocielliottc <elliottc@objectcomputing.com> | 2022-10-14 06:04:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-14 06:04:13 -0500 |
commit | f4512003c2fd03a7471c98a3a56a36353bfef15d (patch) | |
tree | f8c6dc619c992de539da66ea23a6eaba85bb735b /ACE/ace/OS_NS_netdb.inl | |
parent | f63ede24b58993e439c94cf8a3b01773debfba17 (diff) | |
parent | db4f0fb92002573b6b0c571d891ea9fe4e3706be (diff) | |
download | ATCD-f4512003c2fd03a7471c98a3a56a36353bfef15d.tar.gz |
Merge pull request #1965 from DOCGroup/ocielliottc/a6t2-merge
Merged pull requests 1953 and 1955-1958
Diffstat (limited to 'ACE/ace/OS_NS_netdb.inl')
-rw-r--r-- | ACE/ace/OS_NS_netdb.inl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ACE/ace/OS_NS_netdb.inl b/ACE/ace/OS_NS_netdb.inl index 5f4e4c258e9..b3c765653a9 100644 --- a/ACE/ace/OS_NS_netdb.inl +++ b/ACE/ace/OS_NS_netdb.inl @@ -53,7 +53,7 @@ ACE_OS::gethostbyaddr (const char *addr, int length, int type) if (0 == addr || '\0' == addr[0]) return 0; -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS_HAS_GETHOSTBYADDR_REENTRANT) // VxWorks 6.x has a gethostbyaddr() that is threadsafe and // returns an heap-allocated hostentry structure. // just call ACE_OS::gethostbyaddr_r () which knows how to handle this. @@ -134,7 +134,7 @@ ACE_OS::gethostbyaddr_r (const char *addr, //FUZZ: enable check_for_lack_ACE_OS else return (struct hostent *) 0; -# elif defined (ACE_VXWORKS) +# elif defined (ACE_VXWORKS_HAS_GETHOSTBYADDR_REENTRANT) ACE_UNUSED_ARG (h_errnop); // VxWorks 6.x has a threadsafe gethostbyaddr() which returns a heap-allocated // data structure which needs to be freed with hostentFree() @@ -238,10 +238,12 @@ ACE_OS::gethostbyname (const char *name) if (0 == name || '\0' == name[0]) return 0; -# if defined (ACE_VXWORKS) +# if defined (ACE_VXWORKS_HAS_GETHOSTBYNAME_REENTRANT) // VxWorks 6.x has a gethostbyname() that is threadsafe and // returns an heap-allocated hostentry structure. // just call ACE_OS::gethostbyname_r () which knows how to handle this. + // With VxWorks 7 it depends on the GETHOSTBYNAME_REENTRANT + // define struct hostent hentry; ACE_HOSTENT_DATA buf; int h_error; // Not the same as errno! @@ -318,10 +320,11 @@ ACE_OS::gethostbyname_r (const char *name, //FUZZ: enable check_for_lack_ACE_OS else return (struct hostent *) 0; -# elif defined (ACE_VXWORKS) +# elif defined (ACE_VXWORKS_HAS_GETHOSTBYNAME_REENTRANT) ACE_UNUSED_ARG (h_errnop); // VxWorks 6.x has a threadsafe gethostbyname() which returns a heap-allocated // data structure which needs to be freed with hostentFree() + // With VxWorks 7 it depends on the GETHOSTBYNAME_REENTRANT macro //FUZZ: disable check_for_lack_ACE_OS struct hostent* hp = ::gethostbyname (name); //FUZZ: enable check_for_lack_ACE_OS |