Re: RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-24 Thread Alan Bateman
On 24/03/2016 12:15, Erik Joelsson wrote: New webrev with shorter lines in SocketOptionRegistry.java.template. http://cr.openjdk.java.net/~erikj/8152545/webrev.jdk.02/ This looks good. -Alan.

Re: RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-24 Thread Erik Joelsson
New webrev with shorter lines in SocketOptionRegistry.java.template. http://cr.openjdk.java.net/~erikj/8152545/webrev.jdk.02/ /Erik On 2016-03-24 12:57, Erik Joelsson wrote: On 2016-03-24 12:15, Alan Bateman wrote: On 23/03/2016 16:14, Erik Joelsson wrote: : On 2016-03-23 12:13, Erik Joe

Re: RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-24 Thread Erik Joelsson
On 2016-03-24 12:15, Alan Bateman wrote: On 23/03/2016 16:14, Erik Joelsson wrote: : On 2016-03-23 12:13, Erik Joelsson wrote: There are however 3 that, at least on Linux, are defined as an enum and not constants, which makes them unavailable to the preprocessor. These are: IPPROTO_TCP =

Re: RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-24 Thread Alan Bateman
On 23/03/2016 16:14, Erik Joelsson wrote: : On 2016-03-23 12:13, Erik Joelsson wrote: There are however 3 that, at least on Linux, are defined as an enum and not constants, which makes them unavailable to the preprocessor. These are: IPPROTO_TCP = 6 IPPROTO_IP = 0 IPPROTO_PV6 = 41 I would

Re: RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-23 Thread Erik Joelsson
(adding core-libs) On 2016-03-23 12:13, Erik Joelsson wrote: In the gensrc step for java.base, we generate a couple of java classes with the purpose of extracting native constants from the system. We currently do this by compiling a C program that when run, generates the java source file. The

RFR: JDK-8152545: Use preprocessor instead of compiling a program to generate native nio constants

2016-03-23 Thread Erik Joelsson
In the gensrc step for java.base, we generate a couple of java classes with the purpose of extracting native constants from the system. We currently do this by compiling a C program that when run, generates the java source file. The problem with this approach is that when cross compiling, we ca