Merge
authordcubed
Fri, 15 Jul 2016 18:09:33 +0000
changeset 39971 fbf0d737352e
parent 39969 bdd70df54ba0 (current diff)
parent 39970 7b433c06ccfd (diff)
child 39975 44f83dd02bd5
Merge
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Fri Jul 15 09:10:36 2016 -0700
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Fri Jul 15 18:09:33 2016 +0000
@@ -79,7 +79,6 @@
 # include <link.h>
 # include <poll.h>
 # include <pthread.h>
-# include <pwd.h>
 # include <schedctl.h>
 # include <setjmp.h>
 # include <signal.h>
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Fri Jul 15 09:10:36 2016 -0700
+++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Fri Jul 15 18:09:33 2016 +0000
@@ -34,16 +34,18 @@
 #include "utilities/exceptions.hpp"
 
 // put OS-includes here
-# include <sys/types.h>
-# include <sys/mman.h>
-# include <errno.h>
-# include <stdio.h>
-# include <unistd.h>
-# include <sys/stat.h>
-# include <signal.h>
-# include <pwd.h>
-# include <procfs.h>
+#include <sys/types.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <procfs.h>
 
+/* For POSIX-compliant getpwuid_r on Solaris */
+#define _POSIX_PTHREAD_SEMANTICS
+#include <pwd.h>
 
 static char* backing_store_file_name = NULL;  // name of the backing store
                                               // file, if successfully created.
@@ -453,12 +455,8 @@
 
   char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize, mtInternal);
 
-#ifdef _GNU_SOURCE
   struct passwd* p = NULL;
   int result = getpwuid_r(uid, &pwent, pwbuf, (size_t)bufsize, &p);
-#else  // _GNU_SOURCE
-  struct passwd* p = getpwuid_r(uid, &pwent, pwbuf, (int)bufsize);
-#endif // _GNU_SOURCE
 
   if (p == NULL || p->pw_name == NULL || *(p->pw_name) == '\0') {
     if (PrintMiscellaneous && Verbose) {
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Jul 15 09:10:36 2016 -0700
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Fri Jul 15 18:09:33 2016 +0000
@@ -74,7 +74,6 @@
 # include <sys/systeminfo.h>
 # include <sys/socket.h>
 # include <sys/lwp.h>
-# include <pwd.h>
 # include <poll.h>
 # include <sys/lwp.h>
 
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Fri Jul 15 09:10:36 2016 -0700
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Fri Jul 15 18:09:33 2016 +0000
@@ -74,7 +74,6 @@
 # include <sys/socket.h>
 # include <sys/trap.h>
 # include <sys/lwp.h>
-# include <pwd.h>
 # include <poll.h>
 # include <sys/lwp.h>
 # include <procfs.h>     //  see comment in <sys/procfs.h>