File: 16-java10-compatibility.patch

package info (click to toggle)
libjna-java 4.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,844 kB
  • sloc: java: 75,159; ansic: 4,781; xml: 4,585; makefile: 434; sh: 235
file content (42 lines) | stat: -rw-r--r-- 1,431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: Fixes the build failure with Java 10
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: no
--- a/build.xml
+++ b/build.xml
@@ -374,6 +374,7 @@
            source="${compatibility}"
            target="${compatibility}"
            destdir="${classes}"
+           nativeHeaderDir="${build.native}"
            includeantruntime="false"
            deprecation="on" 
            debug="${debug}"
@@ -669,11 +670,6 @@
   </target>
 
   <target name="javah" depends="compile" unless="-native">
-    <javah classpath="${classes}" destdir="${build.native}" force="yes">
-      <class name="com.sun.jna.Function"/>
-      <class name="com.sun.jna.Native"/>
-      <class name="com.sun.jna.win32.DLLCallback"/>
-    </javah>
     <condition property="grep" value="/usr/sfw/bin/ggrep">
       <os name="SunOS"/>
     </condition>
--- a/src/com/sun/jna/Function.java
+++ b/src/com/sun/jna/Function.java
@@ -60,11 +60,14 @@
     }
 
     /** Maximum number of arguments supported by a JNA function call. */
+    @java.lang.annotation.Native
     public static final int MAX_NARGS = 256;
 
     /** Standard C calling convention. */
+    @java.lang.annotation.Native
     public static final int C_CONVENTION = 0;
     /** First alternate convention (currently used only for w32 stdcall). */
+    @java.lang.annotation.Native
     public static final int ALT_CONVENTION = 0x3F;
 
     private static final int MASK_CC = 0x3F;