Request for review - change two include header files according to POSIX.1-2008

Charles Lee littlee at
Thu Oct 13 04:54:51 UTC 2011

On 10/12/2011 10:16 PM, Alan Bateman wrote:
> David Holmes wrote:
>> :
>> We'll need to verify the changes for <sys/fcntl.h> in the 
>> genUnixConstants code. There tends to be a reason (often historical 
>> and possibly no longer applicable) for using the sys variants (though 
>> sometimes it was just that the non-sys version didn't exist at some 
>> point in time).
> This one is just an oversight, it can be changed to fcntl.h. There is 
> another one in genSolarisConstants.c that can also be changed but that 
> one is probably not an issue for AIX as that source file is Solaris 
> specific.
> I've created a bug to track this:
> 7100054: (porting) Native code should include fcntl.h and unistd.h 
> rather than sys/fcntl.h and sys/unistd.h
> -Alan.

Thanks Alan. Below is the patch I am failed to attach. It is trivial...

By the way, is there any network problem in openjdk these days? I used 
to attach a webrev successfully, but fail now for many many attempts. 
The webrev is only 76k big...

diff --git src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 
index bb03165..e312c2b 100644
--- src/solaris/native/sun/awt/splashscreen/splashscreen_config.h
+++ src/solaris/native/sun/awt/splashscreen/splashscreen_config.h
@@ -32,7 +32,7 @@
  #include <X11/Xutil.h>
  #include <X11/extensions/shape.h>
  #include <sys/types.h>
-#include <sys/unistd.h>
+#include <unistd.h>
  #include <pthread.h>
  #include <signal.h>
  #include <inttypes.h>
diff --git src/solaris/native/sun/nio/fs/genSolarisConstants.c 
index df46398..346bfbb 100644
--- src/solaris/native/sun/nio/fs/genSolarisConstants.c
+++ src/solaris/native/sun/nio/fs/genSolarisConstants.c
@@ -27,7 +27,7 @@
  #include <errno.h>
  #include <unistd.h>
  #include <sys/acl.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
  #include <sys/stat.h>

diff --git src/solaris/native/sun/nio/fs/genUnixConstants.c 
index ea48d4d..56984a7 100644
--- src/solaris/native/sun/nio/fs/genUnixConstants.c
+++ src/solaris/native/sun/nio/fs/genUnixConstants.c
@@ -26,7 +26,7 @@
  #include <stdio.h>
  #include <errno.h>
  #include <unistd.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
  #include <sys/stat.h>


Yours Charles

More information about the core-libs-dev mailing list