[11u] RFR: 8234591: [11u] Build with old C compiler broken by 8223490
Langer, Christoph
christoph.langer at sap.com
Thu Nov 21 23:44:30 UTC 2019
Yes, approved
/Christoph
> -----Original Message-----
> From: jdk-updates-dev <jdk-updates-dev-bounces at openjdk.java.net> On
> Behalf Of Doerr, Martin
> Sent: Donnerstag, 21. November 2019 16:54
> To: Hohensee, Paul <hohensee at amazon.com>; jdk-updates-
> dev at openjdk.java.net
> Subject: [CAUTION] RE: [11u] RFR: 8234591: [11u] Build with old C compiler
> broken by 8223490
>
> Hi Paul,
>
> thanks for the review. I'll push it tomorrow if there are no objections.
>
> Best regards,
> Martin
>
>
> > -----Original Message-----
> > From: Hohensee, Paul <hohensee at amazon.com>
> > Sent: Donnerstag, 21. November 2019 16:51
> > To: Doerr, Martin <martin.doerr at sap.com>; jdk-updates-
> > dev at openjdk.java.net
> > Subject: Re: [11u] RFR: 8234591: [11u] Build with old C compiler broken by
> > 8223490
> >
> > Good, and trivial.
> >
> > Thanks,
> > Paul
> >
> > On 11/21/19, 7:24 AM, "jdk-updates-dev on behalf of Doerr, Martin" <jdk-
> > updates-dev-bounces at openjdk.java.net on behalf of
> > martin.doerr at sap.com> wrote:
> >
> > Hi,
> >
> > I noticed that 11u-dev build with old C compilers broke by the backport
> > (see headline) today.
> > Such C compilers don't allow declarations in for loops:
> > TimeZone_md.c:139:9: error: 'for' loop initial declarations are only
> allowed
> > in C99 mode
> > for (unsigned int i = 0; i < sizeof (popularZones) / sizeof
> > (popularZones[0]); i++) {
> >
> > We can enable building with such compilers by this trivial fix:
> > diff -r 4b221bce9367 src/java.base/unix/native/libjava/TimeZone_md.c
> > --- a/src/java.base/unix/native/libjava/TimeZone_md.c Tue Nov 12
> > 16:13:16 2019 +0100
> > +++ b/src/java.base/unix/native/libjava/TimeZone_md.c Thu Nov 21
> > 16:21:22 2019 +0100
> > @@ -136,7 +136,8 @@
> >
> > if (strcmp(dir, ZONEINFO_DIR) == 0) {
> > /* fast path for 1st iteration */
> > - for (unsigned int i = 0; i < sizeof (popularZones) / sizeof
> > (popularZones[0]); i++) {
> > + unsigned int i;
> > + for (i = 0; i < sizeof (popularZones) / sizeof (popularZones[0]); i++) {
> > pathname = getPathName(dir, popularZones[i]);
> > if (pathname == NULL) {
> > continue;
> >
> > I'd like to fix it only in 11u.
> > Please review.
> >
> > Best regards,
> > Martin
> >
> >
More information about the jdk-updates-dev
mailing list