From 565827659489f1b92dca57b6e23131d414f48db1 Mon Sep 17 00:00:00 2001 From: vector-of-bool Date: Thu, 9 Feb 2023 21:23:11 +0000 Subject: [PATCH 1/3] No dancing around 'long' vs 'long long' --- src/mc-range-edge-generation-private.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mc-range-edge-generation-private.h b/src/mc-range-edge-generation-private.h index 7e1a0192a..22d585ca3 100644 --- a/src/mc-range-edge-generation-private.h +++ b/src/mc-range-edge-generation-private.h @@ -94,15 +94,10 @@ static inline size_t mc_count_leading_zeros_u64 (uint64_t in) { #ifdef __has_builtin -#if __has_builtin(__builtin_clzl) -// Pointer-cast to ensure we are speaking the right type -#if defined(__APPLE__) || defined(__ILP32__) - unsigned long long *p = ∈ - return (size_t) (in ? __builtin_clzll (*p) : 64); -#else - unsigned long *p = ∈ - return (size_t) (in ? __builtin_clzl (*p) : 64); -#endif +#if __has_builtin(__builtin_clzll) + unsigned long long ull = in; + BSON_STATIC_ASSERT2 (ull_is_u64, sizeof (ull) == sizeof (in)); + return (size_t) (in ? __builtin_clzll (ull) : 64); #endif #endif uint64_t bit = UINT64_C (1) << 63; From c71fd434e822904e424a2c750b80bf1264a873d0 Mon Sep 17 00:00:00 2001 From: vector-of-bool Date: Thu, 9 Feb 2023 23:53:00 +0000 Subject: [PATCH 2/3] unused-typedef warning --- src/mc-range-edge-generation-private.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mc-range-edge-generation-private.h b/src/mc-range-edge-generation-private.h index 22d585ca3..38a57feba 100644 --- a/src/mc-range-edge-generation-private.h +++ b/src/mc-range-edge-generation-private.h @@ -88,6 +88,8 @@ mc_edges_t * mc_getEdgesDecimal128 (mc_getEdgesDecimal128_args_t args, mongocrypt_status_t *status); +BSON_STATIC_ASSERT2 (ull_is_u64, + sizeof (uint64_t) == sizeof (unsigned long long)); // count_leading_zeros_u64 returns the number of leading 0 bits of `in`. static inline size_t @@ -96,7 +98,6 @@ mc_count_leading_zeros_u64 (uint64_t in) #ifdef __has_builtin #if __has_builtin(__builtin_clzll) unsigned long long ull = in; - BSON_STATIC_ASSERT2 (ull_is_u64, sizeof (ull) == sizeof (in)); return (size_t) (in ? __builtin_clzll (ull) : 64); #endif #endif From 111752afb11fa115b8ea74c90c3d69ee861c160a Mon Sep 17 00:00:00 2001 From: Kyle Kloberdanz Date: Fri, 10 Feb 2023 09:41:51 -0600 Subject: [PATCH 3/3] (Debian packaging) Drop remove-builtin.patch, integrated upstream --- debian/changelog | 6 ++++++ debian/control | 1 - debian/patches/remove-builtin.patch | 26 -------------------------- debian/patches/series | 1 - 4 files changed, 6 insertions(+), 28 deletions(-) delete mode 100644 debian/patches/remove-builtin.patch delete mode 100644 debian/patches/series diff --git a/debian/changelog b/debian/changelog index 973d45537..f1e612e25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libmongocrypt (1.7.1-3) UNRELEASED; urgency=medium + + * Drop remove-builtin.patch, integrated upstream + + -- Kyle Kloberdanz Fri, 10 Feb 2023 09:33:24 -0600 + libmongocrypt (1.7.1-2) unstable; urgency=medium * Remove builtin which causes 32-bit ARM builds to fail diff --git a/debian/control b/debian/control index 97924eb94..732852f6f 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,6 @@ Uploaders: Kevin Albertson , Kyle Kloberdanz Build-Depends: debhelper (>= 10), cmake, - quilt, libssl-dev, pkg-config, libintelrdfpmath-dev (>= 2.0u2-6), diff --git a/debian/patches/remove-builtin.patch b/debian/patches/remove-builtin.patch deleted file mode 100644 index 373cd8aef..000000000 --- a/debian/patches/remove-builtin.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: Remove builtin which causes 32-bit ARM builds to fail -Author: vector-of-bool -Forwarded: not-needed -diff --git a/src/mc-range-edge-generation-private.h b/src/mc-range-edge-generation-private.h -index 7e1a0192..63718963 100644 ---- a/src/mc-range-edge-generation-private.h -+++ b/src/mc-range-edge-generation-private.h -@@ -93,18 +93,6 @@ mc_getEdgesDecimal128 (mc_getEdgesDecimal128_args_t args, - static inline size_t - mc_count_leading_zeros_u64 (uint64_t in) - { --#ifdef __has_builtin --#if __has_builtin(__builtin_clzl) --// Pointer-cast to ensure we are speaking the right type --#if defined(__APPLE__) || defined(__ILP32__) -- unsigned long long *p = ∈ -- return (size_t) (in ? __builtin_clzll (*p) : 64); --#else -- unsigned long *p = ∈ -- return (size_t) (in ? __builtin_clzl (*p) : 64); --#endif --#endif --#endif - uint64_t bit = UINT64_C (1) << 63; - size_t count = 0; - while ((bit & in) == 0 && bit > 0) { diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index f784f7762..000000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -remove-builtin.patch