RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]
Daniel Jeliński
djelinski at openjdk.org
Tue Sep 10 11:36:10 UTC 2024
On Fri, 9 Aug 2024 17:59:12 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> This proposed change would move the native objects required for NIO file interaction from the libnio native library to the libjava native library on Linux, macOS, and Windows.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8337143: Remove loading libnet from Inet6AddressImpl; delete commented out #include in Windows IOUtil.c
make/modules/java.base/Lib.gmk line 48:
> 46: OPTIMIZATION := LOW, \
> 47: EXTRA_HEADER_DIRS := \
> 48: libjava/nio/ch, \
This appears to be unneeded
make/modules/java.base/Lib.gmk line 81:
> 79: libjava/nio/ch \
> 80: libnio/ch \
> 81: libnio/fs \
libnio/fs is gone on all platforms other than aix; is this still necessary?
make/modules/java.base/lib/CoreLibraries.gmk line 71:
> 69: -framework Foundation \
> 70: -framework SystemConfiguration, \
> 71: LIBS_windows := advapi32.lib mswsock.lib ole32.lib shell32.lib version.lib ws2_32.lib, \
Can the libs added here be removed from libnio dependencies now? mswsock.lib appears to be unused by libnio, not sure about other platforms.
src/java.base/share/classes/sun/nio/ch/IOUtil.java line 575:
> 573: * Used to trigger loading of native libraries
> 574: */
> 575: public static void load() { }
do we still need this method?
src/java.base/unix/classes/sun/nio/ch/NativeThread.java line 2:
> 1: /*
> 2: * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
No changes in this file
src/java.base/unix/native/libnio/ch/NIOUtil.c line 34:
> 32: #include "jvm.h"
> 33: #include "jlong.h"
> 34: #include "sun_nio_ch_IOUtil.h"
should this be NIOUtil?
src/java.base/windows/classes/sun/nio/fs/WindowsNativeDispatcher.java line 1097:
> 1095:
> 1096: static {
> 1097: jdk.internal.loader.BootLoader.loadLibrary("net");
...do we still need net here?
src/java.base/windows/native/libnio/ch/NIOUtil.c line 41:
> 39:
> 40: JNIEXPORT jboolean JNICALL
> 41: Java_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed
unused
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751645238
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751648219
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751651925
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751744295
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751746774
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751766398
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751770939
PR Review Comment: https://git.openjdk.org/jdk/pull/20317#discussion_r1751774903
More information about the core-libs-dev
mailing list