chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55a3d37
)
min()/max() macros conflict with ones defined by Windows (or at least MinGW)
author
Jacob Nevins
<jacobn@chiark.greenend.org.uk>
Wed, 1 Jun 2005 22:56:20 +0000
(22:56 +0000)
committer
Jacob Nevins
<jacobn@chiark.greenend.org.uk>
Wed, 1 Jun 2005 22:56:20 +0000
(22:56 +0000)
headers; but MIN()/MAX() conflict with glib. Let's keep the lower-case ones,
and assume that any provided by the system have the obvious semantics.
[originally from svn r5900]
puzzles.h
patch
|
blob
|
history
diff --git
a/puzzles.h
b/puzzles.h
index 8be90095fc19fb3b72ca2b47920200c30af53f69..fbef531a32bd6fc795af97cd0116c0e60f68cb9d 100644
(file)
--- a/
puzzles.h
+++ b/
puzzles.h
@@
-22,8
+22,12
@@
#define STR(x) STR_INT(x)
/* NB not perfect because they evaluate arguments multiple times. */
+#ifndef max
#define max(x,y) ( (x)>(y) ? (x) : (y) )
+#endif /* max */
+#ifndef min
#define min(x,y) ( (x)<(y) ? (x) : (y) )
+#endif /* min */
enum {
LEFT_BUTTON = 0x0200,