Remove libuuid usage (#16643)
authorJan Vorlicek <janvorli@microsoft.com>
Tue, 6 Mar 2018 01:21:09 +0000 (02:21 +0100)
committerGitHub <noreply@github.com>
Tue, 6 Mar 2018 01:21:09 +0000 (02:21 +0100)
commit76245a33daf1e4a8dc724e9b7fd712bd41a7aee0
tree5067dae50136e8caca443e2d749814e05f653e3f
parenta2628fc507df0c011383dd0c275bfb0d51bcd060
Remove libuuid usage (#16643)

* Remove libuuid usage

This change removes dependency on the libuuid library that is used for GUID creation only.
It implements it using a random generator instead.

It also modifies return type of PAL_Random to VOID since it was always
returning TRUE and none of the existing callers were checking it.

1. Port the GUID creation to managed code.
2. Modify the PAL_Random to have 6 times better perf so that the perf of the
   CoCreateGuid that is used in the native runtime doesn't degrade that much
   w.r.t the previous state when the libuuid was used.
3. Use Interop.GetRandomBytes on Unix and fix Windows
20 files changed:
src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp
src/ToolBox/superpmi/superpmi-shim-counter/methodcallsummarizer.cpp
src/ToolBox/superpmi/superpmi/parallelsuperpmi.cpp
src/dlls/mscordac/mscordac_unixexports.src
src/dlls/mscoree/mscorwks_unixexports.src
src/mscorlib/System.Private.CoreLib.csproj
src/mscorlib/shared/Interop/Windows/Ole32/Interop.CoCreateGuid.cs [new file with mode: 0644]
src/mscorlib/shared/System.Private.CoreLib.Shared.projitems
src/mscorlib/shared/System/Guid.Unix.cs [new file with mode: 0644]
src/mscorlib/shared/System/Guid.Windows.cs [new file with mode: 0644]
src/mscorlib/src/Microsoft/Win32/Win32Native.cs
src/mscorlib/src/System/Guid.CoreCLR.cs [deleted file]
src/pal/inc/pal.h
src/pal/inc/rt/palrt.h
src/pal/src/CMakeLists.txt
src/pal/src/config.h.in
src/pal/src/configure.cmake
src/pal/src/misc/miscpalapi.cpp
src/palrt/guid.cpp
src/vm/comutilnative.cpp