diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:21:44 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:21:44 -0600 |
commit | ebdb7d8e1b712bdf63c2e80c02fe1c5ed8a0b8f4 (patch) | |
tree | bfde5d1325a46ab65f8ff276ec26ccafeba0510e /fs | |
parent | 17b4e789fd9761a949515ab40f1063e8ecca18d4 (diff) |
Bugzilla 511: Redefine the min macro #defined in yaffs_qsort to yaffs_min
Patch for Bugzilla 511: Redefine the min macro #defined in yaffs_qsort to yaffs_min
so that it doesn't conflict with the macro defined in linux/kernel.h of the linux
2.6.22 kernel.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-Bugzilla-511-Redefine-the-min-macro-define.patch
Diffstat (limited to 'fs')
-rw-r--r-- | fs/yaffs2/yaffs_qsort.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/yaffs2/yaffs_qsort.c b/fs/yaffs2/yaffs_qsort.c index 296701d2e41f..ea718985754b 100644 --- a/fs/yaffs2/yaffs_qsort.c +++ b/fs/yaffs2/yaffs_qsort.c @@ -74,7 +74,7 @@ med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *)) :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); } -#define min(a,b) (((a) < (b)) ? (a) : (b)) +#define yaffs_min(a,b) (((a) < (b)) ? (a) : (b)) void qsort(void *aa, size_t n, size_t es, int (*cmp)(const void *, const void *)) { @@ -140,9 +140,9 @@ loop: SWAPINIT(a, es); } pn = (char *)a + n * es; - r = min(pa - (char *)a, pb - pa); + r = yaffs_min(pa - (char *)a, pb - pa); vecswap(a, pb - r, r); - r = min((long)(pd - pc), (long)(pn - pd - es)); + r = yaffs_min((long)(pd - pc), (long)(pn - pd - es)); vecswap(pb, pn - r, r); if ((r = pb - pa) > es) qsort(a, r / es, es, cmp); |