Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/fonts/fontconfig/files also need an implementation of ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c97632fd1faf
branches:  trunk
changeset: 437198:c97632fd1faf
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Aug 18 09:27:38 2020 +0000

description:
also need an implementation of uuid_compare() for the test suite

diffstat:

 fonts/fontconfig/files/uuid.h |  17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 22dc17d584e3 -r c97632fd1faf fonts/fontconfig/files/uuid.h
--- a/fonts/fontconfig/files/uuid.h     Tue Aug 18 08:19:17 2020 +0000
+++ b/fonts/fontconfig/files/uuid.h     Tue Aug 18 09:27:38 2020 +0000
@@ -228,4 +228,21 @@
        __uuid_generate_random(out, &num);
 }
 
+#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
+
+static int uuid_compare(const uuid_t uu1, const uuid_t uu2)
+{
+       struct uuid     uuid1, uuid2;
+
+       uuid_unpack(uu1, &uuid1);
+       uuid_unpack(uu2, &uuid2);
+
+       UUCMP(uuid1.time_low, uuid2.time_low);
+       UUCMP(uuid1.time_mid, uuid2.time_mid);
+       UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
+       UUCMP(uuid1.clock_seq, uuid2.clock_seq);
+       return memcmp(uuid1.node, uuid2.node, 6);
+}
+
+
 #endif



Home | Main Index | Thread Index | Old Index