Use new errno shim from managed code

Commit migrated from https://github.com/dotnet/corefx/commit/2b01345b2a925400569269b1149afd645c77b790
This commit is contained in:
Nick Guerrera committed 2015-08-06 06:52:01 +00:00
1 parent 5be428fd57
commit ef4deeef20
38 files changed
+321 -558

No files matched your search

@@ -45,9 +45,6 @@
<Compile Include="$(CommonPath)\Interop\Unix\libc\Interop.read.cs">
<Link>Common\Interop\Unix\libc\Interop.read.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\libc\Interop.strerror.cs">
<Link>Common\Interop\Unix\libc\Interop.strerror.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\Interop.Errors.cs">
<Link>Common\Interop\Unix\Interop.Errors.cs</Link>
</Compile>
@@ -63,9 +60,6 @@
<Compile Include="$(CommonPath)\Interop\Linux\libc\Interop.inotify.cs">
<Link>Common\Interop\Linux\Interop.inotify.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Linux\Interop.Errors.cs">
<Link>Common\Interop\Linux\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Unix\libc\Interop.poll.cs">
<Link>Common\Interop\Unix\Interop.poll.cs</Link>
</Compile>
@@ -84,9 +78,6 @@
<Compile Include="$(CommonPath)\Interop\OSX\Interop.Libraries.cs">
<Link>Common\Interop\OSX\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\OSX\Interop.Errors.cs">
<Link>Common\Interop\OSX\Interop.Errors.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\OSX\Interop.RunLoop.cs">
<Link>Common\Interop\OSX\Interop.RunLoop.cs</Link>
</Compile>
@@ -145,7 +145,7 @@ namespace System.IO
SafeCreateHandle path = Interop.CoreFoundation.CFStringCreateWithCString(_fullDirectory);
if (path.IsInvalid)
{
throw Interop.GetExceptionForIoErrno(Marshal.GetLastWin32Error(), _fullDirectory, true);
throw Interop.GetExceptionForIoErrno(Interop.System.GetLastErrorInfo(), _fullDirectory, true);
}
// Take the CFStringRef and put it into an array to pass to the EventStream
@@ -153,7 +153,7 @@ namespace System.IO
if (arrPaths.IsInvalid)
{
path.Dispose();
throw Interop.GetExceptionForIoErrno(Marshal.GetLastWin32Error(), _fullDirectory, true);
throw Interop.GetExceptionForIoErrno(Interop.System.GetLastErrorInfo(), _fullDirectory, true);
}
// Create the callback for the EventStream
@@ -173,7 +173,7 @@ namespace System.IO
{
arrPaths.Dispose();
path.Dispose();
throw Interop.GetExceptionForIoErrno(Marshal.GetLastWin32Error(), _fullDirectory, true);
throw Interop.GetExceptionForIoErrno(Interop.System.GetLastErrorInfo(), _fullDirectory, true);
}
// Create and start our watcher thread then wait for the thread to initialize and start