8161601: Solaris: __USE_LEGACY_PROTOTYPES__ is redundant and should be removed
authordcubed
Fri, 29 Jul 2016 11:38:07 -0700
changeset 40095 196084720deb
parent 40094 b6bc61803957
child 40097 7f2107220cce
8161601: Solaris: __USE_LEGACY_PROTOTYPES__ is redundant and should be removed Reviewed-by: redestad, dcubed, gthornbr, dholmes
hotspot/src/os/solaris/vm/jvm_solaris.h
hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp
--- a/hotspot/src/os/solaris/vm/jvm_solaris.h	Fri Jul 29 08:17:43 2016 +0000
+++ b/hotspot/src/os/solaris/vm/jvm_solaris.h	Fri Jul 29 11:38:07 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -41,9 +41,7 @@
  * JNI conversion, which should be sorted out later.
  */
 
-#define __USE_LEGACY_PROTOTYPES__
 #include <dirent.h>             /* For DIR */
-#undef __USE_LEGACY_PROTOTYPES__
 #include <sys/param.h>          /* For MAXPATHLEN */
 #include <sys/socket.h>         /* For socklen_t */
 #include <unistd.h>             /* For F_OK, R_OK, W_OK */
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Fri Jul 29 08:17:43 2016 +0000
+++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp	Fri Jul 29 11:38:07 2016 -0700
@@ -336,7 +336,7 @@
   }
 
   // Check to make sure fd and dirp are referencing the same file system object.
-  if (!is_same_fsobject(fd, dirp->dd_fd)) {
+  if (!is_same_fsobject(fd, dirp->d_fd)) {
     // The directory is not secure.
     os::close(fd);
     os::closedir(dirp);
@@ -368,7 +368,7 @@
     // Directory doesn't exist or is insecure, so there is nothing to cleanup.
     return dirp;
   }
-  int fd = dirp->dd_fd;
+  int fd = dirp->d_fd;
 
   // Open a fd to the cwd and save it off.
   int result;
--- a/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Fri Jul 29 08:17:43 2016 +0000
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_sparcWorks.hpp	Fri Jul 29 11:38:07 2016 -0700
@@ -33,9 +33,6 @@
 
 
 # include <ctype.h>
-#define __USE_LEGACY_PROTOTYPES__
-# include <dirent.h>
-#undef __USE_LEGACY_PROTOTYPES__
 # include <string.h>
 # include <strings.h>     // for bsd'isms
 # include <stdarg.h>