RFR: 8179887 - Build failure with glibc >= 2.24: error: 'int readdir_r(DIR*, dirent*, dirent**)' is deprecated
Andrew Hughes
gnu.andrew at redhat.com
Wed May 2 04:25:02 UTC 2018
On 26 April 2018 at 23:55, Kim Barrett <kim.barrett at oracle.com> wrote:
snip...
>
> I disagree, and still think the perfMemory_linux.cpp change should be
> removed.
>
> (1) The change to perfMemory_linux.cpp is entirely unnecessary to
> address the problem this bug is about.
>
> (2) It violates the (implied) protocol for os::readdir. If
> Linux-specific code wants to invoke Linux-specific behavior, it should
> do so by calling a Linux-specific API, not abuse an intended to be
> portable API.
>
> (3) It minorly interferes with some desirable future work. If there
> were some significant benefit to doing so, I wouldn't give this much
> weight, but I don't see a significant benefit.
>
> (4) The only benefit is saving some rare short-term memory
> allocations. I don't think that's worth the above costs.
>
> Note that the Windows version of os::readdir also ignores the second
> argument, but all callers provide it anyway.
>
> I've opened a new CR for general os::readdir cleanup.
> https://bugs.openjdk.java.net/browse/JDK-8202353
>
Ok, I see your points and don't feel particularly strongly either way.
The original version of this patch I wrote didn't include those changes either.
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Web Site: http://fuseyism.com
Twitter: https://twitter.com/gnu_andrew_java
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
More information about the build-dev
mailing list