Request for review - change two include header files according to POSIX.1-2008
david.holmes at oracle.com
Wed Oct 12 07:36:12 UTC 2011
On 12/10/2011 5:23 PM, Charles Lee wrote:
> On 10/12/2011 03:12 PM, David Holmes wrote:
>> On 12/10/2011 4:26 PM, Charles Lee wrote:
>>> sys/unistd.h, sys/fcntl.h are not supported in AIX. And according to the
>>> POSIX.1-2008 (http://pubs.opengroup.org/onlinepubs/9699919799/), I have
>>> changed them to unistd.h and fcntl.h. The patch has been tested on both
>>> linux and aix.
>>> I also change the header file in solaris, though I do not have a solaris
>>> machine on the hand. Hope it will not break the build :-)
>> unistd.h and fcntl.h are already used extensively on Solaris
>>> The patch and webrev has been attached.
>> Looks like they were stripped of the email. (And of the second attempt.)
>> By grepping I assume the splashscreen_config.h file is one place this
>> was fixed for unistd.h. It is interesting to note that in some cases
>> at least (eg splashscreen_sys.c) the C file includes <unistd.h> anyway.
> Yes. Only splashscreen_config.h has <sys/unistd.h>
Ok. I've cc'ed awt-dev as this is awt code.
>> 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).
> By grep, only genUnixConstants.c and genSolarisConstants.c use
> <sys/fcntl.h> in the jdk repository. And more than 20 files use <fcntl.h>
Yep. And the fcntl manpage on Solaris says to #include <unistd.h> and
<fcntl.h> - so I think we're okay there. I suspect Solaris 8 may be a
different story but that's only an issue for JDK6.
>> David Holmes
> Trying to attach a plain diff file again and again....
Patch inlined for AWT-dev folk to see.
diff --git src/solaris/native/sun/awt/splashscreen/splashscreen_config.h
index bb03165..e312c2b 100644
@@ -32,7 +32,7 @@
diff --git src/solaris/native/sun/nio/fs/genSolarisConstants.c
index df46398..346bfbb 100644
@@ -27,7 +27,7 @@
diff --git src/solaris/native/sun/nio/fs/genUnixConstants.c
index ea48d4d..56984a7 100644
@@ -26,7 +26,7 @@
More information about the core-libs-dev