PR: 13047 Submitted by: Brian Farrar <brian_farrar at countrywide.com> git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273380 13f79535-47bb-0310-9956-ffa450edef68master
@@ -37,6 +37,11 @@ Fixed bugs: | |||||
* <junitreport> created an empty junit-noframes.html if no format had | * <junitreport> created an empty junit-noframes.html if no format had | ||||
been specified. | been specified. | ||||
* <basename> would remove more than it should if the file name | |||||
contained more than one dot. | |||||
* <property environment=... /> now works on OS/400. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
@@ -81,6 +86,8 @@ Other changes: | |||||
* The SOS and VSS tasks will no longer unconditionally prepend a $ to | * The SOS and VSS tasks will no longer unconditionally prepend a $ to | ||||
vsspath or projectpath. | vsspath or projectpath. | ||||
* OS/400 now gets detected by the os condition. | |||||
Changes from Ant 1.5beta3 to Ant 1.5 | Changes from Ant 1.5beta3 to Ant 1.5 | ||||
==================================== | ==================================== | ||||
@@ -94,6 +94,7 @@ the tests succeed. | |||||
<li>os/2 (for OS/2)</li> | <li>os/2 (for OS/2)</li> | ||||
<li>win9x for Microsoft Windows 95 and 98</li> | <li>win9x for Microsoft Windows 95 and 98</li> | ||||
<li>z/os for z/OS and OS/390</li> | <li>z/os for z/OS and OS/390</li> | ||||
<li>os/400 for OS/400</li> | |||||
</ul> | </ul> | ||||
<h4>equals</h4> | <h4>equals</h4> | ||||
@@ -238,7 +238,7 @@ public class Execute { | |||||
// Alternatively one could use: /bin/sh -c env | // Alternatively one could use: /bin/sh -c env | ||||
String[] cmd = {"/usr/bin/env"}; | String[] cmd = {"/usr/bin/env"}; | ||||
return cmd; | return cmd; | ||||
} else if (Os.isFamily("netware")) { | |||||
} else if (Os.isFamily("netware") || Os.isFamily("os/400")) { | |||||
String[] cmd = {"env"}; | String[] cmd = {"env"}; | ||||
return cmd; | return cmd; | ||||
} else { | } else { | ||||
@@ -259,7 +259,12 @@ public class Execute { | |||||
public static String toString(ByteArrayOutputStream bos) { | public static String toString(ByteArrayOutputStream bos) { | ||||
if (Os.isFamily("z/os")) { | if (Os.isFamily("z/os")) { | ||||
try { | try { | ||||
bos.toString("Cp1047"); | |||||
return bos.toString("Cp1047"); | |||||
} catch (java.io.UnsupportedEncodingException e) { | |||||
} | |||||
} else if (Os.isFamily("os/400")) { | |||||
try { | |||||
return bos.toString("Cp500"); | |||||
} catch (java.io.UnsupportedEncodingException e) { | } catch (java.io.UnsupportedEncodingException e) { | ||||
} | } | ||||
} | } | ||||
@@ -99,6 +99,7 @@ public class Os implements Condition { | |||||
* <li>windows</li> | * <li>windows</li> | ||||
* <li>win9x</li> | * <li>win9x</li> | ||||
* <li>z/os</li> | * <li>z/os</li> | ||||
* <li>os/400</li> | |||||
* </ul> | * </ul> | ||||
*/ | */ | ||||
public void setFamily(String f) {family = f.toLowerCase(Locale.US);} | public void setFamily(String f) {family = f.toLowerCase(Locale.US);} | ||||
@@ -224,6 +225,8 @@ public class Os implements Condition { | |||||
} else if (family.equals("z/os")) { | } else if (family.equals("z/os")) { | ||||
isFamily = osName.indexOf("z/os") > -1 | isFamily = osName.indexOf("z/os") > -1 | ||||
|| osName.indexOf("os/390") > -1; | || osName.indexOf("os/390") > -1; | ||||
} else if (family.equals("os/400")) { | |||||
isFamily = osName.indexOf("os/400") > -1; | |||||
} else { | } else { | ||||
throw new BuildException( | throw new BuildException( | ||||
"Don\'t know how to detect os family \"" | "Don\'t know how to detect os family \"" | ||||