diff options
Diffstat (limited to 'src')
7 files changed, 0 insertions, 73 deletions
diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props index 441f4754c..3bad023f0 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props +++ b/src/BuildIntegration/Microsoft.NETCore.Native.Unix.props @@ -83,7 +83,6 @@ See the LICENSE file in the project root for more information. <LinkerArg Include="-lm" /> <LinkerArg Include="-lcurl" /> <LinkerArg Include="-lz" /> - <LinkerArg Include="-luuid" Condition="'$(TargetOS)' != 'OSX'" /> <LinkerArg Include="-lrt" Condition="'$(TargetOS)' != 'OSX'" /> <LinkerArg Include="-licucore" Condition="'$(TargetOS)' == 'OSX'" /> <LinkerArg Include="-dynamiclib" Condition="'$(TargetOS)' == 'OSX' and '$(NativeLib)' == 'Shared'" /> diff --git a/src/Common/src/Interop/Unix/System.Private.CoreLib.Native/Interop.CreateGuid.cs b/src/Common/src/Interop/Unix/System.Private.CoreLib.Native/Interop.CreateGuid.cs deleted file mode 100644 index b6326aed0..000000000 --- a/src/Common/src/Interop/Unix/System.Private.CoreLib.Native/Interop.CreateGuid.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -internal static partial class Interop -{ - internal unsafe partial class Sys - { - [DllImport(Interop.Libraries.CoreLibNative, EntryPoint = "CoreLibNative_CreateGuid")] - internal static extern void CreateGuid(out Guid guid); - } -} diff --git a/src/Native/System.Private.CoreLib.Native/CMakeLists.txt b/src/Native/System.Private.CoreLib.Native/CMakeLists.txt index 760b75e24..d50340e67 100644 --- a/src/Native/System.Private.CoreLib.Native/CMakeLists.txt +++ b/src/Native/System.Private.CoreLib.Native/CMakeLists.txt @@ -6,7 +6,6 @@ set(NATIVE_SOURCES pal_dynamicload.cpp pal_environment.cpp pal_errno.cpp - pal_guid.cpp pal_memory.cpp pal_exepath.cpp pal_threading.cpp diff --git a/src/Native/System.Private.CoreLib.Native/config.h.in b/src/Native/System.Private.CoreLib.Native/config.h.in index 3d13262a2..80a074dab 100644 --- a/src/Native/System.Private.CoreLib.Native/config.h.in +++ b/src/Native/System.Private.CoreLib.Native/config.h.in @@ -5,6 +5,3 @@ #cmakedefine01 HAVE_CLOCK_MONOTONIC_COARSE #cmakedefine01 HAVE_MACH_ABSOLUTE_TIME #cmakedefine01 HAVE_SCHED_GETCPU -#cmakedefine01 HAVE_LIBUUID_H -#cmakedefine01 HAVE_UUID_GENERATE_RANDOM -#cmakedefine01 HAVE_UUID_GENERATE diff --git a/src/Native/System.Private.CoreLib.Native/configure.cmake b/src/Native/System.Private.CoreLib.Native/configure.cmake index c84bf8971..f5c6b02a1 100644 --- a/src/Native/System.Private.CoreLib.Native/configure.cmake +++ b/src/Native/System.Private.CoreLib.Native/configure.cmake @@ -4,15 +4,6 @@ include(CheckLibraryExists) check_library_exists(pthread pthread_condattr_setclock "" HAVE_PTHREAD_CONDATTR_SETCLOCK) -check_include_files(uuid/uuid.h HAVE_LIBUUID_H) - -if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) - set(CMAKE_REQUIRED_LIBRARIES uuid) -endif() -check_function_exists(uuid_generate_random HAVE_UUID_GENERATE_RANDOM) -check_function_exists(uuid_generate HAVE_UUID_GENERATE) -set(CMAKE_REQUIRED_LIBRARIES) - check_cxx_source_runs(" #include <stdlib.h> #include <time.h> @@ -69,11 +60,6 @@ int main(void) }" HAVE_SCHED_GETCPU) set(CMAKE_REQUIRED_LIBRARIES) -if(NOT HAVE_LIBUUID_H) - unset(HAVE_LIBUUID_H CACHE) - message(FATAL_ERROR "Cannot find libuuid. Try installing uuid-dev or the appropriate packages for your platform") -endif() - configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) diff --git a/src/Native/System.Private.CoreLib.Native/pal_guid.cpp b/src/Native/System.Private.CoreLib.Native/pal_guid.cpp deleted file mode 100644 index 8e35d089e..000000000 --- a/src/Native/System.Private.CoreLib.Native/pal_guid.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// 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_common.h" - -#if HAVE_LIBUUID_H -#include <uuid/uuid.h> -#endif - -#include "pal_endian.h" - -typedef struct _GUID { - uint32_t Data1; // NOTE: diff from Win32, for LP64 - uint16_t Data2; - uint16_t Data3; - uint8_t Data4[8]; -} GUID; - -extern "C" void CoreLibNative_CreateGuid(GUID* pGuid) -{ -#if HAVE_UUID_GENERATE_RANDOM - uuid_generate_random(*(uuid_t*)pGuid); -#elif HAVE_UUID_GENERATE - uuid_generate(*(uuid_t*)pGuid); -#else -#error Don't know how to generate UUID on this platform -#endif - - // Change the byte order of the Data1, 2 and 3, since uuid_generate_random and uuid_generate - // generates them with big endian while GUIDS need to have them in little endian. - pGuid->Data1 = SWAP32(pGuid->Data1); - pGuid->Data2 = SWAP16(pGuid->Data2); - pGuid->Data3 = SWAP16(pGuid->Data3); -} diff --git a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj index 00eed5888..6a67bfaeb 100644 --- a/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -586,9 +586,6 @@ <Compile Include="..\..\Common\src\Interop\Unix\System.Native\Interop.GetSystemTimeAsTicks.cs"> <Link>Interop\Unix\System.Private.CoreLib.Native\Interop.GetSystemTimeAsTicks.cs</Link> </Compile> - <Compile Include="..\..\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.CreateGuid.cs"> - <Link>Interop\Unix\System.Private.CoreLib.Native\Interop.CreateGuid.cs</Link> - </Compile> <Compile Include="..\..\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.Exit.cs"> <Link>Interop\Unix\System.Private.CoreLib.Native\Interop.Exit.cs</Link> </Compile> |