| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH] xfsprogs: make platform_defs.h more friendly to C++ code |
| From: | Avi Kivity <avi@xxxxxxxxxxxx> |
| Date: | Tue, 13 Oct 2015 11:59:38 +0300 |
| Delivered-to: | xfs@xxxxxxxxxxx |
C++ has its own min(); and xfsprog's min() interferes with it.
(It's likely to interfere with C applications too, so maybe it should be
moved to an internal header)
Signed-off-by: Avi Kivity <avi@xxxxxxxxxxxx>
---
include/platform_defs.h.in | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
index 30dd7a4..aaabed6 100644
--- a/include/platform_defs.h.in
+++ b/include/platform_defs.h.in
@@ -74,10 +74,12 @@ typedef unsigned short umode_t;
| (minor&IRIX_DEV_MAXMIN)))
#define IRIX_DEV_TO_KDEVT(dev) makedev(IRIX_DEV_MAJOR(dev),IRIX_DEV_MINOR(dev))
+#ifndef __cplusplus
#ifndef min
#define min(a,b) (((a)<(b))?(a):(b))
#define max(a,b) (((a)>(b))?(a):(b))
#endif
+#endif
#ifndef NBBY
#define NBBY 8
--
2.4.3
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 12/14 v2] xfsprogs: make fsr use mntinfo when there is no mntent, Jan Tulak |
|---|---|
| Next by Date: | Re: [PATCH] xfsprogs: make platform_defs.h more friendly to C++ code, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 12/14 v2] xfsprogs: make fsr use mntinfo when there is no mntent, Dave Chinner |
| Next by Thread: | Re: [PATCH] xfsprogs: make platform_defs.h more friendly to C++ code, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |