RFR: 8324539: Do not use LFS64 symbols in JDK libs
Joachim Kern
jkern at openjdk.org
Mon Jan 29 14:14:47 UTC 2024
On Tue, 23 Jan 2024 15:42:55 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> Similar to [JDK-8318696](https://bugs.openjdk.org/browse/JDK-8318696), we should use -D_FILE_OFFSET_BITS=64, and not -D_LARGEFILE64_SOURCE in the JDK native libraries.
src/java.base/share/native/libjli/wildcard.c line 109:
> 107: #define readdir readdir64
> 108: #define closedir closedir64
> 109: #endif
You have to keep these defines for AIX, because _LARGE_FILES does not act on them, but instead of
`#if defined(_AIX)`
you could use
`#if defined(_AIX) && defined(_LARGE_FILES)`
src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c line 52:
> 50: #if defined(_AIX)
> 51: #include <sys/procfs.h>
> 52: #endif
same as above.
src/java.base/unix/native/libjava/UnixFileSystem_md.c line 64:
> 62: #define closedir closedir64
> 63: #define stat stat64
> 64: #endif
same as above
src/java.base/unix/native/libjava/childproc.c line 66:
> 64: #define opendir opendir64
> 65: #define readdir readdir64
> 66: #define closedir closedir64
Same as above
src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c line 179:
> 177: #define readdir readdir64
> 178: #define closedir closedir64
> 179: #endif
same as above
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1469639725
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1469642941
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1469644433
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1469645618
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1469649038
More information about the build-dev
mailing list