{
if (s_captureTrace)
{
- Interop.Sys.PrintF(
- "%s\n\n",
- $"0x{handle.ToInt64():x} {_stacktrace?.ToString() ?? "no stacktrace..."}");
+ Console.WriteLine($"0x{handle.ToInt64():x} {_stacktrace?.ToString() ?? "no stacktrace..."}");
}
}
#endif
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#include "pal_config.h"
#include "pal_string.h"
#include "pal_utilities.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>
-#include <string.h>
int32_t SystemNative_SNPrintF(char* string, int32_t size, const char* format, ...)
{
va_end(arguments);
return result;
}
-
-int32_t SystemNative_PrintF(const char* format, ...)
-{
- va_list arguments;
- va_start(arguments, format);
- int result = vprintf(format, arguments);
- va_end(arguments);
- return result;
-}
* On failure, returns a negative value.
*/
DLLEXPORT int32_t SystemNative_SNPrintF(char* string, int32_t size, const char* format, ...);
-
-/**
- * printf is difficult to represent in C# due to the argument list, so the C# PInvoke
- * layer will have multiple overloads pointing to this function.
- *
- * Returns the number of characters written to the output stream on success; otherwise, returns
- * a negative number and errno and ferror are both set.
- */
-DLLEXPORT int32_t SystemNative_PrintF(const char* format, ...);
<Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.Poll.cs">
<Link>Common\Interop\Unix\libc\Interop.Poll.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.PrintF.cs">
- <Link>Common\Interop\Unix\libc\Interop.PrintF.cs</Link>
- </Compile>
<Compile Include="$(CommonPath)\CoreLib\Interop\Unix\System.Native\Interop.Read.cs">
<Link>Common\Interop\Unix\libc\Interop.Read.cs</Link>
</Compile>
<Reference Include="System.IO.Compression.Brotli" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Reference Include="System.Console" Condition="'$(ConfigurationGroup)' == 'Debug'" />
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.IO.FileSystem" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Compile Include="$(CommonPath)\CoreLib\Interop\Unix\Interop.Errors.cs">
<Link>Common\CoreLib\Interop\Unix\Interop.Errors.cs</Link>
</Compile>
- <Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.PrintF.cs">
- <Link>Common\Interop\Unix\System.Native\Interop.PrintF.cs</Link>
- </Compile>
<Compile Include="$(CommonPath)\Interop\Unix\System.Net.Security.Native\Interop.Initialization.cs">
<Link>Common\Interop\Unix\System.Net.Security.Native\Interop.Initialization.cs</Link>
</Compile>
<Reference Include="System.Threading.ThreadPool" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Reference Include="System.Console" Condition="'$(ConfigurationGroup)' == 'Debug'" />
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.Security.Cryptography.Algorithms" />
<Reference Include="System.Security.Cryptography.OpenSsl" />
<Compile Include="Microsoft\Win32\SafeHandles\SafePasswordHandle.Unix.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsUnix)' == 'true' AND '$(TargetsOSX)' != 'true' ">
- <Compile Include="$(CommonPath)\Interop\Unix\System.Native\Interop.PrintF.cs">
- <Link>Common\Interop\Unix\System.Native\Interop.PrintF.cs</Link>
- </Compile>
<AsnXml Include="System\Security\Cryptography\X509Certificates\Asn1\DistributionPointAsn.xml" />
<Compile Include="System\Security\Cryptography\X509Certificates\Asn1\DistributionPointAsn.xml.cs">
<DependentUpon>System\Security\Cryptography\X509Certificates\Asn1\DistributionPointAsn.xml</DependentUpon>
<Reference Include="System.Diagnostics.StackTrace" />
<Reference Include="System.Security.Cryptography.OpenSsl" />
</ItemGroup>
+ <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
+ <Reference Include="System.Console" Condition="'$(ConfigurationGroup)' == 'Debug'" />
+ </ItemGroup>
<ItemGroup>
<None Include="@(AsnXml)" />
</ItemGroup>