Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Skiba <andrews@mono-cvs.ximian.com>2006-09-28 17:32:30 +0400
committerAndrew Skiba <andrews@mono-cvs.ximian.com>2006-09-28 17:32:30 +0400
commit9193ddbb24aef4a105f88ae5e88bcfc0f8532518 (patch)
tree53d0ce8939a365b0f8f54b3548591e05dfcd336e /mcs/class/System/System.IO.Ports
parentd1d30575e67ec7cb98b70a7ae34964fa84e2f88f (diff)
TARGET_JVM
svn path=/trunk/mcs/; revision=66027
Diffstat (limited to 'mcs/class/System/System.IO.Ports')
-rw-r--r--mcs/class/System/System.IO.Ports/ChangeLog4
-rw-r--r--mcs/class/System/System.IO.Ports/SerialPort.cs2
-rw-r--r--mcs/class/System/System.IO.Ports/WinSerialStream.cs4
3 files changed, 10 insertions, 0 deletions
diff --git a/mcs/class/System/System.IO.Ports/ChangeLog b/mcs/class/System/System.IO.Ports/ChangeLog
index b54138e95b4..bcb947fc5cc 100644
--- a/mcs/class/System/System.IO.Ports/ChangeLog
+++ b/mcs/class/System/System.IO.Ports/ChangeLog
@@ -1,3 +1,7 @@
+2006-09-28 Andrew Skiba <andrews@mainsoft.com>
+
+ * SerialPort.cs,WinSerialStream.cs: TARGET_JVM
+
2006-08-14 Chris Toshok <toshok@ximian.com>
* SerialPort.cs: the paths returned by Directory.GetFiles have the
diff --git a/mcs/class/System/System.IO.Ports/SerialPort.cs b/mcs/class/System/System.IO.Ports/SerialPort.cs
index 9b877279689..1131c326517 100644
--- a/mcs/class/System/System.IO.Ports/SerialPort.cs
+++ b/mcs/class/System/System.IO.Ports/SerialPort.cs
@@ -483,10 +483,12 @@ namespace System.IO.Ports
if (is_open)
throw new InvalidOperationException ("Port is already open");
+#if !TARGET_JVM
if (IsWindows) // Use windows kernel32 backend
stream = new WinSerialStream (port_name, baud_rate, data_bits, parity, stop_bits,
handshake, read_timeout, write_timeout, readBufferSize, writeBufferSize);
else // Use standard unix backend
+#endif
stream = new SerialPortStream (port_name, baud_rate, data_bits, parity, stop_bits, dtr_enable,
rts_enable, handshake, read_timeout, write_timeout, readBufferSize, writeBufferSize);
diff --git a/mcs/class/System/System.IO.Ports/WinSerialStream.cs b/mcs/class/System/System.IO.Ports/WinSerialStream.cs
index 8a197339df6..c517b289aec 100644
--- a/mcs/class/System/System.IO.Ports/WinSerialStream.cs
+++ b/mcs/class/System/System.IO.Ports/WinSerialStream.cs
@@ -231,6 +231,7 @@ namespace System.IO.Ports
throw new NotSupportedException();
}
+#if !TARGET_JVM
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool ReadFile (int handle, byte* buffer, int bytes_to_read,
out int bytes_read, IntPtr overlapped);
@@ -238,6 +239,7 @@ namespace System.IO.Ports
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool GetOverlappedResult (int handle, IntPtr overlapped,
ref int bytes_transfered, bool wait);
+#endif
public override int Read ([In, Out] byte [] buffer, int offset, int count)
{
@@ -274,9 +276,11 @@ namespace System.IO.Ports
return bytes_read;
}
+#if !TARGET_JVM
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool WriteFile (int handle, byte* buffer, int bytes_to_write,
out int bytes_written, IntPtr overlapped);
+#endif
public override void Write (byte [] buffer, int offset, int count)
{