Previously, we used the catch all OS=Unix property in MSBuild to
determine if we were building for Windows vs Unix, and we shared the
same MSIL between Linux and OSX. However, we have already started to
take dependencies on Linux specific APIs and we plan on using OSX
specific APIs very soon.
We don't want to try to ship MSIL that contains both Linux and OSX
specific implementations of a feature, so the build system needs to
change a little.
We'll continue to use the OS property as the entry point for the build
to specificy what platform you want to build for. However, we now have
three platforms:
1. Windows_NT
2. Linux
3. OSX
However, the value of the OS property should not be tested directly,
instead we introduce properties about the target platform itself:
1. TargetsWindows
2. TargetsUnix
3. TargetsLinux
4. TargetsOSX
Code which works the same across Linux and OSX should be guarded by
TargetsUnix (which is true when OS is either 'Linux' or 'OSX'). Code
specific to one OS can be guarded with either TargetsLinux or
TargetsUnix.
In this change, I have simply rewritten all the '$(OS)' == 'Unix'
conditions to '$(TargetsUnix)' == 'true'. A few libraries may do Linux
specific stuff, but we will clean up that debt when we go to flesh out
the OSX implementations.
Commit migrated from https://github.com/dotnet/corefx/commit/4d07173fbf86631d49ed56623581eff9cb7d3f87
but doesn't provide any real value.
This code is racing with a call to close on the handle. The check for IsHandleInvalid
returns false, but then someone closes the handle before this code runs. We'd
either need to lock or swallow the exception. This change ignores the assert since
1) it isn't giving us any new information, and 2) that's what the release code
has been doing anyways.
Commit migrated from https://github.com/dotnet/corefx/commit/2a856b52f0beb66d0647e50895678d31d074da00
The FileSystemWatcher implementation today does event arg allocations and string pattern matching for each event even if no event handler is registered to handle that event. This commit restructures things a little to avoid that unnecessary work.
Commit migrated from https://github.com/dotnet/corefx/commit/426d804b867aebf1900446a7920bc54e547b0474
After we'd done the Linux implementation, we started a convention elsewhere in corefx where everything that implements the PAL is above a particular comment, with everything else below. Just instituting that here as well.
Commit migrated from https://github.com/dotnet/corefx/commit/6e81f6bfea494c8881d66934063c072331710d88
- Refactor interop.inotify.cs
- Convert string comparison to use equals instead of Compare
- Update Resources to consume resource generation change commit
- Separate project from System.IO.FileSystem
- move sln into library directory
- Remove assemblyinfo because it is now auto-generated.
Commit migrated from https://github.com/dotnet/corefx/commit/a07b789661114f7d441605067a37d4c0f7e24557