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

Charles Lee littlee at
Wed Oct 12 07:23:18 UTC 2011

On 10/12/2011 03:12 PM, David Holmes wrote:
> Hi Charles,
> 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 (, 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>

> 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>

> Cheers,
> David Holmes

Trying to attach a plain diff file again and again....

Yours Charles

More information about the core-libs-dev mailing list