summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Sohns <eriksohns@fastmail.net>2015-12-01 19:35:34 +0100
committerErik Sohns <eriksohns@fastmail.net>2015-12-01 19:35:34 +0100
commit3bff6f8cfd6330e506e5f5f86a90fc2f02dd6191 (patch)
treec55812b221471a9e1b5249ecfa1a8ecb21e961a0
parentf8f3435620aefc51a4e5cfe49ccc185f1ce16977 (diff)
downloadATCD-3bff6f8cfd6330e506e5f5f86a90fc2f02dd6191.tar.gz
improved solaris 11 support
-rw-r--r--ACE/ace/OS_NS_pwd.inl8
-rw-r--r--ACE/ace/config-sunos5.11.h3
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 */