mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-12 19:45:22 +02:00
2004-07-20 Alex Chapiro
Fix for PR 70359 Binaries regenerated * library/Win32ProcessEx.c * library/starter/starter.cpp * os/win32/x86/spawner.dll * os/win32/x86/starter.dll
This commit is contained in:
parent
ed00f21102
commit
a3ad6e7799
5 changed files with 46 additions and 6 deletions
|
@ -1,3 +1,13 @@
|
|||
2004-07-20 Alex Chapiro
|
||||
|
||||
Fix for PR 70359
|
||||
Binaries regenerated
|
||||
|
||||
* library/Win32ProcessEx.c
|
||||
* library/starter/starter.cpp
|
||||
* os/win32/x86/spawner.dll
|
||||
* os/win32/x86/starter.dll
|
||||
|
||||
2004-04-29 Alex Chapiro
|
||||
|
||||
Support for I18N within spawner.
|
||||
|
|
|
@ -108,7 +108,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
|
|||
int ret = 0;
|
||||
_TCHAR szCmdLine[MAX_CMD_SIZE];
|
||||
int nBlkSize = MAX_ENV_SIZE;
|
||||
_TCHAR * szEnvBlock = (_TCHAR *)malloc(nBlkSize * sizeof(_TCHAR));
|
||||
_TCHAR * szEnvBlock = NULL;
|
||||
jsize nCmdTokens = 0;
|
||||
jsize nEnvVars = 0;
|
||||
int i;
|
||||
|
@ -220,10 +220,16 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
|
|||
|
||||
szCmdLine[nPos] = _T('\0');
|
||||
|
||||
|
||||
#ifdef DEBUG_MONITOR
|
||||
_stprintf(buffer, _T("There are %i environment variables \n"), nEnvVars);
|
||||
OutputDebugStringW(buffer);
|
||||
#endif
|
||||
// Prepare environment block
|
||||
if (nEnvVars > 0)
|
||||
{
|
||||
nPos = 0;
|
||||
szEnvBlock = (_TCHAR *)malloc(nBlkSize * sizeof(_TCHAR));
|
||||
for(i = 0; i < nEnvVars; ++i)
|
||||
{
|
||||
jobject item = (*env) -> GetObjectArrayElement(env, envp, i);
|
||||
|
@ -298,7 +304,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
|
|||
0, /* thread security attribute */
|
||||
FALSE, /* inherits system handles */
|
||||
flags, /* normal attached process */
|
||||
envBlk, /* environment block */
|
||||
szEnvBlock, /* environment block */
|
||||
cwd, /* change to the new current directory */
|
||||
&si, /* (in) startup information */
|
||||
&pi); /* (out) process information */
|
||||
|
@ -308,6 +314,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
|
|||
if(NULL != cwd)
|
||||
free((void *)cwd);
|
||||
|
||||
if(NULL != szEnvBlock)
|
||||
free(szEnvBlock);
|
||||
|
||||
if (!ret) // Launching error
|
||||
|
@ -411,7 +418,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
|
|||
int nPos;
|
||||
_TCHAR szCmdLine[MAX_CMD_SIZE];
|
||||
int nBlkSize = MAX_ENV_SIZE;
|
||||
_TCHAR * szEnvBlock = (_TCHAR *)malloc(nBlkSize * sizeof(_TCHAR));
|
||||
_TCHAR * szEnvBlock = NULL;
|
||||
|
||||
|
||||
sa.nLength = sizeof(sa);
|
||||
|
@ -450,6 +457,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
|
|||
// Prepare environment block
|
||||
if (nEnvVars > 0)
|
||||
{
|
||||
szEnvBlock = (_TCHAR *)malloc(nBlkSize * sizeof(_TCHAR));
|
||||
nPos = 0;
|
||||
for(i = 0; i < nEnvVars; ++i)
|
||||
{
|
||||
|
@ -516,6 +524,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
|
|||
|
||||
if(NULL != cwd)
|
||||
free(cwd);
|
||||
if(NULL != szEnvBlock)
|
||||
free(szEnvBlock);
|
||||
|
||||
if (!ret) // error
|
||||
|
|
|
@ -151,6 +151,27 @@ extern "C" int _tmain(int argc, _TCHAR * argv[]) {
|
|||
return -1;;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG_MONITOR
|
||||
_TCHAR * lpvEnv = GetEnvironmentStringsW();
|
||||
|
||||
// If the returned pointer is NULL, exit.
|
||||
if (lpvEnv == NULL)
|
||||
OutputDebugStringW(_T("Cannot Read Environment\n"));
|
||||
else {
|
||||
// Variable strings are separated by NULL byte, and the block is
|
||||
// terminated by a NULL byte.
|
||||
|
||||
OutputDebugStringW(_T("Starter: Environment\n"));
|
||||
for (_TCHAR * lpszVariable = (_TCHAR *) lpvEnv; *lpszVariable; lpszVariable+=_tcslen(lpszVariable) + 1) {
|
||||
_stprintf(buffer, _T("%s\n"), lpszVariable);
|
||||
OutputDebugStringW(buffer);
|
||||
}
|
||||
|
||||
FreeEnvironmentStringsW(lpvEnv);
|
||||
}
|
||||
#endif
|
||||
#ifdef DEBUG_MONITOR
|
||||
_stprintf(buffer, _T("Starting: %s\n"), szCmdLine);
|
||||
OutputDebugStringW(buffer);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue