diff --git a/native/src/main/java/org/jline/nativ/Kernel32.java b/native/src/main/java/org/jline/nativ/Kernel32.java index 66a525ffc..5e445b4b8 100644 --- a/native/src/main/java/org/jline/nativ/Kernel32.java +++ b/native/src/main/java/org/jline/nativ/Kernel32.java @@ -44,7 +44,7 @@ public class Kernel32 { public static int STD_INPUT_HANDLE; public static int STD_OUTPUT_HANDLE; public static int STD_ERROR_HANDLE; - public static int INVALID_HANDLE_VALUE; + public static long INVALID_HANDLE_VALUE; public static native long malloc(long size); diff --git a/native/src/main/native/kernel32.c b/native/src/main/native/kernel32.c index 003cdcbaa..fde49c4b6 100644 --- a/native/src/main/native/kernel32.c +++ b/native/src/main/native/kernel32.c @@ -762,7 +762,7 @@ JNIEXPORT void JNICALL Kernel32_NATIVE(init)(JNIEnv *env, jclass that) (*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_INPUT_HANDLE", "I"), (jint)STD_INPUT_HANDLE); (*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_OUTPUT_HANDLE", "I"), (jint)STD_OUTPUT_HANDLE); (*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "STD_ERROR_HANDLE", "I"), (jint)STD_ERROR_HANDLE); - (*env)->SetStaticIntField(env, that, (*env)->GetStaticFieldID(env, that, "INVALID_HANDLE_VALUE", "I"), (jint)INVALID_HANDLE_VALUE); + (*env)->SetStaticLongField(env, that, (*env)->GetStaticFieldID(env, that, "INVALID_HANDLE_VALUE", "J"), (jlong)INVALID_HANDLE_VALUE); return; } diff --git a/native/src/main/resources/META-INF/native-image/org.jline/jline-native/jni-config.json b/native/src/main/resources/META-INF/native-image/org.jline/jline-native/jni-config.json index 4697a7cb6..ddc62f1ef 100644 --- a/native/src/main/resources/META-INF/native-image/org.jline/jline-native/jni-config.json +++ b/native/src/main/resources/META-INF/native-image/org.jline/jline-native/jni-config.json @@ -54,7 +54,7 @@ { "name": "STD_INPUT_HANDLE" }, { "name": "STD_OUTPUT_HANDLE" }, { "name": "STD_ERROR_HANDLE" }, - { "name": "INVALID_HANDLE_VALUE," } + { "name": "INVALID_HANDLE_VALUE" } ] }, { diff --git a/native/src/main/resources/org/jline/nativ/Windows/arm64/libjlinenative.so b/native/src/main/resources/org/jline/nativ/Windows/arm64/libjlinenative.so index 3fa5ec086..32c277c0e 100755 Binary files a/native/src/main/resources/org/jline/nativ/Windows/arm64/libjlinenative.so and b/native/src/main/resources/org/jline/nativ/Windows/arm64/libjlinenative.so differ diff --git a/native/src/main/resources/org/jline/nativ/Windows/x86/jlinenative.dll b/native/src/main/resources/org/jline/nativ/Windows/x86/jlinenative.dll index f6bfa9ee6..3d6445068 100755 Binary files a/native/src/main/resources/org/jline/nativ/Windows/x86/jlinenative.dll and b/native/src/main/resources/org/jline/nativ/Windows/x86/jlinenative.dll differ diff --git a/native/src/main/resources/org/jline/nativ/Windows/x86_64/jlinenative.dll b/native/src/main/resources/org/jline/nativ/Windows/x86_64/jlinenative.dll index 6b252cf1e..c2f2acff5 100755 Binary files a/native/src/main/resources/org/jline/nativ/Windows/x86_64/jlinenative.dll and b/native/src/main/resources/org/jline/nativ/Windows/x86_64/jlinenative.dll differ diff --git a/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/Kernel32.java b/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/Kernel32.java index 786dd897f..32dc2ec51 100644 --- a/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/Kernel32.java +++ b/terminal-ffm/src/main/java/org/jline/terminal/impl/ffm/Kernel32.java @@ -19,7 +19,7 @@ final class Kernel32 { public static final int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000; - public static final int INVALID_HANDLE_VALUE = -1; + public static final long INVALID_HANDLE_VALUE = -1; public static final int STD_INPUT_HANDLE = -10; public static final int STD_OUTPUT_HANDLE = -11; public static final int STD_ERROR_HANDLE = -12;