On Tue, 23 Dec 2025 07:33:14 GMT, Shawn M Emery <[email protected]> wrote:
>> Good idea. There is a `Linker.Option.captureCallState("errno")` feature and
>> I'll see how to use it.
>
> It looks like there has been prior work with this, at least with macos, e.g.:
> src/java.base/macosx/classes/jdk/internal/ffi/generated/errno/errno_h.java
Also, there is a class `jdk.internal.foreign.CaptureStateUtil` that can be used
to simplify and improve performance when working with `errno` and the likes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2667535314