APPROVE COMMIT
NOTE: This patch has been committed
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1510445364 0
# Sun Nov 12 00:09:24 2017 +0000
# Node ID d79c7749a1011bfb27c1209ff365758f7e95ae51
# Parent c8b7adfa23c6f68a106755cc970296763c2ed59d
Make min(), max() available as macros in lwlib too.
lwlib/ChangeLog addition:
2017-11-12 Aidan Kehoe <kehoea(a)parhasard.net>
* lwlib-internal.h:
Make min(), max() available as macros to lwlib as well as to the
core code. Thank you Mats Lidell and the buildbot.
diff -r c8b7adfa23c6 -r d79c7749a101 lwlib/ChangeLog
--- a/lwlib/ChangeLog Sat Nov 11 09:42:50 2017 +0000
+++ b/lwlib/ChangeLog Sun Nov 12 00:09:24 2017 +0000
@@ -1,3 +1,9 @@
+2017-11-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * lwlib-internal.h:
+ Make min(), max() available as macros to lwlib as well as to the
+ core code. Thank you Mats Lidell and the buildbot.
+
2016-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* lwlib-Xlw.c (xlw_update_one_widget):
diff -r c8b7adfa23c6 -r d79c7749a101 lwlib/lwlib-internal.h
--- a/lwlib/lwlib-internal.h Sat Nov 11 09:42:50 2017 +0000
+++ b/lwlib/lwlib-internal.h Sun Nov 12 00:09:24 2017 +0000
@@ -37,6 +37,17 @@
# endif
#endif
+/* Define min() and max(). (Some compilers put them in strange places that
+ won't be referenced by include files used by XEmacs, such as `macros.h'
+ under Solaris.) */
+
+#ifndef min
+# define min(a,b) (((a) <= (b)) ? (a) : (b))
+#endif
+#ifndef max
+# define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+
/* This represents a single widget within a widget tree. All the
widgets in a widget tree are chained through the `next' field.
`info' is a back pointer to the widget tree. */
--
‘As I sat looking up at the Guinness ad, I could never figure out /
How your man stayed up on the surfboard after forty pints of stout’
(C. Moore)