On Fri, 2 Feb 2024 06:55:19 GMT, Magnus Ihse Bursie <i...@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.
>
> Magnus Ihse Bursie has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Add kludge to BufferedRenderPipe.c for AIX

make/modules/jdk.hotspot.agent/Lib.gmk line 31:

> 29: 
> 30: ifeq ($(call isTargetOs, linux), true)
> 31:   SA_CFLAGS := -D_FILE_OFFSET_BITS=64

We have two choices to feel a bit more comfortable:
1) We unconditionally `static_assert` in a few places for large `off_t`, or
2) We only do it for platforms we know definitely support F_O_B and aren't AIX 
(which we've handled separately).

Not sure that's strictly necessary though. Also, if something understands 
LARGEFILE*_SOURCE, then it probably understood F_O_B, or at least has some 
macro to control it. Just thinking aloud.

src/java.base/linux/native/libnio/ch/FileDispatcherImpl.c line 94:

> 92:         return IOS_UNSUPPORTED_CASE;
> 93: 
> 94:     loff_t offset = (loff_t)position;

Is this `loff_t` for the benefit of `copy_file_range`?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1475635336
PR Review Comment: https://git.openjdk.org/jdk/pull/17538#discussion_r1475636686

Reply via email to