dpkg/use-clamp-from-C-STD-library.patch
Adam Majer 28727f17d6 Accepting request 898417 from system:packagemanager
- use-clamp-from-C-STD-library.patch: actually remove the clamp
  macro instead of using fragile preprocessor patches

OBS-URL: https://build.opensuse.org/request/show/898417
OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/dpkg?expand=0&rev=82
2021-06-08 12:46:29 +00:00

37 lines
907 B
Diff

From 43bf69b419bcfc0c601015d753b921b6849bae06 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 23 Apr 2021 11:03:59 +0200
Subject: [PATCH] Use clamp from C++ STD library.
---
lib/dpkg/macros.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
-#endif
-
/** @} */
#endif /* LIBDPKG_MACROS_H */