The following commit has been merged in the master branch:
commit 7e98241b11ce27e8d7fb87f1e64ecd03ec0ea0bf
Author: Guillem Jover <[email protected]>
Date: Wed Mar 24 12:50:06 2010 +0100
dselect: Show dependency/conflicts resolution screen again
Fix by switching the C++ code to use STL's min() and max() instead of
preprocessor macros, to avoid multiple evaluation of arguments.
Regression introduced in commit f426b031ac858fa30ace69959a43b61fb40f4be9.
Closes: #574816
Based-on-patch-by: Robert Luberda <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index 885dded..a17d260 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,10 @@ dpkg (1.15.6.1) UNRELEASED; urgency=low
exposing the configure variable HAVE_C_ATTRIBUTE on installed headers.
* Do not allow a --retry schedule in start-stop-daemon where forever is
the last item, as it needs something to repeat over. Closes: #570938
+ * Show dselect dependency/conflicts resolution screen again, by switching
+ the code to use STL's min() and max() instead of preprocessor macros, to
+ avoid multiple evaluation of arguments. Regression introduced in 1.15.6.
+ Based on a patch by Robert Luberda <[email protected]>. Closes: #574816
[ Raphaƫl Hertzog ]
* Accept source packages without "Format" field for compatibility with very
diff --git a/dselect/dselect.h b/dselect/dselect.h
index fee948d..d4c147f 100644
--- a/dselect/dselect.h
+++ b/dselect/dselect.h
@@ -24,6 +24,11 @@
#include <signal.h>
+#include <algorithm>
+
+using std::min;
+using std::max;
+
#include "dselect-curses.h"
#define DSELECT "dselect"
diff --git a/lib/dpkg/macros.h b/lib/dpkg/macros.h
index ca371ef..76f2de7 100644
--- a/lib/dpkg/macros.h
+++ b/lib/dpkg/macros.h
@@ -59,6 +59,8 @@
#define array_count(a) (sizeof(a) / sizeof((a)[0]))
#endif
+/* For C++ use native implementations from STL or similar. */
+#ifndef __cplusplus
#ifndef min
#define min(a, b) ((a) < (b) ? (a) : (b))
#endif
@@ -66,6 +68,7 @@
#ifndef max
#define max(a, b) ((a) > (b) ? (a) : (b))
#endif
+#endif
#endif /* LIBDPKG_MACROS_H */
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]