diff --git a/src/Microsoft.PackageManagement.ArchiverProviders/project.json b/src/Microsoft.PackageManagement.ArchiverProviders/project.json index e77a58a207..5111eb3dee 100644 --- a/src/Microsoft.PackageManagement.ArchiverProviders/project.json +++ b/src/Microsoft.PackageManagement.ArchiverProviders/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.CoreProviders/project.json b/src/Microsoft.PackageManagement.CoreProviders/project.json index 0e206f0c88..d456919d20 100644 --- a/src/Microsoft.PackageManagement.CoreProviders/project.json +++ b/src/Microsoft.PackageManagement.CoreProviders/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.MetaProvider.PowerShell/project.json b/src/Microsoft.PackageManagement.MetaProvider.PowerShell/project.json index a9eeefb0cc..59bff5d34b 100644 --- a/src/Microsoft.PackageManagement.MetaProvider.PowerShell/project.json +++ b/src/Microsoft.PackageManagement.MetaProvider.PowerShell/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.MsiProvider/project.json b/src/Microsoft.PackageManagement.MsiProvider/project.json index 73ecc56920..19a20a4bae 100644 --- a/src/Microsoft.PackageManagement.MsiProvider/project.json +++ b/src/Microsoft.PackageManagement.MsiProvider/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.MsuProvider/project.json b/src/Microsoft.PackageManagement.MsuProvider/project.json index b810b1826e..6a28ff49f6 100644 --- a/src/Microsoft.PackageManagement.MsuProvider/project.json +++ b/src/Microsoft.PackageManagement.MsuProvider/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.NuGetProvider/NugetLightRequest.cs b/src/Microsoft.PackageManagement.NuGetProvider/NugetLightRequest.cs index 0c0721b46e..6f437885e7 100644 --- a/src/Microsoft.PackageManagement.NuGetProvider/NugetLightRequest.cs +++ b/src/Microsoft.PackageManagement.NuGetProvider/NugetLightRequest.cs @@ -171,7 +171,7 @@ // or $env:programfiles\NuGet\Packages\ if you are an admin. try { -#if LINUX +#if UNIX // there is only 1 installation location by default for linux ("HOME/.local/share/powershell/PackageManagement/NuGet/Packages") string basePath = CurrentUserDefaultInstallLocation; #else @@ -220,7 +220,7 @@ get { #if CORECLR -#if LINUX +#if UNIX return Path.Combine(Path.GetDirectoryName(Platform.SelectProductNameForDirectory(Platform.XDG_Type.DATA)), "PackageManagement", "NuGet", "Packages"); #else return Path.Combine(Environment.GetEnvironmentVariable("LocalAppData"), "PackageManagement", "NuGet", "Packages"); @@ -237,7 +237,7 @@ get { #if CORECLR -#if LINUX +#if UNIX return Path.Combine(Path.GetDirectoryName(Platform.SelectProductNameForDirectory(Platform.XDG_Type.DATA)), "PackageManagement", "NuGet", "Packages"); #else return Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles"), "NuGet", "Packages"); @@ -1302,7 +1302,7 @@ } } else { -#if LINUX +#if UNIX var appdataFolder = Path.GetDirectoryName(Platform.SelectProductNameForDirectory(Platform.XDG_Type.CONFIG)); #else var appdataFolder = Environment.GetEnvironmentVariable("appdata"); diff --git a/src/Microsoft.PackageManagement.NuGetProvider/project.json b/src/Microsoft.PackageManagement.NuGetProvider/project.json index 0782512d17..691c283669 100644 --- a/src/Microsoft.PackageManagement.NuGetProvider/project.json +++ b/src/Microsoft.PackageManagement.NuGetProvider/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/Extensions/PackageListExtensions.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/Extensions/PackageListExtensions.cs index d2cbc37cf6..bb7a4db329 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/Extensions/PackageListExtensions.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/Extensions/PackageListExtensions.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ExePackageInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ExePackageInstaller.cs index 48460ec703..a36cf34052 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ExePackageInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ExePackageInstaller.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs index 1b550844fa..54a580a7fd 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/NupkgInstaller.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListParser.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListParser.cs index b929a70a10..afb0cb0253 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListParser.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListParser.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX using System; using System.Collections.Generic; diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListProvider.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListProvider.cs index 8d04c9c0bd..bb13332301 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListProvider.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListProvider.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs index 8a204c0d09..7429a0815b 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageListRequest.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageQuery.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageQuery.cs index 4cffc3d706..2e1fbdb4d8 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageQuery.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageQuery.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageSource.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageSource.cs index 7f8b9f8614..51921a434c 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageSource.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PackageSource.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs index 46566e5a97..d7026a148e 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/PowerShellArtifactInstaller.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ProgressTracker.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ProgressTracker.cs index dd7b787eaf..8421ba0069 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ProgressTracker.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ProgressTracker.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/WebDownloader.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/WebDownloader.cs index dea74723e9..1fc2e7e584 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/WebDownloader.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/WebDownloader.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ZipPackageInstaller.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ZipPackageInstaller.cs index 8e4551ee7e..3bf9ecdb79 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ZipPackageInstaller.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/PackageList/ZipPackageInstaller.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/Sdk/Constants.cs b/src/Microsoft.PackageManagement.PackageSourceListProvider/Sdk/Constants.cs index 822b0dc176..83a1e2ccf1 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/Sdk/Constants.cs +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/Sdk/Constants.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX namespace Microsoft.PackageManagement.PackageSourceListProvider { diff --git a/src/Microsoft.PackageManagement.PackageSourceListProvider/project.json b/src/Microsoft.PackageManagement.PackageSourceListProvider/project.json index ab13f8b91b..1e9f817145 100644 --- a/src/Microsoft.PackageManagement.PackageSourceListProvider/project.json +++ b/src/Microsoft.PackageManagement.PackageSourceListProvider/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, @@ -68,4 +68,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/Microsoft.PackageManagement/Implementation/ProviderBase.cs b/src/Microsoft.PackageManagement/Implementation/ProviderBase.cs index 4a45876225..8228efd116 100644 --- a/src/Microsoft.PackageManagement/Implementation/ProviderBase.cs +++ b/src/Microsoft.PackageManagement/Implementation/ProviderBase.cs @@ -81,7 +81,7 @@ namespace Microsoft.PackageManagement.Internal.Implementation { /// public void SetSwidTag(string providerPath) { -#if !LINUX +#if !UNIX if (!string.IsNullOrWhiteSpace(providerPath)) { // check whether there is swidtag attached to the provider path diff --git a/src/Microsoft.PackageManagement/Implementation/ProviderServicesImpl.cs b/src/Microsoft.PackageManagement/Implementation/ProviderServicesImpl.cs index dc8a2e4c32..8065f479bd 100644 --- a/src/Microsoft.PackageManagement/Implementation/ProviderServicesImpl.cs +++ b/src/Microsoft.PackageManagement/Implementation/ProviderServicesImpl.cs @@ -177,7 +177,7 @@ namespace Microsoft.PackageManagement.Internal.Implementation { Debug(request, "Calling 'ProviderService::IsSignedAndTrusted, '{0}'", filename); // we are not using this function anywhere -#if !LINUX +#if !UNIX var wtd = new WinTrustData(filename); var result = NativeMethods.WinVerifyTrust(new IntPtr(-1), new Guid("{00AAC56B-CD44-11d0-8CC2-00C04FC295EE}"), wtd); diff --git a/src/Microsoft.PackageManagement/Utility/Extensions/ExceptionExtensions.cs b/src/Microsoft.PackageManagement/Utility/Extensions/ExceptionExtensions.cs index cbe50e4f67..ef5b600b3b 100644 --- a/src/Microsoft.PackageManagement/Utility/Extensions/ExceptionExtensions.cs +++ b/src/Microsoft.PackageManagement/Utility/Extensions/ExceptionExtensions.cs @@ -19,7 +19,7 @@ namespace Microsoft.PackageManagement.Internal.Utility.Extensions { internal static class ExceptionExtensions { public static void Dump(this Exception e) { -#if !LINUX +#if !UNIX var text = string.Format(CultureInfo.CurrentCulture, "{0}/{1}\r\n{2}", e.GetType().Name, e.Message, e.StackTrace); // for now, this is the only way we'll see exceptions in the wild. NativeMethods.OutputDebugString(text); diff --git a/src/Microsoft.PackageManagement/Utility/Extensions/FilesystemExtensions.cs b/src/Microsoft.PackageManagement/Utility/Extensions/FilesystemExtensions.cs index f3c9a8feb6..74888c932a 100644 --- a/src/Microsoft.PackageManagement/Utility/Extensions/FilesystemExtensions.cs +++ b/src/Microsoft.PackageManagement/Utility/Extensions/FilesystemExtensions.cs @@ -186,7 +186,7 @@ namespace Microsoft.PackageManagement.Internal.Utility.Extensions { // is this a unc path? if (string.IsNullOrWhiteSpace(pathUri.Host)) { -#if !LINUX +#if !UNIX // no, this is a drive:\path path // use API to resolve out the drive letter to see if it is a remote var drive = pathUri.Segments[1].Replace('/', '\\'); // the zero segment is always just '/' diff --git a/src/Microsoft.PackageManagement/Utility/Platform/AdminPrivilege.cs b/src/Microsoft.PackageManagement/Utility/Platform/AdminPrivilege.cs index 7c2b928e50..b9974203dd 100644 --- a/src/Microsoft.PackageManagement/Utility/Platform/AdminPrivilege.cs +++ b/src/Microsoft.PackageManagement/Utility/Platform/AdminPrivilege.cs @@ -27,7 +27,7 @@ namespace Microsoft.PackageManagement.Internal.Utility.Platform { /// public static bool IsElevated { get { -#if LINUX +#if UNIX return string.Equals(System.Environment.GetEnvironmentVariable("SUDO_UID"), "1000"); #else var id = WindowsIdentity.GetCurrent(); diff --git a/src/Microsoft.PackageManagement/Utility/Platform/Manifest.cs b/src/Microsoft.PackageManagement/Utility/Platform/Manifest.cs index 18e12998d7..8935298fb9 100644 --- a/src/Microsoft.PackageManagement/Utility/Platform/Manifest.cs +++ b/src/Microsoft.PackageManagement/Utility/Platform/Manifest.cs @@ -22,7 +22,7 @@ namespace Microsoft.PackageManagement.Internal.Utility.Platform { internal static class Manifest { private static readonly byte[] _utf = {0xef, 0xbb, 0xbf}; -#if !LINUX +#if !UNIX public static IEnumerable LoadFrom(string filename) { var manifests = new List(); diff --git a/src/Microsoft.PackageManagement/Utility/Platform/NativeMethods.cs b/src/Microsoft.PackageManagement/Utility/Platform/NativeMethods.cs index 6d33ffd9cd..99fc2f20a6 100644 --- a/src/Microsoft.PackageManagement/Utility/Platform/NativeMethods.cs +++ b/src/Microsoft.PackageManagement/Utility/Platform/NativeMethods.cs @@ -12,7 +12,7 @@ // limitations under the License. // -#if !LINUX +#if !UNIX namespace Microsoft.PackageManagement.Internal.Utility.Platform { using System; using System.Diagnostics.CodeAnalysis; diff --git a/src/Microsoft.PackageManagement/project.json b/src/Microsoft.PackageManagement/project.json index 582035f987..cf7c2e1d49 100644 --- a/src/Microsoft.PackageManagement/project.json +++ b/src/Microsoft.PackageManagement/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs index 2f5b7539e4..74eb649356 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs index 1a622ed288..8064122a15 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/Process.cs @@ -866,7 +866,7 @@ namespace Microsoft.PowerShell.Commands private static string RetrieveProcessUserName(Process process, Cmdlet cmdlet) { string userName = null; -#if LINUX +#if UNIX userName = Platform.NonWindowsGetUserFromPid(process.Id); #else IntPtr tokenUserInfo = IntPtr.Zero; diff --git a/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs b/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs index a1f5f20820..a15be18f79 100644 --- a/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs +++ b/src/Microsoft.PowerShell.Commands.Management/commands/management/TimeZoneCommands.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX using System; using System.Collections.Generic; diff --git a/src/Microsoft.PowerShell.Commands.Management/project.json b/src/Microsoft.PowerShell.Commands.Management/project.json index 3d76ca72c4..150e92de59 100644 --- a/src/Microsoft.PowerShell.Commands.Management/project.json +++ b/src/Microsoft.PowerShell.Commands.Management/project.json @@ -15,7 +15,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs index e34d059881..90bce23ca5 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. --********************************************************************/ diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs index 3afd1b769a..adfb057267 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs @@ -286,7 +286,7 @@ namespace Microsoft.PowerShell -#if LINUX +#if UNIX /// /// /// The break handler for the program. Dispatches a break event to the current Executor. @@ -466,7 +466,7 @@ namespace Microsoft.PowerShell // call the console APIs directly, instead of ui.rawui.FlushInputHandle, as ui may be finalized // already if this thread is lagging behind the main thread. -#if !LINUX +#if !UNIX ConsoleHandle handle = ConsoleControl.GetConioDeviceHandle(); ConsoleControl.FlushConsoleInputBuffer(handle); #endif @@ -1064,7 +1064,7 @@ namespace Microsoft.PowerShell private void BindBreakHandler() { -#if LINUX +#if UNIX Console.CancelKeyPress += new ConsoleCancelEventHandler(MyBreakHandler); #else breakHandlerGcHandle = GCHandle.Alloc(new ConsoleControl.BreakHandler(MyBreakHandler)); @@ -1123,7 +1123,7 @@ namespace Microsoft.PowerShell { if (!isDisposed) { -#if !LINUX +#if !UNIX Dbg.Assert(breakHandlerGcHandle != null, "break handler should be set"); ConsoleControl.RemoveBreakHandler(); breakHandlerGcHandle.Free(); @@ -2872,7 +2872,7 @@ namespace Microsoft.PowerShell /// private RunspaceRef runspaceRef; -#if !LINUX +#if !UNIX private GCHandle breakHandlerGcHandle; #endif private System.Threading.Thread breakHandlerThread; diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index 24307ce22d..ceb375ac45 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. --********************************************************************/ diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs index 14bf57e1c3..c720693d70 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostUserInterface.cs @@ -14,7 +14,7 @@ using System.Management.Automation.Internal; using System.Management.Automation.Host; using System.Security; using Dbg = System.Management.Automation.Diagnostics; -#if !LINUX +#if !UNIX using ConsoleHandle = Microsoft.Win32.SafeHandles.SafeFileHandle; #endif @@ -61,7 +61,7 @@ namespace Microsoft.PowerShell this.parent = parent; this.rawui = new ConsoleHostRawUserInterface(this); -#if LINUX +#if UNIX this._supportsVirtualTerminal = true; #else try @@ -297,7 +297,7 @@ namespace Microsoft.PowerShell null; SecureString secureResult = new SecureString(); StringBuilder result = new StringBuilder(); -#if LINUX +#if UNIX bool treatControlCAsInput = Console.TreatControlCAsInput; #else ConsoleHandle handle = ConsoleControl.GetConioDeviceHandle(); @@ -309,7 +309,7 @@ namespace Microsoft.PowerShell try { -#if LINUX +#if UNIX Console.TreatControlCAsInput = true; #else // Ensure that we're in the proper line-input mode. @@ -349,14 +349,14 @@ namespace Microsoft.PowerShell // end up having a immutable string holding the // secret in memory. // -#if LINUX +#if UNIX ConsoleKeyInfo keyInfo = Console.ReadKey(true); #else uint unused = 0; string key = ConsoleControl.ReadConsole(handle, string.Empty, 1, false, out unused); #endif -#if LINUX +#if UNIX // Handle Ctrl-C ending input if (keyInfo.Key == ConsoleKey.C && keyInfo.Modifiers.HasFlag(ConsoleModifiers.Control)) #else @@ -366,7 +366,7 @@ namespace Microsoft.PowerShell PipelineStoppedException e = new PipelineStoppedException(); throw e; } -#if LINUX +#if UNIX if (keyInfo.Key == ConsoleKey.Enter) #else if ((char)13 == key[0]) @@ -377,7 +377,7 @@ namespace Microsoft.PowerShell // break; } -#if LINUX +#if UNIX if (keyInfo.Key == ConsoleKey.Backspace) #else if ((char)8 == key[0]) @@ -397,7 +397,7 @@ namespace Microsoft.PowerShell WriteBackSpace(originalCursorPos); } } -#if LINUX +#if UNIX else if (Char.IsControl(keyInfo.KeyChar)) { // blacklist control characters @@ -411,7 +411,7 @@ namespace Microsoft.PowerShell // if (isSecureString) { -#if LINUX +#if UNIX secureResult.AppendChar(keyInfo.KeyChar); #else secureResult.AppendChar(key[0]); @@ -419,7 +419,7 @@ namespace Microsoft.PowerShell } else { -#if LINUX +#if UNIX result.Append(keyInfo.KeyChar); #else result.Append(key); @@ -433,7 +433,7 @@ namespace Microsoft.PowerShell } while (true); } -#if LINUX +#if UNIX catch (InvalidOperationException) { // ReadKey() failed so we stop @@ -442,7 +442,7 @@ namespace Microsoft.PowerShell #endif finally { -#if LINUX +#if UNIX Console.TreatControlCAsInput = treatControlCAsInput; #else if (isModeChanged) @@ -573,7 +573,7 @@ namespace Microsoft.PowerShell } -#if !LINUX +#if !UNIX /// /// /// If is set on , unset it and return true; @@ -611,7 +611,7 @@ namespace Microsoft.PowerShell internal void WriteToConsole(string value, bool transcribeResult) { -#if !LINUX +#if !UNIX ConsoleHandle handle = ConsoleControl.GetActiveScreenBufferHandle(); // Ensure that we're in the proper line-output mode. We don't lock here as it does not matter if we @@ -634,7 +634,7 @@ namespace Microsoft.PowerShell // This is atomic, so we don't lock here... -#if !LINUX +#if !UNIX ConsoleControl.WriteConsole(handle, value); #else Console.Out.Write(value); @@ -1691,7 +1691,7 @@ namespace Microsoft.PowerShell PreRead(); // Ensure that we're in the proper line-input mode. -#if !LINUX +#if !UNIX ConsoleHandle handle = ConsoleControl.GetConioDeviceHandle(); ConsoleControl.ConsoleModes m = ConsoleControl.GetMode(handle); @@ -1723,7 +1723,7 @@ namespace Microsoft.PowerShell // If input is terminated with a break key (Ctrl-C, Ctrl-Break, Close, etc.), then the buffer will be // the empty string. -#if LINUX +#if UNIX // For Unix systems, we implement a basic readline loop around Console.ReadKey(), that // supports backspace, arrow keys, Ctrl-C, and Ctrl-D. This readline is only used for // interactive prompts (like Read-Host), otherwise it is assumed that PSReadLine is @@ -1748,14 +1748,14 @@ namespace Microsoft.PowerShell #endif do { -#if LINUX +#if UNIX keyInfo = Console.ReadKey(true); #else s += ConsoleControl.ReadConsole(handle, initialContent, maxInputLineLength, endOnTab, out keyState); Dbg.Assert(s != null, "s should never be null"); #endif -#if LINUX +#if UNIX // Handle Ctrl-C ending input if (keyInfo.Key == ConsoleKey.C && keyInfo.Modifiers.HasFlag(ConsoleModifiers.Control)) #else @@ -1774,14 +1774,14 @@ namespace Microsoft.PowerShell break; } -#if LINUX +#if UNIX if (keyInfo.Key == ConsoleKey.Enter) #else if (s.EndsWith(Crlf, StringComparison.CurrentCulture)) #endif { result = ReadLineResult.endedOnEnter; -#if LINUX +#if UNIX // We're intercepting characters, so we need to echo the newline Console.Out.WriteLine(); #else @@ -1790,7 +1790,7 @@ namespace Microsoft.PowerShell break; } -#if LINUX +#if UNIX if (keyInfo.Key == ConsoleKey.Tab) { // This is unsupported @@ -1847,7 +1847,7 @@ namespace Microsoft.PowerShell break; } #endif -#if LINUX +#if UNIX if (keyInfo.Key == ConsoleKey.Backspace) { if (index > 0) @@ -1969,7 +1969,7 @@ namespace Microsoft.PowerShell "s should only be null if input ended with a break"); return s; -#if LINUX +#if UNIX } finally { @@ -1978,7 +1978,7 @@ namespace Microsoft.PowerShell #endif } -#if !LINUX +#if !UNIX /// /// Get the character at the cursor when the user types 'tab' in the middle of line. /// @@ -2052,7 +2052,7 @@ namespace Microsoft.PowerShell ReadLineResult rlResult = ReadLineResult.endedOnEnter; -#if !LINUX +#if !UNIX ConsoleHandle handle = ConsoleControl.GetActiveScreenBufferHandle(); string lastCompletion = ""; @@ -2086,7 +2086,7 @@ namespace Microsoft.PowerShell break; } -#if LINUX // Portable code only ends on enter (or no input), so tab is not processed +#if UNIX // Portable code only ends on enter (or no input), so tab is not processed throw new PlatformNotSupportedException("This readline state is unsupported in portable code!"); #else @@ -2212,7 +2212,7 @@ namespace Microsoft.PowerShell return input; } -#if !LINUX +#if !UNIX private void SendLeftArrows(int length) { var inputs = new ConsoleControl.INPUT[length * 2]; diff --git a/src/Microsoft.PowerShell.ConsoleHost/project.json b/src/Microsoft.PowerShell.ConsoleHost/project.json index 4e3f52bbc0..14c5c49b68 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/project.json +++ b/src/Microsoft.PowerShell.ConsoleHost/project.json @@ -51,7 +51,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json index bcf196c5de..841c27e46f 100644 --- a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json +++ b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json @@ -13,7 +13,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs b/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs index fbd0c867c5..47a7a81185 100644 --- a/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs +++ b/src/Microsoft.PowerShell.PSReadLine/Cmdlets.cs @@ -73,7 +73,7 @@ namespace Microsoft.PowerShell public class PSConsoleReadlineOptions { -#if LINUX // TODO: why different schemes for LINUX? +#if UNIX // TODO: why different schemes for LINUX? public const ConsoleColor DefaultCommentForegroundColor = ConsoleColor.Magenta; public const ConsoleColor DefaultOperatorForegroundColor = ConsoleColor.Gray; public const ConsoleColor DefaultParameterForegroundColor = ConsoleColor.Green; @@ -93,7 +93,7 @@ namespace Microsoft.PowerShell public const ConsoleColor DefaultErrorForegroundColor = ConsoleColor.Red; public const EditMode DefaultEditMode = -#if LINUX +#if UNIX EditMode.Emacs; #else EditMode.Windows; @@ -168,7 +168,7 @@ namespace Microsoft.PowerShell HistorySaveStyle = DefaultHistorySaveStyle; string historyFileName = hostName + "_history.txt"; -#if LINUX +#if UNIX // PSReadline does not have access to Utils.CorePSPlatform. Must set PSReadline path separately string historyPath = System.Environment.GetEnvironmentVariable("XDG_DATA_HOME"); diff --git a/src/Microsoft.PowerShell.PSReadLine/ConsoleKeyChordConverter.cs b/src/Microsoft.PowerShell.PSReadLine/ConsoleKeyChordConverter.cs index 32722153dd..eb108b41e8 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ConsoleKeyChordConverter.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ConsoleKeyChordConverter.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -#if LINUX +#if UNIX using System.Reflection; #endif using System.Runtime.InteropServices; @@ -214,7 +214,7 @@ namespace Microsoft.PowerShell { // default for unprintables and unhandled char keyChar = '\u0000'; -#if LINUX +#if UNIX Type keyType = typeof (Keys); FieldInfo[] keyFields = keyType.GetFields(); diff --git a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs index e985f4d43e..17ef3de2a5 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ConsoleLib.cs @@ -314,13 +314,13 @@ namespace Microsoft.PowerShell.Internal public char UnicodeChar; public ConsoleColor ForegroundColor; public ConsoleColor BackgroundColor; -#if !LINUX +#if !UNIX public bool IsLeadByte; public bool IsTrailByte; #endif public bool Inverse; -#if !LINUX +#if !UNIX public CHAR_INFO ToCharInfo() { int fg = (int) ForegroundColor; @@ -386,7 +386,7 @@ namespace Microsoft.PowerShell.Internal sb.Append("Alt"); } -#if LINUX +#if UNIX if (sb.Length > 0) sb.Append("+"); // TODO: find better way to map these characters to something more friendly @@ -429,7 +429,7 @@ namespace Microsoft.PowerShell.Internal } } -#if !LINUX +#if !UNIX internal class ConhostConsole : IConsole { [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] diff --git a/src/Microsoft.PowerShell.PSReadLine/KeyBindings.cs b/src/Microsoft.PowerShell.PSReadLine/KeyBindings.cs index b543aef8a1..f4843b3c4f 100644 --- a/src/Microsoft.PowerShell.PSReadLine/KeyBindings.cs +++ b/src/Microsoft.PowerShell.PSReadLine/KeyBindings.cs @@ -161,7 +161,7 @@ namespace Microsoft.PowerShell { Keys.CtrlSpace, MakeKeyHandler(MenuComplete, "MenuComplete") }, { Keys.Tab, MakeKeyHandler(TabCompleteNext, "TabCompleteNext") }, { Keys.ShiftTab, MakeKeyHandler(TabCompletePrevious, "TabCompletePrevious") }, -#if !LINUX +#if !UNIX { Keys.VolumeDown, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeUp, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeMute, MakeKeyHandler(Ignore, "Ignore") }, @@ -200,7 +200,7 @@ namespace Microsoft.PowerShell { Keys.ShiftF3, MakeKeyHandler(CharacterSearchBackward, "CharacterSearchBackward") }, { Keys.F8, MakeKeyHandler(HistorySearchBackward, "HistorySearchBackward") }, { Keys.ShiftF8, MakeKeyHandler(HistorySearchForward, "HistorySearchForward") }, -#if !LINUX +#if !UNIX { Keys.PageUp, MakeKeyHandler(ScrollDisplayUp, "ScrollDisplayUp") }, { Keys.PageDown, MakeKeyHandler(ScrollDisplayDown, "ScrollDisplayDown") }, { Keys.CtrlPageUp, MakeKeyHandler(ScrollDisplayUpLine, "ScrollDisplayUpLine") }, @@ -284,7 +284,7 @@ namespace Microsoft.PowerShell { Keys.AltPeriod, MakeKeyHandler(YankLastArg, "YankLastArg") }, { Keys.AltUnderbar, MakeKeyHandler(YankLastArg, "YankLastArg") }, { Keys.AltCtrlY, MakeKeyHandler(YankNthArg, "YankNthArg") }, -#if !LINUX +#if !UNIX { Keys.VolumeDown, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeUp, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeMute, MakeKeyHandler(Ignore, "Ignore") }, diff --git a/src/Microsoft.PowerShell.PSReadLine/KeyBindings.vi.cs b/src/Microsoft.PowerShell.PSReadLine/KeyBindings.vi.cs index 29cfa61b31..eb6f76da62 100644 --- a/src/Microsoft.PowerShell.PSReadLine/KeyBindings.vi.cs +++ b/src/Microsoft.PowerShell.PSReadLine/KeyBindings.vi.cs @@ -70,7 +70,7 @@ namespace Microsoft.PowerShell { Keys.Tab, MakeKeyHandler(ViTabCompleteNext, "ViTabCompleteNext") }, { Keys.ShiftTab, MakeKeyHandler(ViTabCompletePrevious, "ViTabCompletePrevious") }, { Keys.CtrlV, MakeKeyHandler(Paste, "Paste") }, -#if !LINUX +#if !UNIX { Keys.VolumeDown, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeUp, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeMute, MakeKeyHandler(Ignore, "Ignore") }, @@ -109,7 +109,7 @@ namespace Microsoft.PowerShell { Keys.Tab, MakeKeyHandler(TabCompleteNext, "TabCompleteNext") }, { Keys.ShiftTab, MakeKeyHandler(TabCompletePrevious, "TabCompletePrevious") }, { Keys.CtrlV, MakeKeyHandler(Paste, "Paste") }, -#if !LINUX +#if !UNIX { Keys.VolumeDown, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeUp, MakeKeyHandler(Ignore, "Ignore") }, { Keys.VolumeMute, MakeKeyHandler(Ignore, "Ignore") }, diff --git a/src/Microsoft.PowerShell.PSReadLine/Keys.cs b/src/Microsoft.PowerShell.PSReadLine/Keys.cs index 94c5667165..25b5944414 100644 --- a/src/Microsoft.PowerShell.PSReadLine/Keys.cs +++ b/src/Microsoft.PowerShell.PSReadLine/Keys.cs @@ -290,7 +290,7 @@ namespace Microsoft.PowerShell public static ConsoleKeyInfo ShiftF8 = new ConsoleKeyInfo((char)0, ConsoleKey.F8, true, false, false); // Keys to ignore -#if !LINUX +#if !UNIX public static ConsoleKeyInfo VolumeUp = new ConsoleKeyInfo((char)0, /*ConsoleKey.VolumeUp*/(ConsoleKey)175, false, false, false); public static ConsoleKeyInfo VolumeDown = new ConsoleKeyInfo((char)0, /*ConsoleKey.VolumeDown*/(ConsoleKey)174, false, false, false); public static ConsoleKeyInfo VolumeMute = new ConsoleKeyInfo((char)0, /*ConsoleKey.VolumeMute*/(ConsoleKey)173, false, false, false); diff --git a/src/Microsoft.PowerShell.PSReadLine/Movement.cs b/src/Microsoft.PowerShell.PSReadLine/Movement.cs index 52c1983f0d..a413ef63df 100644 --- a/src/Microsoft.PowerShell.PSReadLine/Movement.cs +++ b/src/Microsoft.PowerShell.PSReadLine/Movement.cs @@ -434,7 +434,7 @@ namespace Microsoft.PowerShell public static void ClearScreen(ConsoleKeyInfo? key = null, object arg = null) { var console = _singleton._console; -#if LINUX // TODO: this is not correct, it should only scroll +#if UNIX // TODO: this is not correct, it should only scroll console.Clear(); _singleton._initialY = 0; _singleton.Render(); diff --git a/src/Microsoft.PowerShell.PSReadLine/PublicAPI.cs b/src/Microsoft.PowerShell.PSReadLine/PublicAPI.cs index 03f1d6707c..8827a09706 100644 --- a/src/Microsoft.PowerShell.PSReadLine/PublicAPI.cs +++ b/src/Microsoft.PowerShell.PSReadLine/PublicAPI.cs @@ -55,7 +55,7 @@ namespace Microsoft.PowerShell void StartRender(); int LengthInBufferCells(char c); void EndRender(); -#if LINUX +#if UNIX void Clear(); #endif } diff --git a/src/Microsoft.PowerShell.PSReadLine/ReadLine.cs b/src/Microsoft.PowerShell.PSReadLine/ReadLine.cs index 3601670c7e..609a319585 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ReadLine.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ReadLine.cs @@ -34,7 +34,7 @@ namespace Microsoft.PowerShell private IConsole _console; private EngineIntrinsics _engineIntrinsics; -#if !LINUX +#if !UNIX private static GCHandle _breakHandlerGcHandle; #endif private Thread _readKeyThread; @@ -479,7 +479,7 @@ namespace Microsoft.PowerShell private PSConsoleReadLine() { _mockableMethods = this; -#if LINUX +#if UNIX _console = new TTYConsole(); #else _console = new ConhostConsole(); @@ -558,7 +558,7 @@ namespace Microsoft.PowerShell _statusIsErrorMessage = false; _consoleBuffer = ReadBufferLines(_initialY, 1 + Options.ExtraPromptLineCount); -#if LINUX // TODO: not necessary if ReadBufferLines worked, or if rendering worked on spans instead of complete lines +#if UNIX // TODO: not necessary if ReadBufferLines worked, or if rendering worked on spans instead of complete lines string newPrompt = GetPrompt(); for (int i=0; i(Options.MaximumKillRingCount); -#if !LINUX +#if !UNIX _breakHandlerGcHandle = GCHandle.Alloc(new BreakHandler(_singleton.BreakHandler)); NativeMethods.SetConsoleCtrlHandler((BreakHandler)_breakHandlerGcHandle.Target, true); #endif @@ -865,7 +865,7 @@ namespace Microsoft.PowerShell _singleton._initialX = _singleton._console.CursorLeft; _singleton._consoleBuffer = ReadBufferLines(_singleton._initialY, 1 + _singleton.Options.ExtraPromptLineCount); -#if LINUX // TODO: ReadBufferLines only needed for extra line, but doesn't work on Linux +#if UNIX // TODO: ReadBufferLines only needed for extra line, but doesn't work on Linux for (int i=0; i 1) { _consoleBuffer[j].UnicodeChar = charToRender; @@ -313,7 +313,7 @@ namespace Microsoft.PowerShell if ((_initialY + bufferLineCount) > (_console.WindowTop + _console.WindowHeight)) { -#if !LINUX // TODO: verify this isn't necessary for LINUX +#if !UNIX // TODO: verify this isn't necessary for LINUX _console.WindowTop = _initialY + bufferLineCount - _console.WindowHeight; #endif } @@ -466,7 +466,7 @@ namespace Microsoft.PowerShell // to invert only the lower 3 bits to change the color is somewhat // but looks best with the 2 default color schemes - starting PowerShell // from it's shortcut or from a cmd shortcut. -#if LINUX // TODO: set Inverse attribute and let render choose what to do. +#if UNIX // TODO: set Inverse attribute and let render choose what to do. ConsoleColor tempColor = (foregroundColor == UnknownColor) ? ConsoleColor.White : foregroundColor; foregroundColor = (backgroundColor == UnknownColor) ? ConsoleColor.Black : backgroundColor; backgroundColor = tempColor; @@ -656,7 +656,7 @@ namespace Microsoft.PowerShell case BellStyle.None: break; case BellStyle.Audible: -#if LINUX +#if UNIX Console.Beep(); #else Console.Beep(Options.DingTone, Options.DingDuration); @@ -690,7 +690,7 @@ namespace Microsoft.PowerShell #region Screen scrolling -#if !LINUX +#if !UNIX /// /// Scroll the display up one screen. /// diff --git a/src/Microsoft.PowerShell.PSReadLine/ScreenCapture.cs b/src/Microsoft.PowerShell.PSReadLine/ScreenCapture.cs index 85bfcc42ba..e35d83a5c5 100644 --- a/src/Microsoft.PowerShell.PSReadLine/ScreenCapture.cs +++ b/src/Microsoft.PowerShell.PSReadLine/ScreenCapture.cs @@ -2,7 +2,7 @@ Copyright (c) Microsoft Corporation. All rights reserved. --********************************************************************/ -#if !LINUX +#if !UNIX using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; diff --git a/src/Microsoft.PowerShell.PSReadLine/project.json b/src/Microsoft.PowerShell.PSReadLine/project.json index 5addba2b97..ca228c8a64 100644 --- a/src/Microsoft.PowerShell.PSReadLine/project.json +++ b/src/Microsoft.PowerShell.PSReadLine/project.json @@ -13,7 +13,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs index 72239c99f9..5f2d1f9e02 100644 --- a/src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs +++ b/src/Microsoft.PowerShell.PackageManagement/Cmdlets/CmdletBase.cs @@ -477,7 +477,7 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets { #region Event and telemetry stuff //Calling PowerShell Telemetry APIs protected void TraceMessage(string message, SoftwareIdentity swidObject) { -#if !LINUX +#if !UNIX TelemetryAPI.TraceMessage(message, new { PackageName = swidObject.Name, @@ -510,7 +510,7 @@ namespace Microsoft.PowerShell.PackageManagement.Cmdlets { protected void LogEvent(EventTask task, EventId id, string context, string name, string version, string providerName, string source, string status, string destinationPath) { -#if !LINUX +#if !UNIX var iis = InitialSessionState.CreateDefault2(); using (Runspace rs = RunspaceFactory.CreateRunspace(iis)) diff --git a/src/Microsoft.PowerShell.PackageManagement/project.json b/src/Microsoft.PowerShell.PackageManagement/project.json index 9a4687c9aa..818dd6d1e5 100644 --- a/src/Microsoft.PowerShell.PackageManagement/project.json +++ b/src/Microsoft.PowerShell.PackageManagement/project.json @@ -10,7 +10,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": ["LINUX"] + "define": ["UNIX"] } } }, diff --git a/src/Microsoft.PowerShell.Security/project.json b/src/Microsoft.PowerShell.Security/project.json index 9da2c78a0f..da0bbddea7 100644 --- a/src/Microsoft.PowerShell.Security/project.json +++ b/src/Microsoft.PowerShell.Security/project.json @@ -15,7 +15,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs b/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs index 76656c6f4f..46ba8b97ca 100644 --- a/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs +++ b/src/Microsoft.PowerShell.Security/security/CatalogCommands.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs b/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs index 59a864d01c..94e35a3ac3 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsExtensions.cs @@ -893,7 +893,7 @@ namespace System.Management.Automation return GetEnvironmentVariables(); } -#if LINUX +#if UNIX return null; #else @@ -954,7 +954,7 @@ namespace System.Management.Automation return System.Environment.GetEnvironmentVariable(variable); } -#if LINUX +#if UNIX return null; #else diff --git a/src/System.Management.Automation/CoreCLR/CorePsStub.cs b/src/System.Management.Automation/CoreCLR/CorePsStub.cs index ae56706546..7dda497c8c 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsStub.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsStub.cs @@ -1409,7 +1409,7 @@ namespace System.Management.Automation.Security } -#if LINUX +#if UNIX // Porting note: Tracing is absolutely not available on Linux namespace System.Management.Automation.Tracing diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj index ab678c2578..1d4b3222c5 100644 --- a/src/System.Management.Automation/System.Management.Automation.csproj +++ b/src/System.Management.Automation/System.Management.Automation.csproj @@ -19,7 +19,7 @@ bin\UNIX\ - DEBUG;CORECLR;LINUX;NOT_SIGNED + DEBUG;CORECLR;UNIX;NOT_SIGNED bin\CORECLR\ diff --git a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs index d3fba6c141..51cb463a5d 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs @@ -4464,7 +4464,7 @@ namespace System.Management.Automation internal static List GetFileShares(string machine, bool ignoreHidden) { -#if LINUX +#if UNIX return new List(); #else IntPtr shBuf; diff --git a/src/System.Management.Automation/engine/CommandDiscovery.cs b/src/System.Management.Automation/engine/CommandDiscovery.cs index 23c95b4324..e56dbc57e5 100644 --- a/src/System.Management.Automation/engine/CommandDiscovery.cs +++ b/src/System.Management.Automation/engine/CommandDiscovery.cs @@ -1905,7 +1905,7 @@ namespace System.Management.Automation { string result = null; -#if !LINUX +#if !UNIX try { RegistryKey shellKey = Registry.LocalMachine.OpenSubKey(Utils.GetRegistryConfigurationPath(shellID)); diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index d53c3ce962..60c9e0c456 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -5286,8 +5286,8 @@ end "Stop-Service", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), new SessionStateAliasEntry("sv", "Set-Variable", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), -// Porting note: #if !LINUX is used to disable alises for cmdlets which conflict with Linux / OS X -#if !LINUX +// Porting note: #if !UNIX is used to disable alises for cmdlets which conflict with Linux / OS X +#if !UNIX // ac is a native command on OS X new SessionStateAliasEntry("ac", "Add-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), @@ -5510,14 +5510,14 @@ if($paths) { SessionStateFunctionEntry.GetDelayParsedFunctionEntry("more", DefaultMoreFunctionText, isProductCode: true), SessionStateFunctionEntry.GetDelayParsedFunctionEntry("help", GetHelpPagingFunctionText(), isProductCode: true), // Porting note: we remove mkdir on Linux because it is a conflict - #if !LINUX + #if !UNIX SessionStateFunctionEntry.GetDelayParsedFunctionEntry("mkdir", GetMkdirFunctionText(), isProductCode: true), #endif SessionStateFunctionEntry.GetDelayParsedFunctionEntry("Get-Verb", GetGetVerbText(), isProductCode: true), SessionStateFunctionEntry.GetDelayParsedFunctionEntry("oss", GetOSTFunctionText(), isProductCode: true), // Porting note: we remove the drive functions from Linux because they make no sense - #if !LINUX + #if !UNIX // Default drives SessionStateFunctionEntry.GetDelayParsedFunctionEntry("A:", DefaultSetDriveFunctionText, SetDriveScriptBlock), SessionStateFunctionEntry.GetDelayParsedFunctionEntry("B:", DefaultSetDriveFunctionText, SetDriveScriptBlock), diff --git a/src/System.Management.Automation/engine/PSVersionInfo.cs b/src/System.Management.Automation/engine/PSVersionInfo.cs index a6c3c31629..0414668471 100644 --- a/src/System.Management.Automation/engine/PSVersionInfo.cs +++ b/src/System.Management.Automation/engine/PSVersionInfo.cs @@ -103,7 +103,7 @@ namespace System.Management.Automation { Version version = null; -#if !LINUX +#if !UNIX try { using (RegistryKey wsManStackVersionKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\WSMAN")) diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index 2fbf8d9dc9..0d06b776ed 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -87,7 +87,7 @@ namespace System.Management.Automation CommandOrigin origin, PSHost host) { -#if LINUX +#if UNIX // TODO:PSL this is a workaround since the exception below // hides the internal issue of what's going on in terms of // execution policy. diff --git a/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs b/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs index 6de20eee21..6181890681 100644 --- a/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs +++ b/src/System.Management.Automation/engine/SessionStateDriveAPIs.cs @@ -1469,7 +1469,7 @@ namespace System.Management.Automation bool driveIsValid = true; // If the drive is auto-mounted, ensure that it still exists, or remove the drive. -#if !LINUX +#if !UNIX if (drive.IsAutoMounted || IsAStaleVhdMountedDrive(drive)) { driveIsValid = ValidateOrRemoveAutoMountedDrive(drive, lookupScope); diff --git a/src/System.Management.Automation/engine/Utils.cs b/src/System.Management.Automation/engine/Utils.cs index 13dcbe63b3..fd53861df1 100644 --- a/src/System.Management.Automation/engine/Utils.cs +++ b/src/System.Management.Automation/engine/Utils.cs @@ -359,7 +359,7 @@ namespace System.Management.Automation /// internal static bool IsWinPEHost() { -#if !LINUX +#if !UNIX RegistryKey winPEKey = null; try @@ -616,7 +616,7 @@ namespace System.Management.Automation internal static Dictionary GetGroupPolicySetting(string groupPolicyBase, string settingName, RegistryKey[] preferenceOrder) { -#if LINUX +#if UNIX return _emptyDictionary; #else lock (cachedGroupPolicySettings) @@ -927,7 +927,7 @@ namespace System.Management.Automation // permissions. To fit into PowerShell's existing model of pre-emptively checking // permissions (which cannot be assumed on Unix), we "assume" the user is an // administrator by returning true, thus nullifying this check on Unix. -#if LINUX +#if UNIX return true; #else System.Security.Principal.WindowsIdentity currentIdentity = System.Security.Principal.WindowsIdentity.GetCurrent(); @@ -956,7 +956,7 @@ namespace System.Management.Automation isDirectory = false; return false; } -#if LINUX +#if UNIX isDirectory = Platform.NonWindowsIsDirectory(path); return Platform.NonWindowsIsFile(path); #else @@ -1093,7 +1093,7 @@ namespace System.Management.Automation internal static bool PathIsUnc(string path) { -#if LINUX +#if UNIX return false; #else Uri uri; diff --git a/src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs b/src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs index c3e9cc0066..854c80d1db 100644 --- a/src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs +++ b/src/System.Management.Automation/engine/remoting/commands/remotingcommandutil.cs @@ -96,7 +96,7 @@ namespace Microsoft.PowerShell.Commands /// internal static void CheckRemotingCmdletPrerequisites() { -#if LINUX +#if UNIX // TODO: check that PSRP requirements are installed return; #else diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index 0947e2d729..1d6686ceea 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -2303,7 +2303,7 @@ namespace System.Management.Automation.Remoting.Client #region DllImports ClientAPI -#if !LINUX +#if !UNIX internal const string WSManApiDll = @"WsmSvc.dll"; #else internal const string WSManApiDll = @"libpsrpomiprov"; @@ -2971,7 +2971,7 @@ namespace System.Management.Automation.Remoting.Client IntPtr requestDetails, int flags, IntPtr context); -#if LINUX +#if UNIX /// /// Registers the shutdown callback. /// @@ -3073,7 +3073,7 @@ namespace System.Management.Automation.Remoting.Client IntPtr shutdownCallback, IntPtr shutdownContext) { -#if LINUX +#if UNIX WSManNativeApi.WSManPluginRegisterShutdownCallback(requestDetails, shutdownCallback, shutdownContext); #endif } diff --git a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs index 8d598b13bc..08d2f8e971 100644 --- a/src/System.Management.Automation/engine/runtime/Binding/Binders.cs +++ b/src/System.Management.Automation/engine/runtime/Binding/Binders.cs @@ -677,7 +677,7 @@ namespace System.Management.Automation.Language private static TypeInfo GetComObjectType() { -#if LINUX +#if UNIX return null; #else return typeof(object).GetTypeInfo().Assembly.GetType("System.__ComObject").GetTypeInfo(); diff --git a/src/System.Management.Automation/help/HelpCommands.cs b/src/System.Management.Automation/help/HelpCommands.cs index fe2be6fe3c..a78657c2be 100644 --- a/src/System.Management.Automation/help/HelpCommands.cs +++ b/src/System.Management.Automation/help/HelpCommands.cs @@ -700,7 +700,7 @@ namespace Microsoft.PowerShell.Commands this.WriteVerbose(string.Format(CultureInfo.InvariantCulture, HelpDisplayStrings.OnlineHelpUri, uriToLaunch.OriginalString)); System.Diagnostics.Process browserProcess = new System.Diagnostics.Process(); -#if LINUX +#if UNIX browserProcess.StartInfo.FileName = Platform.IsLinux ? "xdg-open" : /* OS X */ "open"; browserProcess.StartInfo.Arguments = uriToLaunch.OriginalString; browserProcess.Start(); diff --git a/src/System.Management.Automation/logging/MshLog.cs b/src/System.Management.Automation/logging/MshLog.cs index 59ed23f051..52279d8552 100644 --- a/src/System.Management.Automation/logging/MshLog.cs +++ b/src/System.Management.Automation/logging/MshLog.cs @@ -172,7 +172,7 @@ namespace System.Management.Automation #endif Collection providers = new Collection(); // Porting note: Linux does not support ETW -#if !LINUX +#if !UNIX try { #if !CORECLR //TODO:CORECLR EventLogLogProvider not handled yet diff --git a/src/System.Management.Automation/namespaces/FileSystemProvider.cs b/src/System.Management.Automation/namespaces/FileSystemProvider.cs index 225caeffc7..9b81205101 100644 --- a/src/System.Management.Automation/namespaces/FileSystemProvider.cs +++ b/src/System.Management.Automation/namespaces/FileSystemProvider.cs @@ -607,7 +607,7 @@ namespace Microsoft.PowerShell.Commands /// protected override PSDriveInfo RemoveDrive(PSDriveInfo drive) { -#if LINUX +#if UNIX return drive; #else return WinRemoveDrive(drive); @@ -681,7 +681,7 @@ namespace Microsoft.PowerShell.Commands /// internal static string GetUNCForNetworkDrive(string driveName) { -#if LINUX +#if UNIX return driveName; #else return WinGetUNCForNetworkDrive(driveName); @@ -739,7 +739,7 @@ namespace Microsoft.PowerShell.Commands /// internal static string GetSubstitutedPathForNetworkDosDevice(string driveName) { -#if LINUX +#if UNIX throw new PlatformNotSupportedException(); #else return WinGetSubstitutedPathForNetworkDosDevice(driveName); @@ -919,7 +919,7 @@ namespace Microsoft.PowerShell.Commands // the platform itself then has no real network drive support // as required by this context. Solution: check for network // drive support before using it. -#if LINUX +#if UNIX continue; #else displayRoot = GetRootPathForNetworkDriveOrDosDevice(newDrive); @@ -936,7 +936,7 @@ namespace Microsoft.PowerShell.Commands root = newDrive.RootDirectory.FullName; } -#if LINUX +#if UNIX // Porting notes: On platforms with single root filesystems, only // add the filesystem with the root "/" to the initial drive list, // otherwise path handling will not work correctly because there @@ -1324,7 +1324,7 @@ namespace Microsoft.PowerShell.Commands { System.Diagnostics.Process invokeProcess = new System.Diagnostics.Process(); -#if LINUX +#if UNIX invokeProcess.StartInfo.FileName = Platform.IsLinux ? "xdg-open" : /* OS X */ "open"; invokeProcess.StartInfo.Arguments = path; invokeProcess.Start(); @@ -6962,7 +6962,7 @@ namespace Microsoft.PowerShell.Commands internal static int SafeGetFileAttributes(string path) { -#if LINUX +#if UNIX System.IO.FileAttributes attr = System.IO.File.GetAttributes(path); int result = 0; @@ -7064,7 +7064,7 @@ namespace Microsoft.PowerShell.Commands /// internal static bool PathIsNetworkPath(string path) { -#if LINUX +#if UNIX return false; #else return WinPathIsNetworkPath(path); @@ -8585,7 +8585,7 @@ namespace Microsoft.PowerShell.Commands private static SafeFileHandle OpenReparsePoint(string reparsePoint, FileDesiredAccess accessMode) { -#if LINUX +#if UNIX throw new PlatformNotSupportedException(); #else return WinOpenReparsePoint(reparsePoint,accessMode); diff --git a/src/System.Management.Automation/namespaces/LocationGlobber.cs b/src/System.Management.Automation/namespaces/LocationGlobber.cs index c150dd7179..7b09022e94 100644 --- a/src/System.Management.Automation/namespaces/LocationGlobber.cs +++ b/src/System.Management.Automation/namespaces/LocationGlobber.cs @@ -1589,7 +1589,7 @@ namespace System.Management.Automation /// internal static bool IsSingleFileSystemAbsolutePath(string path) { -#if LINUX +#if UNIX return path.StartsWith(StringLiterals.DefaultPathSeparatorString, StringComparison.Ordinal) || path.StartsWith(StringLiterals.AlternatePathSeparatorString, StringComparison.Ordinal); #else diff --git a/src/System.Management.Automation/namespaces/RegistryProvider.cs b/src/System.Management.Automation/namespaces/RegistryProvider.cs index 9a168ff7f8..63c1d7ef82 100644 --- a/src/System.Management.Automation/namespaces/RegistryProvider.cs +++ b/src/System.Management.Automation/namespaces/RegistryProvider.cs @@ -136,7 +136,7 @@ namespace Microsoft.PowerShell.Commands { Collection drives = new Collection(); -#if !LINUX +#if !UNIX drives.Add( new PSDriveInfo( "HKLM", diff --git a/src/System.Management.Automation/namespaces/SafeRegistryHandle.cs b/src/System.Management.Automation/namespaces/SafeRegistryHandle.cs index 80120a7025..0067147663 100644 --- a/src/System.Management.Automation/namespaces/SafeRegistryHandle.cs +++ b/src/System.Management.Automation/namespaces/SafeRegistryHandle.cs @@ -58,7 +58,7 @@ namespace Microsoft.PowerShell.Commands.Internal override protected bool ReleaseHandle() { -#if LINUX +#if UNIX return true; #else // Returns a Win32 error code, 0 for success diff --git a/src/System.Management.Automation/project.json b/src/System.Management.Automation/project.json index 1d73c92fb4..af1d28ec7a 100644 --- a/src/System.Management.Automation/project.json +++ b/src/System.Management.Automation/project.json @@ -15,7 +15,7 @@ "configurations": { "Linux": { "buildOptions": { - "define": [ "LINUX" ] + "define": [ "UNIX" ] } } }, diff --git a/src/System.Management.Automation/security/CatalogHelper.cs b/src/System.Management.Automation/security/CatalogHelper.cs index d3b65f5566..66649901be 100644 --- a/src/System.Management.Automation/security/CatalogHelper.cs +++ b/src/System.Management.Automation/security/CatalogHelper.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX /********************************************************************++ Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 8d3fc91f2d..c9f38774c1 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -138,7 +138,7 @@ namespace System.Management.Automation internal static void SetExecutionPolicy(ExecutionPolicyScope scope, ExecutionPolicy policy, string shellId) { -#if LINUX +#if UNIX throw new PlatformNotSupportedException(); #else string executionPolicy = "Restricted"; @@ -282,7 +282,7 @@ namespace System.Management.Automation internal static ExecutionPolicy GetExecutionPolicy(string shellId, ExecutionPolicyScope scope) { -#if LINUX +#if UNIX return ExecutionPolicy.Unrestricted; #else switch (scope) @@ -429,7 +429,7 @@ namespace System.Management.Automation return false; } -#if LINUX +#if UNIX // There is no signature support on non-Windows platforms (yet), when // execution reaches here, we are sure the file is under product folder return true; @@ -1631,7 +1631,7 @@ namespace System.Management.Automation /// AMSI_RESULT_DETECTED if malware was detected in the sample. internal static AmsiNativeMethods.AMSI_RESULT ScanContent(string content, string sourceMetadata) { -#if LINUX +#if UNIX return AmsiNativeMethods.AMSI_RESULT.AMSI_RESULT_NOT_DETECTED; #else return WinScanContent(content,sourceMetadata); @@ -1725,7 +1725,7 @@ namespace System.Management.Automation internal static void CurrentDomain_ProcessExit(object sender, EventArgs e) { -#if !LINUX +#if !UNIX VerifyAmsiUninitializeCalled(); #endif } @@ -1743,7 +1743,7 @@ namespace System.Management.Automation /// internal static void CloseSession() { -#if !LINUX +#if !UNIX WinCloseSession(); #endif } @@ -1772,7 +1772,7 @@ namespace System.Management.Automation /// internal static void Uninitialize() { -#if !LINUX +#if !UNIX WinUninitialize(); #endif } diff --git a/src/System.Management.Automation/utils/ExtensionMethods.cs b/src/System.Management.Automation/utils/ExtensionMethods.cs index 1c1c76f199..70bc32ea79 100644 --- a/src/System.Management.Automation/utils/ExtensionMethods.cs +++ b/src/System.Management.Automation/utils/ExtensionMethods.cs @@ -130,7 +130,7 @@ namespace System.Management.Automation [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static bool IsComObject(this Type type) { -#if LINUX +#if UNIX return false; #elif CORECLR // Type.IsComObject(Type) is not in CoreCLR return ComObjectType.IsAssignableFrom(type); diff --git a/src/System.Management.Automation/utils/PowerShellETWTracer.cs b/src/System.Management.Automation/utils/PowerShellETWTracer.cs index d9ec3d2df2..3b58a2fc89 100644 --- a/src/System.Management.Automation/utils/PowerShellETWTracer.cs +++ b/src/System.Management.Automation/utils/PowerShellETWTracer.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (C) Microsoft. All rights reserved. // diff --git a/src/System.Management.Automation/utils/tracing/EtwActivity.cs b/src/System.Management.Automation/utils/tracing/EtwActivity.cs index e7256d36e2..5352749dbe 100644 --- a/src/System.Management.Automation/utils/tracing/EtwActivity.cs +++ b/src/System.Management.Automation/utils/tracing/EtwActivity.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (C) Microsoft. All rights reserved. // diff --git a/src/System.Management.Automation/utils/tracing/EtwActivityReverter.cs b/src/System.Management.Automation/utils/tracing/EtwActivityReverter.cs index 30f6210409..ad79f61605 100644 --- a/src/System.Management.Automation/utils/tracing/EtwActivityReverter.cs +++ b/src/System.Management.Automation/utils/tracing/EtwActivityReverter.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX //----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/utils/tracing/EtwActivityReverterMethodInvoker.cs b/src/System.Management.Automation/utils/tracing/EtwActivityReverterMethodInvoker.cs index 8ccd2159fd..3a3c48463b 100644 --- a/src/System.Management.Automation/utils/tracing/EtwActivityReverterMethodInvoker.cs +++ b/src/System.Management.Automation/utils/tracing/EtwActivityReverterMethodInvoker.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX //----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/utils/tracing/EtwEventCorrelator.cs b/src/System.Management.Automation/utils/tracing/EtwEventCorrelator.cs index 8a2d546545..b08cc7586b 100644 --- a/src/System.Management.Automation/utils/tracing/EtwEventCorrelator.cs +++ b/src/System.Management.Automation/utils/tracing/EtwEventCorrelator.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX //----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs b/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs index 51c33a1d2f..3f1ebf5797 100644 --- a/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs +++ b/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX //----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/src/System.Management.Automation/utils/tracing/PSEtwLog.cs b/src/System.Management.Automation/utils/tracing/PSEtwLog.cs index 08ae05b4f3..7e3030b0d4 100644 --- a/src/System.Management.Automation/utils/tracing/PSEtwLog.cs +++ b/src/System.Management.Automation/utils/tracing/PSEtwLog.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (C) Microsoft. All rights reserved. // diff --git a/src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs b/src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs index 4c04fe9630..8fd0d9612d 100644 --- a/src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs +++ b/src/System.Management.Automation/utils/tracing/PSEtwLogProvider.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (C) Microsoft. All rights reserved. // diff --git a/src/System.Management.Automation/utils/tracing/Tracing.cs b/src/System.Management.Automation/utils/tracing/Tracing.cs index ce69bb5d5b..b7360ca09b 100644 --- a/src/System.Management.Automation/utils/tracing/Tracing.cs +++ b/src/System.Management.Automation/utils/tracing/Tracing.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX // // Copyright (C) Microsoft. All rights reserved. // diff --git a/src/System.Management.Automation/utils/tracing/TracingGen.cs b/src/System.Management.Automation/utils/tracing/TracingGen.cs index e781bbffc1..3cff0e2650 100644 --- a/src/System.Management.Automation/utils/tracing/TracingGen.cs +++ b/src/System.Management.Automation/utils/tracing/TracingGen.cs @@ -1,4 +1,4 @@ -#if !LINUX +#if !UNIX using System; using System.Collections; using System.Diagnostics.Eventing;