1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-07 09:05:24 +02:00
This commit is contained in:
David Inglis 2003-11-13 20:54:45 +00:00
parent f69b3bad49
commit 4fa34d40f6
2 changed files with 15 additions and 10 deletions

View file

@ -1,3 +1,7 @@
2003-11-13 David Inglis
Fixed #46431
* utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java
2003-11-06 David Inglis
Fix for 45737 & 45835

View file

@ -12,7 +12,6 @@ import java.io.InputStream;
import java.util.Properties;
import java.util.Vector;
public class EnvironmentReader {
private static Properties envVars = null;
private static Vector rawVars = null;
@ -29,16 +28,16 @@ public class EnvironmentReader {
String command = "env";
InputStream in = null;
boolean check_ready = false;
boolean isWin32 = false;
try {
if (OS.indexOf("windows 9") > -1) {
command = "command.com /c set";
//The buffered stream doesn't always like windows 98
check_ready = true;
} else if ((OS.indexOf("nt") > -1)
|| (OS.indexOf("windows 2000") > -1)
|| (OS.indexOf("windows xp") > -1)) {
isWin32 = true;
} else if ((OS.indexOf("nt") > -1) || (OS.indexOf("windows 2000") > -1) || (OS.indexOf("windows xp") > -1)) {
command = "cmd.exe /c set";
isWin32 = true;
}
p = ProcessFactory.getFactory().exec(command);
in = p.getInputStream();
@ -49,6 +48,8 @@ public class EnvironmentReader {
int idx = line.indexOf('=');
if (idx != -1) {
String key = line.substring(0, idx);
if (isWin32) //Since windows env ignores case let normalize to Upper here.
key = key.toUpperCase();
String value = line.substring(idx + 1);
envVars.setProperty(key, value);
} else {