Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2002-11-07 15:45:17 -0500
committerAlain Magloire2002-11-07 15:45:17 -0500
commit596d184814f7f09e4b02cbb6ad50c24a2b10c488 (patch)
treea0a08509cda9c99b742263130cb853ee505c566a /core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
parentc014fcc8bbe20687f581441e95963668b4132b15 (diff)
downloadorg.eclipse.cdt-596d184814f7f09e4b02cbb6ad50c24a2b10c488.tar.gz
org.eclipse.cdt-596d184814f7f09e4b02cbb6ad50c24a2b10c488.tar.xz
org.eclipse.cdt-596d184814f7f09e4b02cbb6ad50c24a2b10c488.zip
Remove not portable function.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
index 0d642e885b0..9cb396a04c3 100644
--- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
+++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
@@ -22,7 +22,7 @@
#include "jni.h"
#include "io.h"
-// #define DEBUG_MONITOR
+#define DEBUG_MONITOR
#define PIPE_SIZE 512
#define MAX_CMD_SIZE 1024
@@ -44,7 +44,6 @@ typedef struct _procInfo {
static int procCounter = 0;
-JNIEXPORT void * JNICALL GetJVMProc(char * vmlib, char * procName);
JNIEXPORT void JNICALL ThrowByName(JNIEnv *env, const char *name, const char *msg);
pProcInfo_t createProcInfo();
pProcInfo_t findProcInfo(int pid);
@@ -197,9 +196,8 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
if (dir != 0)
{
- const char * str = NULL;
- JVM_NativePath nativePath = GetJVMProc(NULL, "_JVM_NativePath@4");
- cwd = strdup(nativePath(str = (*env) -> GetStringUTFChars(env, dir, 0)));
+ const char * str = NULL;
+ cwd = strdup((*env) -> GetStringUTFChars(env, dir, 0));
(*env) -> ReleaseStringUTFChars(env, dir, str);
}
@@ -397,8 +395,9 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
if (dir != 0)
{
- JVM_NativePath nativePath = GetJVMProc(NULL, "_JVM_NativePath@4");
- cwd = strdup(nativePath((*env) -> GetStringUTFChars(env, dir, 0)));
+ const char * str = NULL;
+ cwd = strdup((*env) -> GetStringUTFChars(env, dir, 0));
+ (*env) -> ReleaseStringUTFChars(env, dir, str);
}
@@ -469,6 +468,8 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_raise
pProcInfo_t pCurProcInfo = findProcInfo(uid);
#ifdef DEBUG_MONITOR
char buffer[100];
+ sprintf(buffer, "Spawner received signal %i for process %i\n", signal, pCurProcInfo -> pid);
+ OutputDebugString(buffer);
#endif
if(NULL == pCurProcInfo)
@@ -569,18 +570,6 @@ ThrowByName(JNIEnv *env, const char *name, const char *msg)
-JNIEXPORT void * JNICALL
-GetJVMProc(char * vmlib, char * procName)
-{
- if(NULL == vmlib)
- vmlib = "jvm.dll";
- if(NULL == hVM)
- {
- if(NULL == (hVM = GetModuleHandle(vmlib)))
- return NULL;
- }
- return GetProcAddress(hVM, procName);
-}
pProcInfo_t createProcInfo()
{
@@ -691,7 +680,7 @@ unsigned int _stdcall waitProcTermination(void* pv)
cleanUpProcBlock(pInfo + i);
}
break;
- } // Otherwise failed because was not started
+ } // Otherwise failed because was not started
}
CloseHandle(hProc);

Back to the top