|
0 |
Description: Generate the native headers with 'javac -h' instead of javah (removed from Java 10)
|
|
1 |
Author: Emmanuel Bourg <ebourg@apache.org>
|
|
2 |
Forwarded: no
|
|
3 |
--- a/build.xml
|
|
4 |
+++ b/build.xml
|
|
5 |
@@ -297,6 +297,7 @@
|
|
6 |
|
|
7 |
<!-- Generates the native headers from source files -->
|
|
8 |
<target name="headers" description="invokes javah on java classes" depends="compile">
|
|
9 |
+<!--
|
|
10 |
<javah classpath="${lwjgl.bin}" destdir="${lwjgl.src.native}/linux">
|
|
11 |
<class name="org.lwjgl.LinuxSysImplementation" />
|
|
12 |
<class name="org.lwjgl.opengl.LinuxEvent" />
|
|
13 |
@@ -373,6 +374,7 @@
|
|
14 |
<class name="org.lwjgl.opengles.GLContext"/>
|
|
15 |
<class name="org.lwjgl.opengles.CallbackUtil"/>
|
|
16 |
</javah>
|
|
17 |
+-->
|
|
18 |
</target>
|
|
19 |
|
|
20 |
<target name="touch-version">
|
|
21 |
@@ -403,21 +405,21 @@
|
|
22 |
</tokenfilter>
|
|
23 |
</filterchain>
|
|
24 |
</loadfile>
|
|
25 |
- <loadfile srcfile="${lwjgl.src.native}/windows/org_lwjgl_WindowsSysImplementation.h" property="lwjgl.native.windows.version">
|
|
26 |
+ <loadfile srcfile="${lwjgl.src.native}/org_lwjgl_WindowsSysImplementation.h" property="lwjgl.native.windows.version">
|
|
27 |
<filterchain>
|
|
28 |
<tokenfilter>
|
|
29 |
<containsstring contains="#define org_lwjgl_WindowsSysImplementation_JNI_VERSION"/>
|
|
30 |
</tokenfilter>
|
|
31 |
</filterchain>
|
|
32 |
</loadfile>
|
|
33 |
- <loadfile srcfile="${lwjgl.src.native}/linux/org_lwjgl_LinuxSysImplementation.h" property="lwjgl.native.linux.version">
|
|
34 |
+ <loadfile srcfile="${lwjgl.src.native}/org_lwjgl_LinuxSysImplementation.h" property="lwjgl.native.linux.version">
|
|
35 |
<filterchain>
|
|
36 |
<tokenfilter>
|
|
37 |
<containsstring contains="#define org_lwjgl_LinuxSysImplementation_JNI_VERSION"/>
|
|
38 |
</tokenfilter>
|
|
39 |
</filterchain>
|
|
40 |
</loadfile>
|
|
41 |
- <loadfile srcfile="${lwjgl.src.native}/macosx/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version">
|
|
42 |
+ <loadfile srcfile="${lwjgl.src.native}/org_lwjgl_MacOSXSysImplementation.h" property="lwjgl.native.macosx.version">
|
|
43 |
<filterchain>
|
|
44 |
<tokenfilter>
|
|
45 |
<containsstring contains="#define org_lwjgl_MacOSXSysImplementation_JNI_VERSION"/>
|
|
46 |
@@ -464,7 +466,7 @@
|
|
47 |
|
|
48 |
<!-- Compiles the Java source code -->
|
|
49 |
<target name="compile" description="Compiles the java source code" depends="-initialize">
|
|
50 |
- <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core">
|
|
51 |
+ <javac debug="yes" destdir="${lwjgl.bin}" source="1.5" target="1.5" classpath="${lwjgl.lib}/jinput.jar:${lwjgl.lib}/AppleJavaExtensions.jar:${lwjgl.lib}/asm-debug-all.jar" taskname="core" nativeHeaderDir="${lwjgl.src.native}">
|
|
52 |
<!--<compilerarg value="-Xlint:unchecked"/>-->
|
|
53 |
<src path="${lwjgl.src}/java/"/>
|
|
54 |
<src path="${lwjgl.src}/generated/"/>
|
|
55 |
--- a/src/java/org/lwjgl/LinuxSysImplementation.java
|
|
56 |
+++ b/src/java/org/lwjgl/LinuxSysImplementation.java
|
|
57 |
@@ -43,6 +43,7 @@
|
|
58 |
* $Id$
|
|
59 |
*/
|
|
60 |
final class LinuxSysImplementation extends J2SESysImplementation {
|
|
61 |
+ @java.lang.annotation.Native
|
|
62 |
private static final int JNI_VERSION = 19;
|
|
63 |
|
|
64 |
static {
|
|
65 |
--- a/platform_build/linux_ant/build.xml
|
|
66 |
+++ b/platform_build/linux_ant/build.xml
|
|
67 |
@@ -143,6 +143,7 @@
|
|
68 |
<arg value="-I${java.home}/../include/solaris"/>
|
|
69 |
<arg value="-I${native}/common"/>
|
|
70 |
<arg value="-I${native}/common/opengl"/>
|
|
71 |
+ <arg value="-I${native}"/>
|
|
72 |
<arg value="-I${native}/linux"/>
|
|
73 |
<arg value="-I${native}/linux/opengl"/>
|
|
74 |
<mapper type="glob" from="*.c" to="*.o"/>
|
|
75 |
--- a/src/java/org/lwjgl/input/Cursor.java
|
|
76 |
+++ b/src/java/org/lwjgl/input/Cursor.java
|
|
77 |
@@ -51,12 +51,15 @@
|
|
78 |
|
|
79 |
public class Cursor {
|
|
80 |
/** 1 bit transparency for native cursor */
|
|
81 |
+ @java.lang.annotation.Native
|
|
82 |
public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1;
|
|
83 |
|
|
84 |
/** 8 bit alhpa native cursor */
|
|
85 |
+ @java.lang.annotation.Native
|
|
86 |
public static final int CURSOR_8_BIT_ALPHA = 2;
|
|
87 |
|
|
88 |
/** animation native cursor */
|
|
89 |
+ @java.lang.annotation.Native
|
|
90 |
public static final int CURSOR_ANIMATION = 4;
|
|
91 |
|
|
92 |
/** First element to display */
|
|
93 |
--- a/src/native/common/org_lwjgl_BufferUtils.c
|
|
94 |
+++ b/src/native/common/org_lwjgl_BufferUtils.c
|
|
95 |
@@ -1,4 +1,3 @@
|
|
96 |
-#include "org_lwjgl_BufferUtils.h"
|
|
97 |
#include "common_tools.h"
|
|
98 |
|
|
99 |
JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0(JNIEnv *env, jclass clazz, jobject buffer, jlong offset, jlong size) {
|
|
100 |
--- a/src/native/common/org_lwjgl_opencl_CallbackUtil.c
|
|
101 |
+++ b/src/native/common/org_lwjgl_opencl_CallbackUtil.c
|
|
102 |
@@ -39,7 +39,6 @@
|
|
103 |
#include <jni.h>
|
|
104 |
#include "common_tools.h"
|
|
105 |
#include "extcl.h"
|
|
106 |
-#include "org_lwjgl_opencl_CallbackUtil.h"
|
|
107 |
|
|
108 |
static jmethodID contextCallbackJ;
|
|
109 |
static jmethodID memObjectDestructorCallbackJ;
|
|
110 |
--- a/src/java/org/lwjgl/MacOSXSysImplementation.java
|
|
111 |
+++ b/src/java/org/lwjgl/MacOSXSysImplementation.java
|
|
112 |
@@ -43,6 +43,7 @@
|
|
113 |
* $Id$
|
|
114 |
*/
|
|
115 |
final class MacOSXSysImplementation extends J2SESysImplementation {
|
|
116 |
+ @java.lang.annotation.Native
|
|
117 |
private static final int JNI_VERSION = 25;
|
|
118 |
|
|
119 |
static {
|