1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-06 15:55:47 +02:00

Removed implementation of available0, as it depends on a specific JVM, bug 119618 is still open.

This commit is contained in:
Markus Schorn 2006-04-28 07:28:04 +00:00
parent 325f5713fa
commit 17fe1a203d

View file

@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - initial API and implementation
* Wind River Systems, Inc.
*******************************************************************************/
#include <jni.h>
#include <stdio.h>
@ -14,10 +15,6 @@
#include <SpawnerOutputStream.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_SpawnerOutputStream */
@ -75,30 +72,6 @@ Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_close0(JNIEnv * env,
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
* Method: write0