Skip to content
Browse files

Fix compilation on Silverlight/v2.

  • Loading branch information...
1 parent 25be8f7 commit ec42ff65e203974f250b563596cb69decc6ac34f @jdhardy jdhardy committed Feb 8, 2013
View
15 Languages/IronPython/IronPython/Runtime/PythonFile.cs
@@ -17,22 +17,21 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Diagnostics.Contracts;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using Microsoft.Scripting;
using Microsoft.Scripting.Runtime;
using Microsoft.Scripting.Utils;
+using Microsoft.Win32.SafeHandles;
using IronPython.Runtime.Exceptions;
using IronPython.Runtime.Operations;
using IronPython.Runtime.Types;
#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,9 +31,10 @@
<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=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.

0 comments on commit ec42ff6

Please sign in to comment.
Something went wrong with that request. Please try again.