From 54e925ee1f6314baaf5aa7fe8db81137f5a2db88 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Tue, 24 Feb 2004 23:10:55 +0000 Subject: [PATCH] Fix pr 52562 --- core/org.eclipse.cdt.core/ChangeLog | 6 ++++++ .../cdt/utils/spawner/EnvironmentReader.java | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index 1c5f2e311c7..e897d2f6c92 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -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(..) diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java index 285370a6b83..a3289822a48 100644 --- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java +++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/spawner/EnvironmentReader.java @@ -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));