Fossil SCM

Fix compiler warning about redefining min() when compiling with MinGW, cherrypick from [536fb1d6e0].

mistachkin 2011-11-05 03:12 trunk
Commit c738a1a6a787d7104424c51eee64b671cd5c437e
1 file changed +3 -1
+3 -1
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
2727
#define DEBUG(X)
2828
#define ISDEBUG 0
2929
#endif
3030
3131
/* The minimum of two integers */
32
-#define min(A,B) (A<B?A:B)
32
+#ifndef min
33
+# define min(A,B) (A<B?A:B)
34
+#endif
3335
3436
/*
3537
** Compare N lines of text from pV1 and pV2. If the lines
3638
** are the same, return true. Return false if one or more of the N
3739
** lines are different.
3840
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
27 #define DEBUG(X)
28 #define ISDEBUG 0
29 #endif
30
31 /* The minimum of two integers */
32 #define min(A,B) (A<B?A:B)
 
 
33
34 /*
35 ** Compare N lines of text from pV1 and pV2. If the lines
36 ** are the same, return true. Return false if one or more of the N
37 ** lines are different.
38
--- src/merge3.c
+++ src/merge3.c
@@ -27,11 +27,13 @@
27 #define DEBUG(X)
28 #define ISDEBUG 0
29 #endif
30
31 /* The minimum of two integers */
32 #ifndef min
33 # define min(A,B) (A<B?A:B)
34 #endif
35
36 /*
37 ** Compare N lines of text from pV1 and pV2. If the lines
38 ** are the same, return true. Return false if one or more of the N
39 ** lines are different.
40

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button