diff --git a/dpkg.changes b/dpkg.changes index d11364c..dfb6e1b 100644 --- a/dpkg.changes +++ b/dpkg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jun 8 11:37:06 UTC 2021 - Adam Majer + +- use-clamp-from-C-STD-library.patch: actually remove the clamp + macro instead of using fragile preprocessor patches + ------------------------------------------------------------------- Thu Apr 29 08:28:48 UTC 2021 - John Paul Adrian Glaubitz diff --git a/use-clamp-from-C-STD-library.patch b/use-clamp-from-C-STD-library.patch index 4b9c43e..75feebd 100644 --- a/use-clamp-from-C-STD-library.patch +++ b/use-clamp-from-C-STD-library.patch @@ -7,27 +7,30 @@ Subject: [PATCH] Use clamp from C++ STD library. lib/dpkg/macros.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/lib/dpkg/macros.h b/lib/dpkg/macros.h -index 0c1937a..34387d9 100644 ---- a/lib/dpkg/macros.h -+++ b/lib/dpkg/macros.h -@@ -112,7 +112,6 @@ - #ifndef max - #define max(a, b) ((a) > (b) ? (a) : (b)) +Index: dpkg-1.20.9/lib/dpkg/macros.h +=================================================================== +--- dpkg-1.20.9.orig/lib/dpkg/macros.h ++++ dpkg-1.20.9/lib/dpkg/macros.h +@@ -144,22 +144,6 @@ #endif + #endif + +-/** +- * @def clamp +- * +- * Returns a normalized value within the low and high limits. +- * +- * @param v The value to clamp. +- * @param l The low limit. +- * @param h The high limit. +- */ +-/* For C++ use native implementations from STL or similar. */ +-#ifndef __cplusplus +-#ifndef clamp +-#define clamp(v, l, h) ((v) > (h) ? (h) : ((v) < (l) ? (l) : (v))) -#endif - - /** - * @def clamp -@@ -127,6 +126,8 @@ - #define clamp(v, l, h) ((v) > (h) ? (h) : ((v) < (l) ? (l) : (v))) - #endif - -+#endif -+ +-#endif +- /** @} */ #endif /* LIBDPKG_MACROS_H */ --- -2.31.1 -