projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
182f58a
)
Use proper max in lwlib
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 6 Dec 2015 21:52:42 +0000
(16:52 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Sun, 6 Dec 2015 21:52:42 +0000
(16:52 -0500)
* src/ui/lwlib/lwlib.c: Undefine max macro to use this type safe
alternative.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/ui/lwlib/lwlib.c
patch
|
blob
|
history
diff --git
a/src/ui/lwlib/lwlib.c
b/src/ui/lwlib/lwlib.c
index
7748709
..
b23e76d
100644
(file)
--- a/
src/ui/lwlib/lwlib.c
+++ b/
src/ui/lwlib/lwlib.c
@@
-500,6
+500,12
@@
static Boolean safe_strcmp(const char *s1, const char *s2)
return (s1 && s2) ? strcmp(s1, s2) : s1 ? False : !!s2;
}
+
+/* We only expect to use the following max function */
+#ifdef max
+#undef max
+#endif
+
static change_type max(change_type i1, change_type i2)
{
return (int)i1 > (int)i2 ? i1 : i2;