summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2015-03-06 12:17:23 -0600
committerPhil Mesnier <mesnier_p@ociweb.com>2015-03-06 12:17:23 -0600
commitd91af284f8ce1f723c1e242c31188c734999d1f1 (patch)
tree4fa0ce9b080259ac7f5c910ed16a902fe619e9b6
parent497c711fc1cb8380bd3ca71584067eb6d41ea554 (diff)
downloadATCD-d91af284f8ce1f723c1e242c31188c734999d1f1.tar.gz
Restore support for building on Solaris using SThread rather than PThread API
-rw-r--r--ACE/ace/OS_NS_pwd.inl8
-rw-r--r--ACE/include/makeinclude/platform_sunos5_sunc++.GNU5
2 files changed, 12 insertions, 1 deletions
diff --git a/ACE/ace/OS_NS_pwd.inl b/ACE/ace/OS_NS_pwd.inl
index c724114d8fc..3d680bba97b 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_STHREADS)
+ if (::getpwnam_r (name, pwd, buffer, bufsize) != 0)
+ {
+ *result = 0;
+ return -1;
+ }
+ *result = pwd;
+ return 0;
#else
return ::getpwnam_r (name, pwd, buffer, bufsize, result);
#endif /* ACE_LACKS_PWD_FUNCTIONS */
diff --git a/ACE/include/makeinclude/platform_sunos5_sunc++.GNU b/ACE/include/makeinclude/platform_sunos5_sunc++.GNU
index dc7c6ec4d05..34c6be57aeb 100644
--- a/ACE/include/makeinclude/platform_sunos5_sunc++.GNU
+++ b/ACE/include/makeinclude/platform_sunos5_sunc++.GNU
@@ -46,6 +46,7 @@ rwtools ?= 0
stdcpplib ?= 1
stlport ?= 0
threads ?= 1
+pthreads ?= 1
versioned_so ?= 1
tk_reactor ?= 0
ace_with_x11 ?= 0
@@ -220,7 +221,9 @@ ifeq (C++ 5.10,$(findstring C++ 5.10,$(CC_VERSION)))
endif
LDFLAGS += -xildoff
-CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
+ifeq ($(pthreads),1)
+ CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS
+endif
OCFLAGS += -xO4
PIC = -KPIC
AR = CC