// Jonathan Pryor (jonpryor@vt.edu)
//
// (C) 2004-2006 Jonathan Pryor
+// (C) 2007 Novell, Inc.
+//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
if (!CanRead)
throw new NotSupportedException ("Stream does not support reading");
+ if (buffer.Length == 0)
+ return 0;
+
long r = 0;
fixed (byte* buf = &buffer[offset]) {
do {
if (!CanRead)
throw new NotSupportedException ("Stream does not support reading");
+ if (buffer.Length == 0)
+ return 0;
+
long r = 0;
fixed (byte* buf = &buffer[offset]) {
do {
if (!CanWrite)
throw new NotSupportedException ("File Descriptor does not support writing");
+ if (buffer.Length == 0)
+ return;
+
long r = 0;
fixed (byte* buf = &buffer[offset]) {
do {
if (!CanWrite)
throw new NotSupportedException ("File Descriptor does not support writing");
+ if (buffer.Length == 0)
+ return;
+
long r = 0;
fixed (byte* buf = &buffer[offset]) {
do {