mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
Patch from Thomas Fletcher to fix environment reading on win98
This commit is contained in:
parent
b9ffb7a6dc
commit
0ddf06d9e6
1 changed files with 7 additions and 0 deletions
|
@ -28,9 +28,13 @@ public class EnvironmentReader {
|
||||||
rawVars = new Vector(32);
|
rawVars = new Vector(32);
|
||||||
String command = "env";
|
String command = "env";
|
||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
|
boolean check_ready = false;
|
||||||
try {
|
try {
|
||||||
if (OS.indexOf("windows 9") > -1) {
|
if (OS.indexOf("windows 9") > -1) {
|
||||||
command = "command.com /c set";
|
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)) {
|
} else if ((OS.indexOf("nt") > -1) || (OS.indexOf("windows 2000") > -1)) {
|
||||||
command = "cmd.exe /c set";
|
command = "cmd.exe /c set";
|
||||||
}
|
}
|
||||||
|
@ -48,6 +52,9 @@ public class EnvironmentReader {
|
||||||
} else {
|
} else {
|
||||||
envVars.setProperty(line, "");
|
envVars.setProperty(line, "");
|
||||||
}
|
}
|
||||||
|
if(check_ready && br.ready() == false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Add table
Reference in a new issue