pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

coreclr-git: Prefer BSD uuid



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat Feb 13 21:50:16 2016 +0100
Changeset:	cecbd2f3fc6e3e1052a79cf649e555efd399b842

Modified Files:
	coreclr-git/distinfo
Added Files:
	coreclr-git/patches/patch-src_pal_src_misc_miscpalapi.cpp

Log Message:
coreclr-git: Prefer BSD uuid

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cecbd2f3fc6e3e1052a79cf649e555efd399b842

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 coreclr-git/distinfo                               |  1 +
 .../patches/patch-src_pal_src_misc_miscpalapi.cpp  | 50 ++++++++++++++++++++++
 2 files changed, 51 insertions(+)

diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index 08f10b4..30b0088 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,6 +1,7 @@
 $NetBSD$
 
 SHA1 (patch-src_gc_gc.cpp) = c468a34bbafe35dcd242065762ff042a94152e47
+SHA1 (patch-src_pal_src_misc_miscpalapi.cpp) = b7a902309081c9a1a4d7a8a4dcfbb11342c7e311
 SHA1 (patch-src_vm_amd64_externalmethodfixupthunk.S) = 5e84b369f30ea62e391e1f949d0d01e1995e5192
 SHA1 (patch-src_vm_amd64_jithelpers__fast.S) = b4002abaed826b673c0af58a818c25d6b17e488e
 SHA1 (patch-src_vm_amd64_pinvokestubs.S) = 344e94f87fc08edde9a61f74a495e3bd2ed11248
diff --git a/coreclr-git/patches/patch-src_pal_src_misc_miscpalapi.cpp b/coreclr-git/patches/patch-src_pal_src_misc_miscpalapi.cpp
new file mode 100644
index 0000000..8690e79
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_misc_miscpalapi.cpp
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- src/pal/src/misc/miscpalapi.cpp.orig	2016-01-28 19:04:13.000000000 +0000
++++ src/pal/src/misc/miscpalapi.cpp
+@@ -33,10 +33,10 @@ Revision History:
+ #include <pthread.h>
+ #include <dlfcn.h>
+ 
+-#if HAVE_LIBUUID_H
+-#include <uuid/uuid.h>
+-#elif HAVE_BSD_UUID_H
++#if HAVE_BSD_UUID_H
+ #include <uuid.h>
++#elif HAVE_LIBUUID_H
++#include <uuid/uuid.h>
+ #endif
+ 
+ #include <pal_endian.h>
+@@ -352,15 +352,7 @@ HRESULT
+ PALAPI
+ CoCreateGuid(OUT GUID * pguid)
+ {
+-#if HAVE_LIBUUID_H
+-    uuid_generate_random(*(uuid_t*)pguid);
+-
+-    // Change the byte order of the Data1, 2 and 3, since the uuid_generate_random
+-    // 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);
+-#elif HAVE_BSD_UUID_H
++#if HAVE_BSD_UUID_H
+     uuid_t uuid;
+     uint32_t status;
+     uuid_create(&uuid, &status);
+@@ -372,6 +364,14 @@ CoCreateGuid(OUT GUID * pguid)
+ 
+     // Encode the uuid with little endian.
+     uuid_enc_le(pguid, &uuid);
++#elif HAVE_LIBUUID_H
++    uuid_generate_random(*(uuid_t*)pguid);
++
++    // Change the byte order of the Data1, 2 and 3, since the uuid_generate_random
++    // 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);
+ #else
+     #error Don't know how to generate UUID on this platform
+ #endif


Home | Main Index | Thread Index | Old Index