diff options
author | Erik Sohns <eriksohns@fastmail.net> | 2015-12-01 19:35:34 +0100 |
---|---|---|
committer | Erik Sohns <eriksohns@fastmail.net> | 2015-12-01 19:35:34 +0100 |
commit | 3bff6f8cfd6330e506e5f5f86a90fc2f02dd6191 (patch) | |
tree | c55812b221471a9e1b5249ecfa1a8ecb21e961a0 | |
parent | f8f3435620aefc51a4e5cfe49ccc185f1ce16977 (diff) | |
download | ATCD-3bff6f8cfd6330e506e5f5f86a90fc2f02dd6191.tar.gz |
improved solaris 11 support
-rw-r--r-- | ACE/ace/OS_NS_pwd.inl | 8 | ||||
-rw-r--r-- | ACE/ace/config-sunos5.11.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/ACE/ace/OS_NS_pwd.inl b/ACE/ace/OS_NS_pwd.inl index 3d680bba97b..a6e0d43d0f6 100644 --- a/ACE/ace/OS_NS_pwd.inl +++ b/ACE/ace/OS_NS_pwd.inl @@ -56,6 +56,14 @@ ACE_OS::getpwnam_r (const char *name, } *result = pwd; return 0; +#elif defined (ACE_HAS_SOLARIS11_GETPWNAM_R) + if (::getpwnam_r (name, pwd, buffer, bufsize) == 0) + { + *result = 0; + return -1; + } + *result = pwd; + return 0; #elif defined (ACE_HAS_STHREADS) if (::getpwnam_r (name, pwd, buffer, bufsize) != 0) { diff --git a/ACE/ace/config-sunos5.11.h b/ACE/ace/config-sunos5.11.h index 07f8b679f3b..3cb88aca708 100644 --- a/ACE/ace/config-sunos5.11.h +++ b/ACE/ace/config-sunos5.11.h @@ -10,4 +10,7 @@ // #include the SunOS 5.10 config, then add any SunOS 5.11 updates below. #include "ace/config-sunos5.10.h" +// *TODO*: find out how far this also hold for previous solaris releases +#define ACE_HAS_SOLARIS11_GETPWNAM_R + #endif /* ACE_CONFIG_H */ |