You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
@@ -572,12 +572,10 @@ 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, dtr_enable,
|
||||
rts_enable, 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);
|
||||
|
||||
|
@@ -238,7 +238,6 @@ 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);
|
||||
@@ -246,7 +245,6 @@ 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)
|
||||
{
|
||||
@@ -283,11 +281,9 @@ 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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user