enable AIX build, update natives
Esse commit está contido em:
+3
-1
@@ -5,7 +5,9 @@ NOTE: JNI native support is typically incompatible between minor versions, and a
|
||||
Next Release
|
||||
============
|
||||
|
||||
* Your contribution here.
|
||||
Features
|
||||
--------
|
||||
* Updated AIX natives and build - [@twall](https://github.com/twall).
|
||||
|
||||
Release 4.1
|
||||
===========
|
||||
|
||||
+5
-1
@@ -527,9 +527,12 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
|
||||
<os name="OpenBSD"/>
|
||||
</condition>
|
||||
<property name="grep" value="grep"/>
|
||||
<condition property="grep.required" value="false" else="true">
|
||||
<os name="AIX"/>
|
||||
</condition>
|
||||
<!-- args are based on GNU grep, other versions may differ -->
|
||||
<apply dir="${build.native}" executable="${grep}" parallel="true"
|
||||
failonerror="true" relative="true" output="${md5.file}">
|
||||
failonerror="${grep.required}" relative="true" output="${md5.file}">
|
||||
<arg value="-A"/>
|
||||
<arg value="1"/>
|
||||
<arg value="JNIEXPORT"/>
|
||||
@@ -552,6 +555,7 @@ osname=macosx;processor=x86;processor=x86-64;processor=ppc
|
||||
<checksum property="md5" file="${md5.file}" />
|
||||
<condition property="jni.valid" value="true">
|
||||
<or>
|
||||
<os name="AIX"/>
|
||||
<equals arg1="${jni.md5}" arg2="${md5}" trim="true"/>
|
||||
<equals arg1="${jni.md5}" arg2=""/>
|
||||
</or>
|
||||
|
||||
Arquivo binário não exibido.
+4
-3
@@ -60,7 +60,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef _AIX
|
||||
#pragma alloca
|
||||
#undef DEFAULT_LOAD_OPTS
|
||||
#define DEFAULT_LOAD_OPTS (RTLD_MEMBER| RTLD_LAZY | RTLD_GLOBAL)
|
||||
#undef LOAD_LIBRARY
|
||||
@@ -69,7 +68,9 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
// Force XSI-compliant strerror_r (http://unixhelp.ed.ac.uk/CGI/man-cgi?strerror)
|
||||
#ifndef _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE 600
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <jni.h>
|
||||
@@ -813,7 +814,7 @@ encodingString(JNIEnv *env, const char* ptr) {
|
||||
|
||||
bytes = (*env)->NewByteArray(env, len);
|
||||
if (bytes != NULL) {
|
||||
(*env)->SetByteArrayRegion(env, bytes, 0, len, (const jbyte *)ptr);
|
||||
(*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte *)ptr);
|
||||
result = (*env)->NewObject(env, classString,
|
||||
MID_String_init_bytes, bytes);
|
||||
(*env)->DeleteLocalRef(env, bytes);
|
||||
@@ -861,7 +862,7 @@ newJavaString(JNIEnv *env, const char *ptr, const char* charset)
|
||||
|
||||
bytes = (*env)->NewByteArray(env, len);
|
||||
if (bytes != NULL) {
|
||||
(*env)->SetByteArrayRegion(env, bytes, 0, len, (const jbyte *)ptr);
|
||||
(*env)->SetByteArrayRegion(env, bytes, 0, len, (jbyte *)ptr);
|
||||
result = (*env)->NewObject(env, classString,
|
||||
MID_String_init_bytes2, bytes,
|
||||
encodingString(env, charset));
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário