Since MOBILE implies NET_4_* now, take this into account and simplify our ifdefs.
[mono.git] / mcs / class / corlib / System.IO / UnmanagedMemoryStream.cs
index 131a186195e353cc5cbb5ff7101a436eafee15cd..4083e35d73b7df5f386cbbdeac9177dec5e23208 100644 (file)
@@ -45,7 +45,7 @@ namespace System.IO
                IntPtr initial_pointer;
                long initial_position;
                long current_position;
-#if NET_4_0 || MOBILE
+#if NET_4_0
                SafeBuffer safebuffer;
 #endif
                
@@ -70,7 +70,7 @@ namespace System.IO
                        Initialize (pointer, length, capacity, access);
                }
 
-#if NET_4_0 || MOBILE
+#if NET_4_0
                public UnmanagedMemoryStream (SafeBuffer buffer, long offset, long length) :
                        this (buffer, offset, length, FileAccess.Read)
                {
@@ -139,7 +139,7 @@ namespace System.IO
                [CLSCompliantAttribute (false)]
                public unsafe byte* PositionPointer {
                        get {
-#if NET_4_0 || MOBILE
+#if NET_4_0
                                if (safebuffer != null)
                                        throw new NotSupportedException ("Not supported when using SafeBuffer");
 #endif
@@ -151,7 +151,7 @@ namespace System.IO
                                return (byte *) initial_pointer + current_position;
                        }
                        set {
-#if NET_4_0 || MOBILE
+#if NET_4_0
                                if (safebuffer != null)
                                        throw new NotSupportedException ("Not supported when using SafeBuffer");
 #endif
@@ -188,7 +188,7 @@ namespace System.IO
                                return 0;
 
                        int progress = current_position + count < length ? count : (int) (length - current_position);
-#if NET_4_0 || MOBILE
+#if NET_4_0
                        if (safebuffer != null) {
                                unsafe {
                                        byte *ptr = null;
@@ -220,7 +220,7 @@ namespace System.IO
                        if (current_position >= length)
                                return (-1);
 
-#if NET_4_0 || MOBILE
+#if NET_4_0
                        if (safebuffer != null) {
                                unsafe {
                                        byte *ptr = null;
@@ -269,7 +269,7 @@ namespace System.IO
                 
                public override void SetLength (long value)
                {
-#if NET_4_0 || MOBILE
+#if NET_4_0
                        if (safebuffer != null)
                                throw new NotSupportedException ("Not supported when using SafeBuffer");
 #endif
@@ -320,7 +320,7 @@ namespace System.IO
                        if (fileaccess == FileAccess.Read)
                                throw new NotSupportedException ("Stream does not support writing.");
 
-#if NET_4_0 || MOBILE
+#if NET_4_0
                        if (safebuffer != null) {
                                unsafe {
                                        byte *dest = null;
@@ -360,7 +360,7 @@ namespace System.IO
                        if (fileaccess == FileAccess.Read)
                                throw new NotSupportedException("Stream does not support writing.");
  
-#if NET_4_0 || MOBILE
+#if NET_4_0
                        if (safebuffer != null) {
                                unsafe {
                                        byte *dest = null;
@@ -412,7 +412,7 @@ namespace System.IO
                        closed = false;
                }
 
-#if NET_4_0 || MOBILE
+#if NET_4_0
                protected void Initialize (SafeBuffer buffer, long offset, long length, FileAccess access)
                {
                        if (buffer == null)