Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Magloire2003-08-29 10:25:01 -0400
committerAlain Magloire2003-08-29 10:25:01 -0400
commita62a1f4305224446e2630ac86fcf99f025a38d3e (patch)
treebae1f9a84db6db83df1588fa0a4dca7554cb311b /core/org.eclipse.cdt.core.win32/library
parentf0646c36bc6a76a51aebea200501648002a9047a (diff)
downloadorg.eclipse.cdt-a62a1f4305224446e2630ac86fcf99f025a38d3e.tar.gz
org.eclipse.cdt-a62a1f4305224446e2630ac86fcf99f025a38d3e.tar.xz
org.eclipse.cdt-a62a1f4305224446e2630ac86fcf99f025a38d3e.zip
change the limit of arguments to match OS limit
Diffstat (limited to 'core/org.eclipse.cdt.core.win32/library')
-rw-r--r--core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c12
-rw-r--r--core/org.eclipse.cdt.core.win32/library/spawner.dsw29
-rw-r--r--core/org.eclipse.cdt.core.win32/library/starter/starter.cpp2
3 files changed, 36 insertions, 7 deletions
diff --git a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
index b4174646c4..d5e9a410bf 100644
--- a/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
+++ b/core/org.eclipse.cdt.core.win32/library/Win32ProcessEx.c
@@ -25,7 +25,7 @@
// #define DEBUG_MONITOR
#define PIPE_SIZE 512
-#define MAX_CMD_SIZE 1024
+#define MAX_CMD_SIZE 2049
#define MAX_ENV_SIZE 4096
#define MAX_PROCS (100)
@@ -102,7 +102,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
if((HIBYTE(LOWORD(GetVersion()))) & 0x80)
{
- ThrowByName(env, "java/lang/IOException", "Does not support Windows 3.1/95/98/Me");
+ ThrowByName(env, "java/io/IOException", "Does not support Windows 3.1/95/98/Me");
return 0;
}
@@ -166,7 +166,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
{
if(0 > (nCpyLen = copyTo(szCmdLine + nPos, str, len, MAX_CMD_SIZE - nPos)))
{
- ThrowByName(env, "java/lang/Exception", "Too long command line");
+ ThrowByName(env, "java/io/IOException", "Too long command line");
return 0;
}
nPos += nCpyLen;
@@ -195,7 +195,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec0
szEnvBlock = (char *)realloc(szEnvBlock, nBlkSize);
if(NULL == szEnvBlock)
{
- ThrowByName(env, "java/lang/Exception", "Not enough memory");
+ ThrowByName(env, "java/io/IOException", "Not enough memory");
return 0;
}
#ifdef DEBUG_MONITOR
@@ -388,7 +388,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
{
if(0 > (nCpyLen = copyTo(szCmdLine + nPos, str, len, MAX_CMD_SIZE - nPos)))
{
- ThrowByName(env, "java/lang/Exception", "Too long command line");
+ ThrowByName(env, "java/io/IOException", "Too long command line");
return 0;
}
nPos += nCpyLen;
@@ -417,7 +417,7 @@ JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_spawner_Spawner_exec1
szEnvBlock = (char *)realloc(szEnvBlock, nBlkSize);
if(NULL == szEnvBlock)
{
- ThrowByName(env, "java/lang/Exception", "Not enough memory");
+ ThrowByName(env, "java/io/IOException", "Not enough memory");
return 0;
}
}
diff --git a/core/org.eclipse.cdt.core.win32/library/spawner.dsw b/core/org.eclipse.cdt.core.win32/library/spawner.dsw
new file mode 100644
index 0000000000..f22469884e
--- /dev/null
+++ b/core/org.eclipse.cdt.core.win32/library/spawner.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "spawner"=.\spawner.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/core/org.eclipse.cdt.core.win32/library/starter/starter.cpp b/core/org.eclipse.cdt.core.win32/library/starter/starter.cpp
index 81df10d894..8aea36ac35 100644
--- a/core/org.eclipse.cdt.core.win32/library/starter/starter.cpp
+++ b/core/org.eclipse.cdt.core.win32/library/starter/starter.cpp
@@ -24,7 +24,7 @@
#include <stdio.h>
// #define DEBUG_MONITOR
-#define MAX_CMD_LINE_LENGTH (1024)
+#define MAX_CMD_LINE_LENGTH (2049)
int copyTo(char * target, const char * source, int cpyLength, int availSpace);

Back to the top