Skip to main content
summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDoug Schaefer2004-11-18 16:16:47 +0000
committerDoug Schaefer2004-11-18 16:16:47 +0000
commit7667f20ca580da8d3be99032b022656fa076331a (patch)
treed5a80b49845051aab560070ac01e5969ae9d32a3 /core
parentdc1b37d6b5da1a80c69019964b3c1484eb66109e (diff)
downloadorg.eclipse.cdt-7667f20ca580da8d3be99032b022656fa076331a.tar.gz
org.eclipse.cdt-7667f20ca580da8d3be99032b022656fa076331a.tar.xz
org.eclipse.cdt-7667f20ca580da8d3be99032b022656fa076331a.zip
Updated the spawner DLL to build with MinGW gcc.
Diffstat (limited to 'core')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c21
-rw-r--r--core/org.eclipse.cdt.core.win32/library/iostream.c8
-rw-r--r--core/org.eclipse.cdt.core.win32/library/spawner.c2
-rw-r--r--core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dllbin23552 -> 37157 bytes
4 files changed, 15 insertions, 16 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;
diff --git a/core/org.eclipse.cdt.core.win32/library/iostream.c b/core/org.eclipse.cdt.core.win32/library/iostream.c
index 01bc078e3c0..241e16bc754 100644
--- a/core/org.eclipse.cdt.core.win32/library/iostream.c
+++ b/core/org.eclipse.cdt.core.win32/library/iostream.c
@@ -79,8 +79,8 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerInputStream_rea
while(len > nBuffOffset)
{
- int nNumberOfBytesToRead = min(len - nBuffOffset, BUFF_SIZE);
- int nNumberOfBytesRead;
+ DWORD nNumberOfBytesToRead = min(len - nBuffOffset, BUFF_SIZE);
+ DWORD nNumberOfBytesRead;
if(0 == ReadFile((HANDLE)fd, tmpBuf, nNumberOfBytesToRead, &nNumberOfBytesRead, &overlapped ))
{
int err = GetLastError();
@@ -182,8 +182,8 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_SpawnerOutputStream_wr
while(len > nBuffOffset)
{
- int nNumberOfBytesToWrite = min(len - nBuffOffset, BUFF_SIZE);
- int nNumberOfBytesWritten;
+ DWORD nNumberOfBytesToWrite = min(len - nBuffOffset, BUFF_SIZE);
+ DWORD nNumberOfBytesWritten;
(*env) -> GetByteArrayRegion(env, buf, nBuffOffset, nNumberOfBytesToWrite, tmpBuf);
if(0 == WriteFile((HANDLE)fd, tmpBuf, nNumberOfBytesToWrite, &nNumberOfBytesWritten, NULL))
{
diff --git a/core/org.eclipse.cdt.core.win32/library/spawner.c b/core/org.eclipse.cdt.core.win32/library/spawner.c
index 6ada9da075e..d9b0f2748be 100644
--- a/core/org.eclipse.cdt.core.win32/library/spawner.c
+++ b/core/org.eclipse.cdt.core.win32/library/spawner.c
@@ -39,7 +39,7 @@ BOOL APIENTRY DllMain( HANDLE hModule,
if(NULL != p)
*(p + 1) = _T('\0');
else
- _tcscat(path, _T("\\"));
+ _tcscat(path, L"\\");
}
break;
case DLL_THREAD_ATTACH:
diff --git a/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll b/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll
index 1b1f3c338f8..e1ee52a25a7 100644
--- a/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll
+++ b/core/org.eclipse.cdt.core.win32/os/win32/x86/spawner.dll
Binary files differ

Back to the top