Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2004-11-18 11:11:50 -0500
committerDoug Schaefer2004-11-18 11:11:50 -0500
commit8c69def99480bf082931cb29bc304a6c67d243d1 (patch)
tree49d3b6525ebfbc562d67e41baec27492e8eb39a0 /core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
parent548574d7fdd9ee14ab82ac5d2232f187b5edbd2b (diff)
downloadorg.eclipse.cdt-8c69def99480bf082931cb29bc304a6c67d243d1.tar.gz
org.eclipse.cdt-8c69def99480bf082931cb29bc304a6c67d243d1.tar.xz
org.eclipse.cdt-8c69def99480bf082931cb29bc304a6c67d243d1.zip
Updated the Windows spawner DLL to build using MinGW gcc.
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
index c7e30b2bbd5..af3d1f2a95d 100644
--- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
+++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
@@ -19,7 +19,6 @@
#include <process.h>
#include "Spawner.h"
-
#include "jni.h"
#include "io.h"
@@ -150,9 +149,9 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
// Create pipe names
EnterCriticalSection(&cs);
- _stprintf(inPipeName, _T("\\\\.\\pipe\\stdin%08i%010i"), pid, nCounter);
- _stprintf(outPipeName, _T("\\\\.\\pipe\\stdout%08i%010i"), pid, nCounter);
- _stprintf(errPipeName, _T("\\\\.\\pipe\\stderr%08i%010i"), pid, nCounter);
+ _stprintf(inPipeName, L"\\\\.\\pipe\\stdin%08i%010i", pid, nCounter);
+ _stprintf(outPipeName, L"\\\\.\\pipe\\stdout%08i%010i", pid, nCounter);
+ _stprintf(errPipeName, L"\\\\.\\pipe\\stderr%08i%010i", pid, nCounter);
nLocalCounter = nCounter;
++nCounter;
LeaveCriticalSection(&cs);
@@ -192,9 +191,9 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
}
// Construct starter's command line
- _stprintf(eventBreakName, _T("SABreak%p"), pCurProcInfo);
- _stprintf(eventWaitName, _T("SAWait%p"), pCurProcInfo);
- _stprintf(eventTerminateName, _T("SATerm%p"), pCurProcInfo);
+ _stprintf(eventBreakName, L"SABreak%p", pCurProcInfo);
+ _stprintf(eventWaitName, L"SAWait%p", pCurProcInfo);
+ _stprintf(eventTerminateName, L"SATerm%p", pCurProcInfo);
pCurProcInfo -> eventBreak = CreateEventW(NULL, TRUE, FALSE, eventBreakName);
ResetEvent(pCurProcInfo -> eventBreak);
pCurProcInfo -> eventWait = CreateEventW(NULL, TRUE, FALSE, eventWaitName);
@@ -202,7 +201,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
pCurProcInfo -> eventTerminate = CreateEventW(NULL, TRUE, FALSE, eventTerminateName);
ResetEvent(pCurProcInfo -> eventTerminate);
- nPos = _stprintf(szCmdLine, _T("%sstarter.exe %i %i %s %s %s "), path, pid, nLocalCounter, eventBreakName, eventWaitName, eventTerminateName);
+ nPos = _stprintf(szCmdLine, L"%sstarter.exe %i %i %s %s %s ", path, pid, nLocalCounter, eventBreakName, eventWaitName, eventTerminateName);
// Prepare command line
for(i = 0; i < nCmdTokens; ++i)
@@ -263,7 +262,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
_stprintf(buffer, _T("%s\n"), str);
OutputDebugStringW(buffer);
#endif
- _tcsnccpy(szEnvBlock + nPos, str, len);
+ _tcsncpy(szEnvBlock + nPos, str, len);
nPos += len;
szEnvBlock[nPos] = _T('\0');
++nPos;
@@ -386,7 +385,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
file_handles[0] = (int)stdHandles[0];
file_handles[1] = (int)stdHandles[1];
file_handles[2] = (int)stdHandles[2];
- (*env) -> SetIntArrayRegion(env, channels, 0, 3, file_handles);
+ (*env) -> SetIntArrayRegion(env, channels, 0, 3, (jint *)file_handles);
#ifdef DEBUG_MONITOR
OutputDebugStringW(_T("Process started\n"));
#endif
@@ -484,7 +483,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
return 0;
}
}
- _tcsnccpy(szEnvBlock + nPos, str, len);
+ _tcsncpy(szEnvBlock + nPos, str, len);
nPos += len;
szEnvBlock[nPos] = _T('\0');
++nPos;

Back to the top