1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix pr 52562

This commit is contained in:
Alain Magloire 2004-02-24 23:10:55 +00:00
parent a26e6b67e2
commit 54e925ee1f
2 changed files with 16 additions and 9 deletions

View file

@ -1,3 +1,9 @@
2004-02-24 Alain Magloire
Fix for PR 52562 From Alex Chapiro
* utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java
2004-02-24 Alain Magloire
Fix for PR 52790
For "Windows 98" fall back to Runtime.exec(..)

View file

@ -29,16 +29,17 @@ public class EnvironmentReader {
InputStream in = null;
boolean check_ready = false;
boolean isWin32 = false;
if (OS.startsWith("windows 9") || OS.startsWith("windows me")) { // 95, 98, me
command = "command.com /c set";
//The buffered stream doesn't always like windows 98
check_ready = true;
isWin32 = true;
} else
if (OS.startsWith("windows ")) {
command = "cmd.exe /c set";
isWin32 = true;
}
try {
if (OS.indexOf("windows 9") > -1) {
command = "command.com /c set";
//The buffered stream doesn't always like windows 98
check_ready = true;
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();
BufferedReader br = new BufferedReader(new InputStreamReader(in));