[Git][java-team/jnr-ffi][master] 13 commits: d/patches: drop no-ARM64 patch, dependency now packaged

Jérôme Charaoui (@lavamind) gitlab at salsa.debian.org
Thu Aug 27 05:52:44 BST 2026



Jérôme Charaoui pushed to branch master at Debian Java Maintainers / jnr-ffi


Commits:
c23c2290 by Jérôme Charaoui at 2026-08-26T21:25:05-04:00
d/patches: drop no-ARM64 patch, dependency now packaged

- - - - -
d2a67002 by Jérôme Charaoui at 2026-08-26T21:25:06-04:00
d/control: add libjnr-a64asm-java to build-deps

- - - - -
2ef0b9d5 by Jérôme Charaoui at 2026-08-26T21:25:07-04:00
lint

Gbp-Dch: ignore

- - - - -
780aa33c by Jérôme Charaoui at 2026-08-26T21:28:08-04:00
d/watch: update to v5 format

- - - - -
208a6dd3 by Jérôme Charaoui at 2026-08-26T21:29:29-04:00
New upstream version 2.3.1
- - - - -
3f6b163d by Jérôme Charaoui at 2026-08-26T21:29:31-04:00
Update upstream source from tag 'upstream/2.3.1'

Update to upstream version '2.3.1'
with Debian dir 0110744ef786c44ff8d3da0863b1503b4d742d94
- - - - -
44be5b66 by Jérôme Charaoui at 2026-08-26T21:29:56-04:00
d/control: build using headless jdk

- - - - -
4cda01db by Jérôme Charaoui at 2026-08-27T00:13:58-04:00
drop -doc package

- - - - -
a44c451d by Jérôme Charaoui at 2026-08-27T00:13:59-04:00
ignore unwanted maven release plugin

- - - - -
97bb43d7 by Jérôme Charaoui at 2026-08-27T04:14:09+00:00
Remove redundant Priority: optional from source stanza.

Changes-By: lintian-brush
Fixes: lintian: source: redundant-priority-optional-field
See-also: https://lintian.debian.org/tags/redundant-priority-optional-field.html

- - - - -
21b49607 by Jérôme Charaoui at 2026-08-27T04:14:09+00:00
Update standards version to 4.7.4, no changes needed.

Upgrade checklist verified:
 4.6.2 → 4.7.0:
  * Package does not use dpkg-divert
 4.7.0 → 4.7.1:
  * Package does not install to non-/usr paths
 4.7.3 → 4.7.4:
  * Package is not in non-free-firmware

Changes-By: lintian-brush
Fixes: lintian: source: ancient-standards-version 4.6.2 (released 2022-12-17) (current is 4.7.4.1)
See-also: https://lintian.debian.org/tags/ancient-standards-version.html

- - - - -
8dd72c1c by Jérôme Charaoui at 2026-08-27T04:14:09+00:00
Removed Rules-Requires-Root

Changes-By: lintian-brush
Fixes: lintian: source: redundant-rules-requires-root-no-field [debian/control]
See-also: https://lintian.debian.org/tags/redundant-rules-requires-root-no-field.html

- - - - -
fc6aed72 by Jérôme Charaoui at 2026-08-27T00:16:31-04:00
Update changelog for 2.3.1-1 release

- - - - -


24 changed files:

- .github/workflows/ci.yml
- − .travis.yml
- README.md
- debian/changelog
- debian/control
- − debian/libjnr-ffi-java-doc.javadoc
- debian/maven.ignoreRules
- debian/maven.rules
- − debian/patches/no-ARM64.patch
- − debian/patches/series
- debian/watch
- docs/FAQ.md
- pom.xml
- src/main/java/jnr/ffi/Pointer.java
- src/main/java/jnr/ffi/annotations/IgnoreError.java
- src/main/java/jnr/ffi/annotations/Out.java
- src/main/java/jnr/ffi/provider/jffi/platform/aarch64/freebsd/TypeAliases.java
- + src/main/java/jnr/ffi/provider/jffi/platform/aarch64/openbsd/TypeAliases.java
- src/main/java/jnr/ffi/provider/jffi/platform/i386/freebsd/TypeAliases.java
- src/main/java/jnr/ffi/provider/jffi/platform/i386/openbsd/TypeAliases.java
- src/main/java/jnr/ffi/provider/jffi/platform/ppc64/freebsd/TypeAliases.java
- + src/main/java/jnr/ffi/provider/jffi/platform/ppc64/openbsd/TypeAliases.java
- src/main/java/jnr/ffi/provider/jffi/platform/x86_64/freebsd/TypeAliases.java
- src/main/java/jnr/ffi/provider/jffi/platform/x86_64/openbsd/TypeAliases.java


Changes:

=====================================
.github/workflows/ci.yml
=====================================
@@ -17,47 +17,19 @@ jobs:
 
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-latest, [self-hosted, macos, aarch64]]
-        java-version: ['8', '11']
+        os: [ubuntu-latest, macos-latest]
+        java-test-version: ['8', '11', '17', '21', '25']
       fail-fast: false
 
     steps:
     - uses: actions/checkout at v2
-    - name: Cache dependencies
-      uses: actions/cache at v2
-      with:
-        path: ~/.m2
-        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
-        restore-keys: ${{ runner.os }}-m2
-    - name: Set up JDK ${{ matrix.java-version }}
-      uses: actions/setup-java at v1.4.3
-      with:
-        java-version: ${{ matrix.java-version }}
-    - name: Build with Maven
-      run: mvn -B package --file pom.xml
-
-  mvn-test-macos-aarch64:
-
-    runs-on: [self-hosted, macos, aarch64]
-
-    name: mvn test on Apple M1
-
-    strategy:
-      fail-fast: false
-
-    steps:
-    - uses: actions/checkout at v2
-    - name: Cache dependencies
-      uses: actions/cache at v2
-      with:
-        path: ~/.m2
-        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
-        restore-keys: ${{ runner.os }}-m2
-    - name: Set up JDK 11
-      uses: actions/setup-java at v2
+    - name: Set up JDK toolchains
+      uses: actions/setup-java at v5
       with:
+        java-version: |
+          ${{ matrix.java-test-version }}
+          17
+        cache: maven
         distribution: 'zulu'
-        java-version: 11
-        architecture: arm
     - name: Build with Maven
-      run: mvn -B package --file pom.xml
+      run: mvn -B package --file pom.xml -Djnr.test.toolchain=${{ matrix.java-test-version }}


=====================================
.travis.yml deleted
=====================================
@@ -1,20 +0,0 @@
-language: java
-notifications:
-  irc:
-    channels:
-      - "irc.freenode.org#jnr"
-    on_success: change
-    on_failure: always
-    template:
-      - "%{repository} (%{branch}:%{commit} by %{author}): %{message} (%{build_url})"
-matrix:
-  include:
-    - os: osx
-    - os: linux
-      jdk: oraclejdk8
-    - os: linux
-      jdk: openjdk7
-sudo: false
-cache:
-  directories:
-  - $HOME/.m2


=====================================
README.md
=====================================
@@ -50,6 +50,22 @@ public class HelloWorld {
 
 View more details in [our user documentation](./docs/README.md).
 
+## Releasing
+
+Deploy artifacts to Sonatype Central with the following command:
+
+```text
+mvn clean deploy
+```
+
+Deploy release artifacts to Maven Central by updating the release version to remove `-SNAPSHOT` and running the following command:
+
+```text
+mvn clean deploy -Prelease
+```
+
+Update the release version to the next snapshot after the release artifacts have been published.
+
 ## LICENSE
 
 ```


=====================================
debian/changelog
=====================================
@@ -1,11 +1,26 @@
-jnr-ffi (2.2.15-3) UNRELEASED; urgency=medium
+jnr-ffi (2.3.1-1) unstable; urgency=medium
 
+  * Team upload.
+
+  [Jérôme Charaoui]
+  * New upstream version 2.3.1
+  * drop -doc package
+  * d/control: add libjnr-a64asm-java to build-deps
+  * d/control: build using headless jdk
+  * d/patches: drop no-ARM64 patch, dependency now packaged
+  * d/watch: update to v5 format
+  * ignore unwanted maven release plugin
+  * Remove redundant Priority: optional from source stanza.
+  * Update standards version to 4.7.4, no changes needed.
+  * Removed Rules-Requires-Root
+
+  [Miguel Landaeta]
   * Run unit tests only on amd64. Other common architectures
     like arm64 are missing dependencies, i386 and others are not tested
     by upstream, so there is little point to exercise those unsupported
     and/or unreliable targets. (Closes: #1103089)
 
- -- Miguel Landaeta <nomadium at debian.org>  Thu, 01 May 2025 11:46:45 +0000
+ -- Jérôme Charaoui <jerome at riseup.net>  Thu, 27 Aug 2026 00:15:49 -0400
 
 jnr-ffi (2.2.15-2) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -1,28 +1,27 @@
 Source: jnr-ffi
 Section: java
-Priority: optional
 Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
 Uploaders: Tim Potter <tpot at hp.com>,
            Jakub Adam <jakub.adam at ktknet.cz>,
            Miguel Landaeta <nomadium at debian.org>
 Build-Depends: debhelper-compat (= 13),
-               default-jdk,
+               default-jdk-headless,
                javahelper,
                junit4,
                libasm-java (>= 5.0),
                libjffi-java (>= 1.2.7),
+               libjnr-a64asm-java,
                libjnr-x86asm-java (>= 1.0.2),
                libmaven-antrun-plugin-java,
                libmaven-bundle-plugin-java,
                libmaven-javadoc-plugin-java,
                libmaven-source-plugin-java,
                maven-debian-helper,
-               bnd (>= 2.1.0)
-Standards-Version: 4.6.2
+               bnd (>= 2.1.0),
+Standards-Version: 4.7.4
 Vcs-Git: https://salsa.debian.org/java-team/jnr-ffi.git
 Vcs-Browser: https://salsa.debian.org/java-team/jnr-ffi
 Homepage: https://github.com/jnr/jnr-ffi
-Rules-Requires-Root: no
 
 Package: libjnr-ffi-java
 Architecture: all
@@ -40,23 +39,3 @@ Description: Java library for loading native libraries without writing JNI code
  libraries implemented by the jffi package. jnr-ffi allows one to load
  native libraries without writing JNI code by hand, or using tools
  such as SWIG.
-
-Package: libjnr-ffi-java-doc
-Architecture: all
-Section: doc
-Depends: ${maven:DocDepends},
-         ${misc:Depends}
-Suggests: libjnr-ffi-java,
-          ${maven:DocOptionalDepends}
-Description: Documentation for libjnr-ffi-java
- Java Native Runtime (JNR) is a collection of Java libraries to make
- interfacing with OS-level features easier. JNR uses an alternate
- method to JNI or JNA to achieve programming simplicity while still
- retaining performance.
- .
- The jnr-ffi package is a set of abstractions that build on the lower-level
- libraries implemented by the jffi package. jnr-ffi allows one to load
- native libraries without writing JNI code by hand, or using tools
- such as SWIG.
- .
- This package contains the API documentation of jnr-ffi library.


=====================================
debian/libjnr-ffi-java-doc.javadoc deleted
=====================================
@@ -1 +0,0 @@
-target/site/apidocs usr/share/doc/libjnr-ffi-java/api


=====================================
debian/maven.ignoreRules
=====================================
@@ -3,4 +3,4 @@ com.github.jnr jffi jar * native *
 com.github.github site-maven-plugin * * * *
 org.apache.maven.plugins maven-gpg-plugin * * * *
 org.apache.maven.plugins maven-release-plugin * * * *
-com.github.jnr jnr-a64asm * * * *
+org.sonatype.central central-publishing-maven-plugin * * * *


=====================================
debian/maven.rules
=====================================
@@ -2,4 +2,5 @@
 junit junit jar s/3\..*/3.x/ * *
 junit junit jar s/4\..*/4.x/ * *
 com.github.jnr jffi * s/.*/debian/ * *
+com.github.jnr jnr-a64asm * s/.*/debian/ * *
 org.jruby.extras jnr-x86asm * s/.*/debian/ * *


=====================================
debian/patches/no-ARM64.patch deleted
=====================================
@@ -1,601 +0,0 @@
-From: Markus Koschany <apo at debian.org>
-Date: Fri, 22 Oct 2021 19:13:18 +0200
-Subject: no ARM64
-Forwarded: not-needed
-
----
- .../jnr/ffi/provider/jffi/ARM_64StubCompiler.java  | 345 ---------------------
- .../ffi/provider/jffi/AbstractA64StubCompiler.java | 181 -----------
- .../java/jnr/ffi/provider/jffi/StubCompiler.java   |  10 -
- .../jnr/ffi/provider/jffi/X86MethodGenerator.java  |   2 +-
- 4 files changed, 1 insertion(+), 537 deletions(-)
- delete mode 100644 src/main/java/jnr/ffi/provider/jffi/ARM_64StubCompiler.java
- delete mode 100644 src/main/java/jnr/ffi/provider/jffi/AbstractA64StubCompiler.java
-
-diff --git a/src/main/java/jnr/ffi/provider/jffi/ARM_64StubCompiler.java b/src/main/java/jnr/ffi/provider/jffi/ARM_64StubCompiler.java
-deleted file mode 100644
-index c09b4a0..0000000
---- a/src/main/java/jnr/ffi/provider/jffi/ARM_64StubCompiler.java
-+++ /dev/null
-@@ -1,345 +0,0 @@
--/*
-- * Copyright (C) 2008-2010 Wayne Meissner
-- *
-- * This file is part of the JNR project.
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package jnr.ffi.provider.jffi;
--
--import com.kenai.jffi.Function;
--import jnr.a64asm.Assembler_A64;
--import jnr.a64asm.CPU_A64;
--import jnr.a64asm.Immediate;
--import jnr.a64asm.Offset;
--import jnr.a64asm.Post_index;
--import jnr.a64asm.Pre_index;
--import jnr.a64asm.Register;
--import jnr.a64asm.Shift;
--import jnr.ffi.CallingConvention;
--import jnr.ffi.provider.ParameterType;
--import jnr.ffi.provider.ResultType;
--
--import static jnr.ffi.provider.jffi.CodegenUtils.sig;
--
--/**
-- * Compilers method trampoline stubs for x86_64
-- */
--final class ARM_64StubCompiler extends AbstractA64StubCompiler {
--
--    ARM_64StubCompiler(jnr.ffi.Runtime runtime) {
--        super(runtime);
--    }
--
--    boolean canCompile(ResultType returnType, ParameterType[] parameterTypes, CallingConvention convention) {
--
--        // There is only one calling convention; SYSV, so abort if someone tries to use stdcall
--        if (convention != CallingConvention.DEFAULT) {
--            return false;
--        }
--        switch (returnType.getNativeType()) {
--            case VOID:
--            case SCHAR:
--            case UCHAR:
--            case SSHORT:
--            case USHORT:
--            case SINT:
--            case UINT:
--            case SLONG:
--            case ULONG:
--            case SLONGLONG:
--            case ULONGLONG:
--            case FLOAT:
--            case DOUBLE:
--            case ADDRESS:
--                break;
--
--            default:
--                return false;
--        }
--
--        int fCount = 0;
--        int iCount = 0;
--
--        for (ParameterType t : parameterTypes) {
--            switch (t.getNativeType()) {
--                case SCHAR:
--                case UCHAR:
--                case SSHORT:
--                case USHORT:
--                case SINT:
--                case UINT:
--                case SLONG:
--                case ULONG:
--                case SLONGLONG:
--                case ULONGLONG:
--                case ADDRESS:
--                    ++iCount;
--                    break;
--
--                case FLOAT:
--                case DOUBLE:
--                    ++fCount;
--                    break;
--
--                default:
--                    // Fail on anything else
--                    return false;
--            }
--        }
--
--        // We can only safely compile methods with up to 6 integer and 8 floating point parameters
--        return iCount <= 6 && fCount <= 8;
--    }
--
--    static final Register[] srcRegisters32 = { Register.gpw(2), Register.gpw(3), Register.gpw(4), Register.gpw(5), Register.gpw(6), Register.gpw(7) };
--    static final Register[] srcRegisters64 = { Register.gpb(2), Register.gpb(3), Register.gpb(4), Register.gpb(5), Register.gpb(6), Register.gpb(7) };
--    static final Register[] dstRegisters32 = { Register.gpw(0), Register.gpw(1), Register.gpw(2), Register.gpw(3), Register.gpw(4),Register.gpw(5), Register.gpw(6), Register.gpw(7) };
--    static final Register[] dstRegisters64 = { Register.gpb(0), Register.gpb(1), Register.gpb(2), Register.gpb(3), Register.gpb(4),Register.gpb(5), Register.gpb(6), Register.gpb(7) };
--
--    @Override
--    final void compile(Function function, String name, ResultType resultType, ParameterType[] parameterTypes,
--                       Class resultClass, Class[] parameterClasses, CallingConvention convention, boolean saveErrno) {
--        Assembler_A64 a = new Assembler_A64(CPU_A64.A64);
--        int iCount = iCount(parameterTypes);
--        int fCount = fCount(parameterTypes);
--
--        //usage of sp and imm() from Asm.java creates problems; better use Register.gpb(31) and Immediate.imm()
--        Pre_index pindex = new Pre_index(Register.gpb(31),Immediate.imm(-32));
--        a.stp(Register.gpb(29),Register.gpb(30),pindex);
--        a.mov(Register.gpb(29),Register.gpb(31));
--        boolean canJumpToTarget = !saveErrno & iCount <= 6 & fCount <= 8;
--        switch (resultType.getNativeType()) {
--            case SINT:
--            case UINT:
--                canJumpToTarget &= int.class == resultClass;
--                break;
--
--            case SLONGLONG:
--            case ULONGLONG:
--                canJumpToTarget &= long.class == resultClass;
--                break;
--
--            case FLOAT:
--                canJumpToTarget &= float.class == resultClass;
--                break;
--
--            case DOUBLE:
--                canJumpToTarget &= double.class == resultClass;
--                break;
--
--            case VOID:
--                break;
--
--            default:
--                canJumpToTarget = false;
--                break;
--        }
--
--        // JNI functions all look like:
--        // foo(JNIEnv* env, jobject self, arg...)
--        // on AARCH64, those sit in X0-X7/W0-W7
--        // So we need to shuffle all the integer args up to over-write the
--        // env and self arguments
--
--        for (int i = 0; i < Math.min(iCount, 6); i++) {
--            switch (parameterTypes[i].getNativeType()) {
--                case SCHAR:
--                    a.sxtb(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                case UCHAR:
--                    a.uxtb(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                case SSHORT:
--                    a.sxth(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                case USHORT:
--                    a.uxth(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                case SINT:
--                    a.sxtw(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                case UINT:
--                    a.uxtw(srcRegisters64[i], srcRegisters32[i]);
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--
--                default:
--                    a.mov(dstRegisters64[i], srcRegisters64[i]);
--                    break;
--            }
--        }
--
--        if (iCount > 6) {
--            throw new IllegalArgumentException("integer argument count > 6");
--        }
--
--        // All the integer registers are loaded; there nothing to do for the floating
--        // registers, as the first 8 args are already in xmm0..xmm7, so just sanity check
--        if (fCount > 8) {
--            throw new IllegalArgumentException("float argument count > 8");
--        }
--
--        Offset offset = new Offset(Register.gpb(29),Immediate.imm(16));
--        long function_addr = function.getFunctionAddress();
--        short funn_addr_chunks = (short) (function_addr & 0x000000000000ffff);
--        Shift sh;
--        int count;
--        a.mov(Register.gpb(9),Immediate.imm(funn_addr_chunks));
--        for (count = 1; count < 4; count++){
--            sh = new Shift(1,16*(count));
--            funn_addr_chunks = (short) ((function_addr >> (16*count)) & 0x000000000000ffff);
--            a.movk(Register.gpb(9),Immediate.imm(funn_addr_chunks),sh);
--        }
--        a.blr(Register.gpb(9));
--        if (saveErrno) {
--            // Save the return on the stack
--            switch (resultType.getNativeType()) {
--                case VOID:
--                    // No need to save/reload return value registers
--                    break;
--                default:
--                    a.str(dstRegisters64[0], offset);
--                    break;
--            }
--
--            // Save the errno in a thread-local variable
--            function_addr = errnoFunctionAddress;
--            funn_addr_chunks = (short) (function_addr & 0x000000000000ffff);
--            a.mov(Register.gpb(9),Immediate.imm(funn_addr_chunks));
--            for (count = 1; count < 4; count++){
--                sh = new Shift(1, 16 * count);
--                funn_addr_chunks = (short) ((function_addr >> (16 * count)) & 0x000000000000ffff);
--                a.movk(Register.gpb(9),Immediate.imm(funn_addr_chunks),sh);
--            }
--            a.blr(Register.gpb(9));
--            // Retrieve return value and put it back in the appropriate return register
--            switch (resultType.getNativeType()) {
--                case VOID:
--                    // No need to save/reload return value registers
--                    break;
--
--                case SCHAR:
--                    a.ldrsb(dstRegisters64[0],offset);
--                    break;
--
--                case UCHAR:
--                    a.ldrb(dstRegisters64[0],offset);
--                    break;
--
--                case SSHORT:
--                    a.ldrsh(dstRegisters64[0],offset);
--                    break;
--
--                case USHORT:
--                    a.ldrh(dstRegisters64[0],offset);
--                    break;
--
--                case SINT:
--                    a.ldrsw(dstRegisters64[0],offset);
--                    break;
--
--                case UINT:
--                    a.ldr(dstRegisters64[0],offset);
--                    break;
--
--                default:
--                    a.ldr(dstRegisters64[0],offset);
--                    break;
--            }
--        } else {
--            // sign/zero extend the result
--
--            switch (resultType.getNativeType()) {
--                case SCHAR:
--                    a.sxtb(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--
--                case UCHAR:
--                    a.uxtb(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--
--                case SSHORT:
--                    a.sxth(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--
--                case USHORT:
--                    a.uxth(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--
--                case SINT:
--                    a.sxtw(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--
--                case UINT:
--                    a.uxtw(dstRegisters64[0], dstRegisters32[0]);
--                    break;
--            }
--        }
--
--        Post_index posindex = new Post_index(Register.gpb(31),Immediate.imm(32));
--        a.ldp(Register.gpb(29),Register.gpb(30),posindex );
--        a.ret((Register)null);
--        stubs_A64.add(new Stub(name, sig(resultClass, parameterClasses), a));
--    }
--
--    static int fCount(ParameterType[] parameterTypes) {
--        int fCount = 0;
--
--        for (ParameterType t : parameterTypes) {
--            switch (t.getNativeType()) {
--                case FLOAT:
--                case DOUBLE:
--                    ++fCount;
--                    break;
--            }
--        }
--
--        return fCount;
--    }
--
--    static int iCount(ParameterType[] parameterTypes) {
--        int iCount = 0;
--
--        for (ParameterType t : parameterTypes) {
--            switch (t.getNativeType()) {
--                case SCHAR:
--                case UCHAR:
--                case SSHORT:
--                case USHORT:
--                case SINT:
--                case UINT:
--                case SLONG:
--                case ULONG:
--                case SLONGLONG:
--                case ULONGLONG:
--                case ADDRESS:
--                    ++iCount;
--                    break;
--            }
--        }
--
--        return iCount;
--    }
--}
-\ No newline at end of file
-diff --git a/src/main/java/jnr/ffi/provider/jffi/AbstractA64StubCompiler.java b/src/main/java/jnr/ffi/provider/jffi/AbstractA64StubCompiler.java
-deleted file mode 100644
-index ff8f2ad..0000000
---- a/src/main/java/jnr/ffi/provider/jffi/AbstractA64StubCompiler.java
-+++ /dev/null
-@@ -1,181 +0,0 @@
--/*
-- * Copyright (C) 2008-2010 Wayne Meissner
-- *
-- * This file is part of the JNR project.
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- *    http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package jnr.ffi.provider.jffi;
--
--import com.kenai.jffi.MemoryIO;
--import com.kenai.jffi.NativeMethod;
--import com.kenai.jffi.NativeMethods;
--import com.kenai.jffi.PageManager;
--import jnr.a64asm.Assembler_A64;
--import jnr.ffi.Platform;
--import jnr.ffi.Runtime;
--
--import java.io.PrintStream;
--import java.nio.ByteBuffer;
--import java.nio.ByteOrder;
--import java.util.ArrayList;
--import java.util.Collections;
--import java.util.LinkedList;
--import java.util.List;
--import java.util.Map;
--import java.util.WeakHashMap;
--import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
--import java.util.logging.Level;
--import java.util.logging.Logger;
--
--/**
-- * Base class for most X86_32/X86_64 stub compilers
-- */
--abstract class AbstractA64StubCompiler extends StubCompiler {
--    public final static boolean DEBUG = Boolean.getBoolean("jnr.ffi.compile.dump");
--    private final jnr.ffi.Runtime runtime;
--
--    protected AbstractA64StubCompiler(jnr.ffi.Runtime runtime) {
--        this.runtime = runtime;
--    }
--
--    public final Runtime getRuntime() {
--        return runtime;
--    }
--
--    private static final class StaticDataHolder {
--        // Keep a reference from the loaded class to the pages holding the code for that class.
--        static final Map<Class, PageHolder> PAGES
--                = Collections.synchronizedMap(new WeakHashMap<Class, PageHolder>());
--    }
--    final List<Stub> stubs_A64 = new LinkedList<Stub>();
--
--
--    static final class Stub {
--        final String name;
--        final String signature;
--        final Assembler_A64 assembler;
--
--        public Stub(String name, String signature, Assembler_A64 assembler) {
--            this.name = name;
--            this.signature = signature;
--            this.assembler = assembler;
--        }
--    }
--
--    static final AtomicIntegerFieldUpdater<PageHolder> PAGE_HOLDER_UPDATER = AtomicIntegerFieldUpdater.newUpdater(PageHolder.class, "disposed");
--
--    static final class PageHolder {
--        final PageManager pm;
--        final long memory;
--        final long pageCount;
--        volatile int disposed;
--
--        public PageHolder(PageManager pm, long memory, long pageCount) {
--            this.pm = pm;
--            this.memory = memory;
--            this.pageCount = pageCount;
--        }
--
--        @Override
--        protected void finalize() throws Throwable {
--            try {
--                int disposed = PAGE_HOLDER_UPDATER.getAndSet(this, 1);
--                if (disposed == 0) {
--                    pm.freePages(memory, (int) pageCount);
--                }
--            } catch (Throwable t) {
--                Logger.getLogger(getClass().getName()).log(Level.WARNING,
--                    "Exception when freeing native pages: %s", t.getLocalizedMessage());
--            } finally {
--                super.finalize();
--            }
--        }
--
--    }
--
--    @Override
--    void attach(Class clazz) {
--
--        if (stubs_A64.isEmpty()) {
--            return;
--        }
--
--        long codeSize = 0;
--        for (Stub stub : stubs_A64) {
--            // add 8 bytes for alignment
--            codeSize += stub.assembler.codeSize() + 8;
--        }
--
--        PageManager pm = PageManager.getInstance();
--
--        long npages = (codeSize + pm.pageSize() - 1) / pm.pageSize();
--        // Allocate some native memory for it
--        long code = pm.allocatePages((int) npages, PageManager.PROT_READ | PageManager.PROT_WRITE);
--        if (code == 0) {
--            throw new OutOfMemoryError("allocatePages failed for codeSize=" + codeSize);
--        }
--        PageHolder page = new PageHolder(pm, code, npages);
--
--        // Now relocate/copy all the assembler stubs into the real code area
--        List<NativeMethod> methods = new ArrayList<NativeMethod>(stubs_A64.size());
--        long fn = code;
--        PrintStream dbg = System.err;
--        System.out.flush(); System.err.flush();
--
--        for (Stub stub : stubs_A64) {
--            Assembler_A64 asm = stub.assembler;
--            // align the start of all functions on a 8 byte boundary
--            fn = align(fn, 8);
--            ByteBuffer buf = ByteBuffer.allocate(asm.codeSize()).order(ByteOrder.LITTLE_ENDIAN);
--            stub.assembler.relocCode(buf, fn);
--            buf.flip();
--            MemoryIO.getInstance().putByteArray(fn, buf.array(), buf.arrayOffset(), buf.limit());
--
--            if (DEBUG && X86Disassembler.isAvailable()) {
--
--                dbg.println(clazz.getName() + "." + stub.name + " " + stub.signature);
--                X86Disassembler disassembler = X86Disassembler.create();
--                disassembler.setMode(Platform.getNativePlatform().getCPU() == Platform.CPU.I386
--                        ? X86Disassembler.Mode.I386 : X86Disassembler.Mode.X86_64);
--                disassembler.setSyntax(X86Disassembler.Syntax.INTEL);
--                disassembler.setInputBuffer(MemoryUtil.newPointer(runtime, fn), asm.offset());
--                while (disassembler.disassemble()) {
--                    dbg.printf("%8x: %s\n", disassembler.offset(), disassembler.insn());
--                }
--                if (buf.remaining() > asm.offset()) {
--                    // libudis86 for some reason cannot understand the code asmjit emits for the trampolines
--                    dbg.printf("%8x: <indirect call trampolines>\n", asm.offset());
--                }
--                dbg.println();
--            }
--            methods.add(new NativeMethod(fn, stub.name, stub.signature));
--
--            fn += asm.codeSize();
--        }
--
--        pm.protectPages(code, (int) npages, PageManager.PROT_READ | PageManager.PROT_EXEC);
--
--        NativeMethods.register(clazz, methods);
--        StaticDataHolder.PAGES.put(clazz, page);
--    }
--
--    static int align(int offset, int align) {
--        return (offset + align - 1) & ~(align - 1);
--    }
--
--    static long align(long offset, long align) {
--        return (offset + align - 1) & ~(align - 1);
--    }
--}
-diff --git a/src/main/java/jnr/ffi/provider/jffi/StubCompiler.java b/src/main/java/jnr/ffi/provider/jffi/StubCompiler.java
-index 28bb27b..30acf6d 100644
---- a/src/main/java/jnr/ffi/provider/jffi/StubCompiler.java
-+++ b/src/main/java/jnr/ffi/provider/jffi/StubCompiler.java
-@@ -22,8 +22,6 @@ import com.kenai.jffi.Function;
- import com.kenai.jffi.Internals;
- import com.kenai.jffi.PageManager;
- import com.kenai.jffi.Platform;
--import jnr.a64asm.Assembler_A64;
--import jnr.a64asm.CPU_A64;
- import jnr.ffi.CallingConvention;
- import jnr.ffi.provider.ParameterType;
- import jnr.ffi.provider.ResultType;
-@@ -53,11 +51,6 @@ abstract class StubCompiler {
-                         return new X86_64StubCompiler(runtime);    //currently supporting only A64
-                     }
-                     break;
--                case AARCH64:
--                    if (Platform.getPlatform().getOS() != Platform.OS.WINDOWS) {
--                        return new ARM_64StubCompiler(runtime);
--                    }
--                    break;
-             }
-         }
- 
-@@ -119,9 +112,6 @@ abstract class StubCompiler {
-                 case X86_64:
-                     new Assembler(CPU.X86_64);
-                     return true;
--                case AARCH64:
--                    new Assembler_A64(CPU_A64.A64);
--                    return true;
-                 default:
-                     return false;
-             }
-diff --git a/src/main/java/jnr/ffi/provider/jffi/X86MethodGenerator.java b/src/main/java/jnr/ffi/provider/jffi/X86MethodGenerator.java
-index 3a4cc4e..acada91 100644
---- a/src/main/java/jnr/ffi/provider/jffi/X86MethodGenerator.java
-+++ b/src/main/java/jnr/ffi/provider/jffi/X86MethodGenerator.java
-@@ -73,7 +73,7 @@ class X86MethodGenerator implements MethodGenerator {
-             return false;
-         }
- 
--        if (!platform.getCPU().equals(Platform.CPU.I386) && !platform.getCPU().equals(Platform.CPU.X86_64) && !platform.getCPU().equals(Platform.CPU.AARCH64)) {
-+        if (!platform.getCPU().equals(Platform.CPU.I386) && !platform.getCPU().equals(Platform.CPU.X86_64)) {
-             return false;
-         }
- 


=====================================
debian/patches/series deleted
=====================================
@@ -1 +0,0 @@
-no-ARM64.patch


=====================================
debian/watch
=====================================
@@ -1,3 +1,5 @@
-version=4
-https://github.com/jnr/jnr-ffi/tags \
- /jnr/@PACKAGE@/archive/refs/tags/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
+Version: 5
+Template: GitHub
+Owner: jnr
+Project: jnr-ffi
+Version-Type: SEMANTIC_VERSION


=====================================
docs/FAQ.md
=====================================
@@ -52,5 +52,13 @@ Before sending a pull request, please file an issue ([see the previous section](
 with the details of what you have changed or are going to change. This way, your time is not wasted if the change does
 not meet our goals, and we can discuss the changes in depth within the issue.
 
+## Why am I getting EINVAL for a pointer passed to native (e.g. getsockopt's len pointer)
+
+Length pointers passed to native functions are often read and also written back by the function to indicate how much
+data was actually returned. If you specify only @In OR @Out the native memory allocated for the pointer may not be
+set up correctly for two-way synchronization. Remove the annotation or specify both (which is the default when neither
+are specified.
+
+
 If you are adding new functionality, ensure that you add unit tests that will test the behavior of your new code and, if
-it is a public API, add descriptive javadoc comments for the new code.
\ No newline at end of file
+it is a public API, add descriptive javadoc comments for the new code.


=====================================
pom.xml
=====================================
@@ -1,15 +1,16 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
+
   <parent>
-    <groupId>org.sonatype.oss</groupId>
-    <artifactId>oss-parent</artifactId>
-    <version>7</version>
+    <groupId>com.github.jnr</groupId>
+    <artifactId>jnr-parent</artifactId>
+    <version>0.0.1</version>
+    <relativePath/>
   </parent>
 
-  <groupId>com.github.jnr</groupId>
   <artifactId>jnr-ffi</artifactId>
   <packaging>jar</packaging>
-  <version>2.2.15</version>
+  <version>2.3.1</version>
   <name>jnr-ffi</name>
   <description>A library for invoking native functions from java</description>
   <url>http://github.com/jnr/jnr-ffi</url>
@@ -43,11 +44,9 @@
   </developers>
 
   <properties>
-    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>8</maven.compiler.source>
-    <maven.compiler.target>8</maven.compiler.target>
     <github.global.server>github</github.global.server>
-    <asm.version>9.2</asm.version>
+    <asm.version>9.10.1</asm.version>
+    <junit.version>5.14.4</junit.version>
     <make>make</make>
   </properties>
 
@@ -55,19 +54,19 @@
     <dependency>
       <groupId>org.junit.jupiter</groupId>
       <artifactId>junit-jupiter-engine</artifactId>
-      <version>5.7.2</version>
+      <version>${junit.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>com.github.jnr</groupId>
       <artifactId>jffi</artifactId>
-      <version>1.3.12</version>
+      <version>1.4.0</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>com.github.jnr</groupId>
       <artifactId>jffi</artifactId>
-      <version>1.3.12</version>
+      <version>1.4.0</version>
       <scope>runtime</scope>
       <classifier>native</classifier>
     </dependency>
@@ -116,11 +115,6 @@
   </dependencies>
   <build>
     <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>3.8.1</version>
-      </plugin>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <version>1.1</version>
@@ -142,25 +136,6 @@
           </execution>
         </executions>
       </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.7</version>
-        <configuration>
-          <instructions>
-            <_nouses>true</_nouses>
-          </instructions>
-        </configuration>
-        <executions>
-          <execution>
-            <id>bundle-manifest</id>
-            <phase>process-classes</phase>
-            <goals>
-              <goal>manifest</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
@@ -175,9 +150,7 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.22.2</version>
         <configuration>
           <forkCount>1</forkCount>
           <reuseForks>false</reuseForks>
@@ -247,18 +220,33 @@
           </execution>
         </executions>
       </plugin>
-      <!--
       <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>nexus-staging-maven-plugin</artifactId>
-        <version>1.4.4</version>
+        <groupId>org.sonatype.central</groupId>
+        <artifactId>central-publishing-maven-plugin</artifactId>
+        <version>0.7.0</version>
         <extensions>true</extensions>
         <configuration>
-          <serverId>sonatype-nexus-staging</serverId>
-          <nexusUrl>https://oss.sonatype.org</nexusUrl>
+          <publishingServerId>central</publishingServerId>
         </configuration>
       </plugin>
-      -->
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <_nouses>true</_nouses>
+          </instructions>
+        </configuration>
+        <executions>
+          <execution>
+            <id>bundle-manifest</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>manifest</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
   <profiles>
@@ -287,48 +275,21 @@
       </properties>
     </profile>
     <profile>
-      <id>release-sign-artifacts</id>
-      <activation>
-        <property>
-          <name>performRelease</name>
-          <value>true</value>
-        </property>
-      </activation>
+      <id>release</id>
       <build>
         <plugins>
           <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-gpg-plugin</artifactId>
-            <version>1.4</version>
-            <executions>
-              <execution>
-                <id>sign-artifacts</id>
-                <phase>verify</phase>
-                <goals>
-                  <goal>sign</goal>
-                </goals>
-              </execution>
-            </executions>
           </plugin>
         </plugins>
       </build>
     </profile>
-    <profile>
-      <id>java9</id>
-      <activation>
-        <jdk>[9,)</jdk>
-      </activation>
-      <properties>
-        <maven.compiler.release>8</maven.compiler.release>
-      </properties>
-    </profile>
   </profiles>
   <reporting>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.8</version>
         <configuration>
           <excludePackageNames>jnr.ffi.provider:jnr.ffi.util</excludePackageNames>
         </configuration>


=====================================
src/main/java/jnr/ffi/Pointer.java
=====================================
@@ -411,7 +411,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, byte[] src, int idx, int len);
@@ -437,7 +437,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, short[] src, int idx, int len);
@@ -463,7 +463,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, int[] src, int idx, int len);
@@ -489,7 +489,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, long[] src, int idx, int len);
@@ -515,7 +515,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, float[] src, int idx, int len);
@@ -541,7 +541,7 @@ abstract public class Pointer {
      *
      * @param offset the offset from the start of the memory this {@code Pointer} represents at which the first value will be written.
      * @param src the array to get values from.
-     * @param idx the start index in the {@code dst} array to begin reading values.
+     * @param idx the start index in the {@code src} array to begin reading values.
      * @param len the number of values to be written.
      */
     abstract public void put(long offset, double[] src, int idx, int len);


=====================================
src/main/java/jnr/ffi/annotations/IgnoreError.java
=====================================
@@ -37,7 +37,7 @@ import java.util.Map;
  * function call - even for the ones that succeed.  This can have a significant
  * performance impact, so for those functions which either don't fail, or for which
  * the errno value can be ignored, can be annotated with {@code @IgnoreError} to
- * avoid unneccessary saving of the errno value.
+ * avoid unnecessary saving of the errno value.
  *
  * @see SaveError
  * @see LibraryLoader#saveError(Map, boolean, boolean)


=====================================
src/main/java/jnr/ffi/annotations/Out.java
=====================================
@@ -36,7 +36,7 @@ import java.lang.annotation.Target;
  * <p>As this extra copying can be expensive, for native functions which only
  * write to the passed in memory block and do not use the existing contents, 
  * parameters can be annotated with {@code @Out} so there is only copied {@code OUT} 
- * from native memory to java memory after the call, and the unneccessary copy {@code IN}
+ * from native memory to java memory after the call, and the unnecessary copy {@code IN}
  * from java to native memory before the call can be avoided.
  *
  * <p>Parameters with neither a {@code @In} nor a {@code @Out} annotation will copy both ways.


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/aarch64/freebsd/TypeAliases.java
=====================================
@@ -34,25 +34,25 @@ public final class TypeAliases {
         m.put(TypeAlias.u_int16_t, NativeType.USHORT);
         m.put(TypeAlias.int32_t, NativeType.SINT);
         m.put(TypeAlias.u_int32_t, NativeType.UINT);
-        m.put(TypeAlias.int64_t, NativeType.SLONGLONG);
-        m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.int64_t, NativeType.SLONG);
+        m.put(TypeAlias.u_int64_t, NativeType.ULONG);
         m.put(TypeAlias.intptr_t, NativeType.SLONG);
         m.put(TypeAlias.uintptr_t, NativeType.ULONG);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
-        m.put(TypeAlias.dev_t, NativeType.SINT);
+        m.put(TypeAlias.dev_t, NativeType.ULONG);
         m.put(TypeAlias.blkcnt_t, NativeType.SLONG);
-        m.put(TypeAlias.blksize_t, NativeType.SLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
-        m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.ino_t, NativeType.ULONG);
+        m.put(TypeAlias.ino64_t, NativeType.ULONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
-        m.put(TypeAlias.mode_t, NativeType.UINT);
-        m.put(TypeAlias.nlink_t, NativeType.UINT);
-        m.put(TypeAlias.id_t, NativeType.UINT);
+        m.put(TypeAlias.mode_t, NativeType.USHORT);
+        m.put(TypeAlias.nlink_t, NativeType.ULONG);
+        m.put(TypeAlias.id_t, NativeType.SLONG);
         m.put(TypeAlias.pid_t, NativeType.SINT);
-        m.put(TypeAlias.off_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.off_t, NativeType.SLONG);
         m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
         m.put(TypeAlias.clock_t, NativeType.SINT);
@@ -63,7 +63,7 @@ public final class TypeAliases {
         m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);
         m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
         m.put(TypeAlias.socklen_t, NativeType.UINT);
-        m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.rlim_t, NativeType.SLONG);
         m.put(TypeAlias.cc_t, NativeType.UCHAR);
         m.put(TypeAlias.speed_t, NativeType.UINT);
         m.put(TypeAlias.tcflag_t, NativeType.UINT);


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/aarch64/openbsd/TypeAliases.java
=====================================
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2012 Wayne Meissner
+ *
+ * This file is part of the JNR project.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jnr.ffi.provider.jffi.platform.aarch64.openbsd;
+
+import jnr.ffi.NativeType;
+import jnr.ffi.TypeAlias;
+
+import java.util.EnumMap;
+import java.util.Map;
+
+public final class TypeAliases {
+    public static final Map<TypeAlias, jnr.ffi.NativeType> ALIASES = buildTypeMap();
+    private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {
+        Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);
+        m.put(TypeAlias.int8_t, NativeType.SCHAR);
+        m.put(TypeAlias.u_int8_t, NativeType.UCHAR);
+        m.put(TypeAlias.int16_t, NativeType.SSHORT);
+        m.put(TypeAlias.u_int16_t, NativeType.USHORT);
+        m.put(TypeAlias.int32_t, NativeType.SINT);
+        m.put(TypeAlias.u_int32_t, NativeType.UINT);
+        m.put(TypeAlias.int64_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.intptr_t, NativeType.SLONG);
+        m.put(TypeAlias.uintptr_t, NativeType.ULONG);
+        m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
+        m.put(TypeAlias.dev_t, NativeType.SINT);
+        m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
+        m.put(TypeAlias.gid_t, NativeType.UINT);
+        m.put(TypeAlias.in_addr_t, NativeType.UINT);
+        m.put(TypeAlias.in_port_t, NativeType.USHORT);
+        m.put(TypeAlias.ino_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.key_t, NativeType.SLONG);
+        m.put(TypeAlias.mode_t, NativeType.UINT);
+        m.put(TypeAlias.nlink_t, NativeType.UINT);
+        m.put(TypeAlias.id_t, NativeType.UINT);
+        m.put(TypeAlias.pid_t, NativeType.SINT);
+        m.put(TypeAlias.off_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.swblk_t, NativeType.SINT);
+        m.put(TypeAlias.uid_t, NativeType.UINT);
+        m.put(TypeAlias.clock_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.size_t, NativeType.ULONG);
+        m.put(TypeAlias.ssize_t, NativeType.SLONG);
+        m.put(TypeAlias.time_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
+        m.put(TypeAlias.socklen_t, NativeType.UINT);
+        m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.cc_t, NativeType.UCHAR);
+        m.put(TypeAlias.speed_t, NativeType.UINT);
+        m.put(TypeAlias.tcflag_t, NativeType.UINT);
+        return m;
+    }
+}


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/i386/freebsd/TypeAliases.java
=====================================
@@ -39,21 +39,21 @@ public final class TypeAliases {
         m.put(TypeAlias.intptr_t, NativeType.SINT);
         m.put(TypeAlias.uintptr_t, NativeType.UINT);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
-        m.put(TypeAlias.dev_t, NativeType.UINT);
+        m.put(TypeAlias.dev_t, NativeType.ULONGLONG);
         m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);
-        m.put(TypeAlias.blksize_t, NativeType.UINT);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
+        m.put(TypeAlias.ino_t, NativeType.ULONGLONG);
         m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
         m.put(TypeAlias.mode_t, NativeType.USHORT);
-        m.put(TypeAlias.nlink_t, NativeType.USHORT);
+        m.put(TypeAlias.nlink_t, NativeType.ULONGLONG);
         m.put(TypeAlias.id_t, NativeType.SLONGLONG);
         m.put(TypeAlias.pid_t, NativeType.SINT);
         m.put(TypeAlias.off_t, NativeType.SLONGLONG);
-        m.put(TypeAlias.swblk_t, NativeType.SLONG);
+        m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
         m.put(TypeAlias.clock_t, NativeType.ULONG);
         m.put(TypeAlias.size_t, NativeType.UINT);


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/i386/openbsd/TypeAliases.java
=====================================
@@ -40,12 +40,12 @@ public final class TypeAliases {
         m.put(TypeAlias.uintptr_t, NativeType.ULONG);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
         m.put(TypeAlias.dev_t, NativeType.SINT);
-        m.put(TypeAlias.blkcnt_t, NativeType.SLONG);
-        m.put(TypeAlias.blksize_t, NativeType.SLONG);
+        m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
+        m.put(TypeAlias.ino_t, NativeType.ULONGLONG);
         m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
         m.put(TypeAlias.mode_t, NativeType.UINT);
@@ -55,12 +55,12 @@ public final class TypeAliases {
         m.put(TypeAlias.off_t, NativeType.SLONGLONG);
         m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
-        m.put(TypeAlias.clock_t, NativeType.SINT);
+        m.put(TypeAlias.clock_t, NativeType.SLONGLONG);
         m.put(TypeAlias.size_t, NativeType.ULONG);
         m.put(TypeAlias.ssize_t, NativeType.SLONG);
-        m.put(TypeAlias.time_t, NativeType.SINT);
-        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);
-        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);
+        m.put(TypeAlias.time_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);
         m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
         m.put(TypeAlias.socklen_t, NativeType.UINT);
         m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/ppc64/freebsd/TypeAliases.java
=====================================
@@ -35,36 +35,36 @@ public final class TypeAliases {
         m.put(TypeAlias.u_int16_t, NativeType.USHORT);
         m.put(TypeAlias.int32_t, NativeType.SINT);
         m.put(TypeAlias.u_int32_t, NativeType.UINT);
-        m.put(TypeAlias.int64_t, NativeType.SLONGLONG);
-        m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.int64_t, NativeType.SLONG);
+        m.put(TypeAlias.u_int64_t, NativeType.ULONG);
         m.put(TypeAlias.intptr_t, NativeType.SLONG);
         m.put(TypeAlias.uintptr_t, NativeType.ULONG);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
-        m.put(TypeAlias.dev_t, NativeType.SINT);
+        m.put(TypeAlias.dev_t, NativeType.ULONG);
         m.put(TypeAlias.blkcnt_t, NativeType.SLONG);
-        m.put(TypeAlias.blksize_t, NativeType.SLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
-        m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.ino_t, NativeType.ULONG);
+        m.put(TypeAlias.ino64_t, NativeType.ULONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
-        m.put(TypeAlias.mode_t, NativeType.UINT);
-        m.put(TypeAlias.nlink_t, NativeType.UINT);
-        m.put(TypeAlias.id_t, NativeType.UINT);
+        m.put(TypeAlias.mode_t, NativeType.USHORT);
+        m.put(TypeAlias.nlink_t, NativeType.ULONG);
+        m.put(TypeAlias.id_t, NativeType.SLONG);
         m.put(TypeAlias.pid_t, NativeType.SINT);
-        m.put(TypeAlias.off_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.off_t, NativeType.SLONG);
         m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
-        m.put(TypeAlias.clock_t, NativeType.SINT);
+        m.put(TypeAlias.clock_t, NativeType.UINT);
         m.put(TypeAlias.size_t, NativeType.ULONG);
         m.put(TypeAlias.ssize_t, NativeType.SLONG);
-        m.put(TypeAlias.time_t, NativeType.SINT);
+        m.put(TypeAlias.time_t, NativeType.SLONG);
         m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);
         m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);
         m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
         m.put(TypeAlias.socklen_t, NativeType.UINT);
-        m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.rlim_t, NativeType.SLONG);
         m.put(TypeAlias.cc_t, NativeType.UCHAR);
         m.put(TypeAlias.speed_t, NativeType.UINT);
         m.put(TypeAlias.tcflag_t, NativeType.UINT);


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/ppc64/openbsd/TypeAliases.java
=====================================
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 Wayne Meissner
+ * Copyright (C) 2021 Justin Hibbits
+ *
+ * This file is part of the JNR project.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package jnr.ffi.provider.jffi.platform.ppc64.openbsd;
+
+import jnr.ffi.NativeType;
+import jnr.ffi.TypeAlias;
+
+import java.util.EnumMap;
+import java.util.Map;
+
+public final class TypeAliases {
+    public static final Map<TypeAlias, jnr.ffi.NativeType> ALIASES = buildTypeMap();
+    private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {
+        Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);
+        m.put(TypeAlias.int8_t, NativeType.SCHAR);
+        m.put(TypeAlias.u_int8_t, NativeType.UCHAR);
+        m.put(TypeAlias.int16_t, NativeType.SSHORT);
+        m.put(TypeAlias.u_int16_t, NativeType.USHORT);
+        m.put(TypeAlias.int32_t, NativeType.SINT);
+        m.put(TypeAlias.u_int32_t, NativeType.UINT);
+        m.put(TypeAlias.int64_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.intptr_t, NativeType.SLONG);
+        m.put(TypeAlias.uintptr_t, NativeType.ULONG);
+        m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
+        m.put(TypeAlias.dev_t, NativeType.SINT);
+        m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
+        m.put(TypeAlias.gid_t, NativeType.UINT);
+        m.put(TypeAlias.in_addr_t, NativeType.UINT);
+        m.put(TypeAlias.in_port_t, NativeType.USHORT);
+        m.put(TypeAlias.ino_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.key_t, NativeType.SLONG);
+        m.put(TypeAlias.mode_t, NativeType.UINT);
+        m.put(TypeAlias.nlink_t, NativeType.UINT);
+        m.put(TypeAlias.id_t, NativeType.UINT);
+        m.put(TypeAlias.pid_t, NativeType.SINT);
+        m.put(TypeAlias.off_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.swblk_t, NativeType.SINT);
+        m.put(TypeAlias.uid_t, NativeType.UINT);
+        m.put(TypeAlias.clock_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.size_t, NativeType.ULONG);
+        m.put(TypeAlias.ssize_t, NativeType.SLONG);
+        m.put(TypeAlias.time_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
+        m.put(TypeAlias.socklen_t, NativeType.UINT);
+        m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.cc_t, NativeType.UCHAR);
+        m.put(TypeAlias.speed_t, NativeType.UINT);
+        m.put(TypeAlias.tcflag_t, NativeType.UINT);
+        return m;
+    }
+}


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/x86_64/freebsd/TypeAliases.java
=====================================
@@ -34,36 +34,36 @@ public final class TypeAliases {
         m.put(TypeAlias.u_int16_t, NativeType.USHORT);
         m.put(TypeAlias.int32_t, NativeType.SINT);
         m.put(TypeAlias.u_int32_t, NativeType.UINT);
-        m.put(TypeAlias.int64_t, NativeType.SLONGLONG);
-        m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.int64_t, NativeType.SLONG);
+        m.put(TypeAlias.u_int64_t, NativeType.ULONG);
         m.put(TypeAlias.intptr_t, NativeType.SLONG);
         m.put(TypeAlias.uintptr_t, NativeType.ULONG);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
-        m.put(TypeAlias.dev_t, NativeType.SINT);
+        m.put(TypeAlias.dev_t, NativeType.ULONG);
         m.put(TypeAlias.blkcnt_t, NativeType.SLONG);
-        m.put(TypeAlias.blksize_t, NativeType.SLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
-        m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.ino_t, NativeType.ULONG);
+        m.put(TypeAlias.ino64_t, NativeType.ULONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
-        m.put(TypeAlias.mode_t, NativeType.UINT);
-        m.put(TypeAlias.nlink_t, NativeType.UINT);
-        m.put(TypeAlias.id_t, NativeType.UINT);
+        m.put(TypeAlias.mode_t, NativeType.USHORT);
+        m.put(TypeAlias.nlink_t, NativeType.ULONG);
+        m.put(TypeAlias.id_t, NativeType.SLONG);
         m.put(TypeAlias.pid_t, NativeType.SINT);
-        m.put(TypeAlias.off_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.off_t, NativeType.SLONG);
         m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
         m.put(TypeAlias.clock_t, NativeType.SINT);
         m.put(TypeAlias.size_t, NativeType.ULONG);
         m.put(TypeAlias.ssize_t, NativeType.SLONG);
-        m.put(TypeAlias.time_t, NativeType.SINT);
+        m.put(TypeAlias.time_t, NativeType.SLONG);
         m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);
         m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);
         m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
         m.put(TypeAlias.socklen_t, NativeType.UINT);
-        m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.rlim_t, NativeType.SLONG);
         m.put(TypeAlias.cc_t, NativeType.UCHAR);
         m.put(TypeAlias.speed_t, NativeType.UINT);
         m.put(TypeAlias.tcflag_t, NativeType.UINT);


=====================================
src/main/java/jnr/ffi/provider/jffi/platform/x86_64/openbsd/TypeAliases.java
=====================================
@@ -40,12 +40,12 @@ public final class TypeAliases {
         m.put(TypeAlias.uintptr_t, NativeType.ULONG);
         m.put(TypeAlias.caddr_t, NativeType.ADDRESS);
         m.put(TypeAlias.dev_t, NativeType.SINT);
-        m.put(TypeAlias.blkcnt_t, NativeType.SLONG);
-        m.put(TypeAlias.blksize_t, NativeType.SLONG);
+        m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.blksize_t, NativeType.SINT);
         m.put(TypeAlias.gid_t, NativeType.UINT);
         m.put(TypeAlias.in_addr_t, NativeType.UINT);
         m.put(TypeAlias.in_port_t, NativeType.USHORT);
-        m.put(TypeAlias.ino_t, NativeType.UINT);
+        m.put(TypeAlias.ino_t, NativeType.ULONGLONG);
         m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);
         m.put(TypeAlias.key_t, NativeType.SLONG);
         m.put(TypeAlias.mode_t, NativeType.UINT);
@@ -55,12 +55,12 @@ public final class TypeAliases {
         m.put(TypeAlias.off_t, NativeType.SLONGLONG);
         m.put(TypeAlias.swblk_t, NativeType.SINT);
         m.put(TypeAlias.uid_t, NativeType.UINT);
-        m.put(TypeAlias.clock_t, NativeType.SINT);
+        m.put(TypeAlias.clock_t, NativeType.SLONGLONG);
         m.put(TypeAlias.size_t, NativeType.ULONG);
         m.put(TypeAlias.ssize_t, NativeType.SLONG);
-        m.put(TypeAlias.time_t, NativeType.SINT);
-        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONG);
-        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONG);
+        m.put(TypeAlias.time_t, NativeType.SLONGLONG);
+        m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);
+        m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);
         m.put(TypeAlias.sa_family_t, NativeType.UCHAR);
         m.put(TypeAlias.socklen_t, NativeType.UINT);
         m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);



View it on GitLab: https://salsa.debian.org/java-team/jnr-ffi/-/compare/8249042d90b97aaaf4c9cc37c6dfa23109088886...fc6aed72158e6abdbc70916e5c6060d00dbed040

-- 
View it on GitLab: https://salsa.debian.org/java-team/jnr-ffi/-/compare/8249042d90b97aaaf4c9cc37c6dfa23109088886...fc6aed72158e6abdbc70916e5c6060d00dbed040
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20260827/2d22e4b7/attachment.htm>


More information about the pkg-java-commits mailing list