* [PATCH] xfsprogs: make platform_defs.h more friendly to C++ code
@ 2015-10-13 8:59 Avi Kivity
2015-10-13 9:06 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2015-10-13 8:59 UTC (permalink / raw)
To: xfs
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@scylladb.com>
---
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
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-13 9:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 8:59 [PATCH] xfsprogs: make platform_defs.h more friendly to C++ code Avi Kivity
2015-10-13 9:06 ` Christoph Hellwig
2015-10-13 9:12 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox