mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
Removed implementation of available0, as it depends on a specific JVM, bug 119618 is still open.
This commit is contained in:
parent
325f5713fa
commit
17fe1a203d
1 changed files with 1 additions and 28 deletions
|
@ -7,6 +7,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* QNX Software Systems - initial API and implementation
|
* QNX Software Systems - initial API and implementation
|
||||||
|
* Wind River Systems, Inc.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -14,10 +15,6 @@
|
||||||
#include <SpawnerOutputStream.h>
|
#include <SpawnerOutputStream.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#define INT_MAX 2147483647
|
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL JVM_Available(jint fd, jlong *pbytes);
|
|
||||||
|
|
||||||
/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerInputStream */
|
/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerInputStream */
|
||||||
/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerOutputStream */
|
/* Header for class _org_eclipse_cdt_utils_spawner_SpawnerOutputStream */
|
||||||
|
|
||||||
|
@ -75,30 +72,6 @@ Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0(JNIEnv * env,
|
||||||
return close(fd);
|
return close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL
|
|
||||||
Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_available0(JNIEnv * env,
|
|
||||||
jobject jobj,
|
|
||||||
jint fd)
|
|
||||||
{
|
|
||||||
jlong ret;
|
|
||||||
|
|
||||||
if (JVM_Available(fd, &ret)) {
|
|
||||||
if (ret > INT_MAX) {
|
|
||||||
ret = (jlong) INT_MAX;
|
|
||||||
}
|
|
||||||
return (jint)ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Error, toss an exception */
|
|
||||||
jclass exception = (*env)->FindClass(env, "java/io/IOException");
|
|
||||||
if (exception == NULL) {
|
|
||||||
/* Give up. */
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
(*env)->ThrowNew(env, exception, NULL);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
|
* Class: org_eclipse_cdt_utils_spawner_SpawnerOutputStream
|
||||||
* Method: write0
|
* Method: write0
|
||||||
|
|
Loading…
Add table
Reference in a new issue