Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.win32')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/iostream.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/iostream.c b/core/org.eclipse.cdt.core.win32/library/iostream.c
index 163a3a8b955..7beda1cdbc2 100644
--- a/core/org.eclipse.cdt.core.win32/library/iostream.c
+++ b/core/org.eclipse.cdt.core.win32/library/iostream.c
@@ -168,6 +168,18 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_clo
return (rc ? GetLastError() : 0);
}
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_available0
+ (JNIEnv * env, jobject proc, jint fd)
+{
+ int nAvail = 0;
+
+ if (0 == PeekNamedPipe((HANDLE)fd, NULL, 0, NULL, &nAvail, NULL)) {
+ // error
+ return 0;
+ }
+ return nAvail;
+}
+
/*
* Class: SpawnerOutputStream
* Method: write0

Back to the top