changeset 49564:7b00ac6c11ab

8201246: Export native function to set platform encoding Reviewed-by: rriggs Contributed-by: andrew_m_leonard@uk.ibm.com
author rriggs
date Tue, 10 Apr 2018 10:49:17 -0400
parents 809b178407cc
children b2bd13eafc1c
files src/java.base/share/native/libjava/jni_util.c src/java.base/share/native/libjava/jni_util.h
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/native/libjava/jni_util.c	Tue Apr 10 16:16:34 2018 +0200
+++ b/src/java.base/share/native/libjava/jni_util.c	Tue Apr 10 10:49:17 2018 -0400
@@ -774,8 +774,10 @@
     return newSizedStringJava(env, str, len);
 }
 
-/* Initialize the fast encoding from the encoding name. */
-void
+/* Initialize the fast encoding from the encoding name.
+ * Export InitializeEncoding so that the VM can initialize it if required.
+ */
+JNIEXPORT void
 InitializeEncoding(JNIEnv *env, const char *encname)
 {
     jclass strClazz = NULL;
--- a/src/java.base/share/native/libjava/jni_util.h	Tue Apr 10 16:16:34 2018 +0200
+++ b/src/java.base/share/native/libjava/jni_util.h	Tue Apr 10 10:49:17 2018 -0400
@@ -388,7 +388,7 @@
 
 int getFastEncoding();
 
-void InitializeEncoding(JNIEnv *env, const char *name);
+JNIEXPORT void InitializeEncoding(JNIEnv *env, const char *name);
 
 void* getProcessHandle();