Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix compilation on Silverlight/v2.

(cherry picked from commit ec42ff6)
  • Loading branch information...
commit 772599cedff39e78105bad4ff2039f65cca6661e 1 parent 007f48f
@jdhardy jdhardy authored
View
15 Languages/IronPython/IronPython/Runtime/PythonFile.cs
@@ -17,7 +17,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
@@ -25,6 +24,7 @@
using Microsoft.Scripting;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
+using Microsoft.Win32.SafeHandles;
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Operations;
@@ -32,7 +32,6 @@
#if FEATURE_NUMERICS
using System.Numerics;
-using Microsoft.Win32.SafeHandles;
#else
using Microsoft.Scripting.Math;
@@ -1785,6 +1784,7 @@ private enum PythonFileMode {
return this;
}
+#if FEATURE_NATIVE
public bool isatty() {
return IsConsole && !isRedirected();
}
@@ -1798,6 +1798,11 @@ private enum PythonFileMode {
}
return StreamRedirectionInfo.IsErrorRedirected;
}
+#else
+ public bool isatty() {
+ return IsConsole;
+ }
+#endif
public object __enter__() {
ThrowIfClosed();
@@ -1868,7 +1873,8 @@ private enum PythonFileMode {
#endregion
}
- #region dotnet45 backport
+#if FEATURE_NATIVE
+ // dotnet45 backport
// http://msdn.microsoft.com/en-us/library/system.console.isoutputredirected%28v=VS.110%29.aspx
internal static class StreamRedirectionInfo {
@@ -1900,7 +1906,6 @@ private enum StdHandle { Stdin = -10, Stdout = -11, Stderr = -12 };
private static Object InternalSyncObject {
get {
if (s_InternalSyncObject == null) {
- Contract.Ensures(Contract.Result<Object>() != null);
Object o = new Object();
Interlocked.CompareExchange<Object>(ref s_InternalSyncObject, o, null);
}
@@ -1968,5 +1973,5 @@ private enum StdHandle { Stdin = -10, Stdout = -11, Stderr = -12 };
}
}
}
- #endregion
+#endif
}
View
5 Solutions/Build.IronPython.proj
@@ -31,12 +31,13 @@
<BuildProject Include="$(Solution)">
<Properties>Configuration=v2$(BaseConfiguration)</Properties>
</BuildProject>
- <BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
+ <!-- Removed because of obsolesence. -->
+ <!--<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=WP7$(BaseConfiguration)</Properties>
</BuildProject>
<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=Silverlight4$(BaseConfiguration)</Properties>
- </BuildProject>
+ </BuildProject>-->
<BuildProject Include="$(Solution)" Condition=" '$(Mono)' != 'true' ">
<Properties>Configuration=Silverlight5$(BaseConfiguration)</Properties>
</BuildProject>
View
BIN  Util/References/WindowsPhone/7.1/Microsoft.Phone.dll
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.