RFR (XXS) 8173197: Change for 8172547 breaks builds with VS2010

Langer, Christoph christoph.langer at sap.com
Mon Jan 23 11:02:44 UTC 2017

Thanks, Alan, for the quick response.

We know that - however we have some builds which still run with VS2010 and as long as it is so simple to keep compatibility, I think we should try to maintain it.

Best regards

From: Alan Bateman [mailto:Alan.Bateman at oracle.com]
Sent: Montag, 23. Januar 2017 11:59
To: Langer, Christoph <christoph.langer at sap.com>; nio-dev at openjdk.java.net
Subject: Re: RFR (XXS) 8173197: Change for 8172547 breaks builds with VS2010

On 23/01/2017 10:54, Langer, Christoph wrote:

can I please get a review for the following trivial fix:

--- a/src/java.base/windows/native/libnio/ch/WindowsSelectorImpl.c      Mon Jan 23 10:35:30 2017 +0100
+++ b/src/java.base/windows/native/libnio/ch/WindowsSelectorImpl.c      Mon Jan 23 11:47:03 2017 +0100
@@ -75,8 +75,8 @@
     } else if (timeout < 0) {
        tv = NULL;
     } else {
+        jlong sec = timeout / 1000;
         tv = &timevalue;
-        jlong sec = timeout / 1000;
         // struct timeval members are signed 32-bit integers so the
         // signed 64-bit jlong needs to be clamped

The fix for 8172547 [1] introduces code that violates C98 standard and causes a compile error with Mircosoft VS 2010 because the variable declaration is not done at the beginning of its scope. I oversaw that myself when reviewing the change.

This looks okay although the oldest version of VisualStudio listed in the build README is VS2013.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170123/ffae1e5d/attachment-0001.html>

More information about the nio-dev mailing list