diff options
author | michel_j <michel_j@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-05-05 14:21:56 +0000 |
---|---|---|
committer | michel_j <michel_j@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2004-05-05 14:21:56 +0000 |
commit | 1e325dcee48f29b05eff4b90737d1e531ed476fa (patch) | |
tree | 4fb4b3c34e5292f0e86c7692fee21700a79056b9 /ace/OS_NS_unistd.inl | |
parent | b48a93be9d79676e1fbaaa6261f82b7e92c4945d (diff) | |
download | ATCD-1e325dcee48f29b05eff4b90737d1e531ed476fa.tar.gz |
Wed May 5 09:18:00 2004 Justin Michel <michel_j@ociweb.com>
Diffstat (limited to 'ace/OS_NS_unistd.inl')
-rw-r--r-- | ace/OS_NS_unistd.inl | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/ace/OS_NS_unistd.inl b/ace/OS_NS_unistd.inl index 98f0c2079f6..c15084d8d66 100644 --- a/ace/OS_NS_unistd.inl +++ b/ace/OS_NS_unistd.inl @@ -648,9 +648,16 @@ ACE_OS::hostname (char name[], size_t maxnamelen) #elif defined (VXWORKS) || defined (ACE_HAS_WINCE) ACE_OSCALL_RETURN (::gethostname (name, maxnamelen), int, -1); #elif defined (ACE_WIN32) - ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetComputerNameA (name, - LPDWORD (&maxnamelen)), - ace_result_), int, -1); + if (::gethostname (name, maxnamelen) == 0) + { + return 0; + } + else + { + ACE_WIN32CALL_RETURN (ACE_ADAPT_RETVAL (::GetComputerNameA (name, + LPDWORD (&maxnamelen)), + ace_result_), int, -1); + } #elif defined (CHORUS) if (::gethostname (name, maxnamelen) == -1) return -1; |