diff options
Diffstat (limited to 'core/org.eclipse.cdt.core.solaris/library/pty.c')
-rw-r--r-- | core/org.eclipse.cdt.core.solaris/library/pty.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/core/org.eclipse.cdt.core.solaris/library/pty.c b/core/org.eclipse.cdt.core.solaris/library/pty.c deleted file mode 100644 index 4b9e682c3ee..00000000000 --- a/core/org.eclipse.cdt.core.solaris/library/pty.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "PTY.h" -#include "openpty.h" - -/* - * Class: org_eclipse_cdt_utils_pty_PTY - * Method: forkpty - * Signature: ()I - */ -JNIEXPORT jstring JNICALL -Java_org_eclipse_cdt_utils_pty_PTY_forkpty (JNIEnv *env, jobject jobj) { - jfieldID fid; /* Store the field ID */ - jstring jstr = NULL; - int master = -1; - char line[1024]; /* FIXME: Should be enough */ - jclass cls; - - line[0] = '\0'; - - master = ptym_open(line); - if (master >= 0) { - /* Get a reference to the obj's class */ - cls = (*env)->GetObjectClass(env, jobj); - - /* Set the master fd. */ - fid = (*env)->GetFieldID(env, cls, "master", "I"); - if (fid == NULL) { - return NULL; - } - (*env)->SetIntField(env, jobj, fid, (jint)master); - - /* Create a new String for the slave. */ - jstr = (*env)->NewStringUTF(env, line); - } - return jstr; -} |