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
This commit is contained in:
parent
a34a7702db
commit
28727f17d6
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 8 11:37:06 UTC 2021 - Adam Majer <adam.majer@suse.de>
|
||||
|
||||
- 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 <adrian.glaubitz@suse.com>
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user